@watermarkinsights/ripple 5.4.0 → 5.5.0-2
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/cjs/{chartFunctions-ef57119f.js → chartFunctions-ce6c7c16.js} +20 -21
- package/dist/cjs/{global-4ff34a0e.js → global-835ecb61.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/priv-calendar.cjs.entry.js +13 -9
- package/dist/cjs/priv-navigator-item.cjs.entry.js +1 -1
- package/dist/cjs/ripple.cjs.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +3 -12
- package/dist/cjs/wm-date-range.cjs.entry.js +5 -1
- package/dist/cjs/wm-datepicker.cjs.entry.js +5 -1
- package/dist/cjs/wm-line-chart.cjs.entry.js +1 -1
- package/dist/cjs/wm-navigator.cjs.entry.js +12 -16
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
- package/dist/collection/components/charts/chartFunctions.js +20 -21
- package/dist/collection/components/charts/wm-chart/wm-chart.css +4 -5
- package/dist/collection/components/charts/wm-chart/wm-chart.js +2 -11
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +4 -5
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +17 -9
- package/dist/collection/components/datepickers/wm-date-range.js +5 -1
- package/dist/collection/components/datepickers/wm-datepicker.js +5 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +3 -3
- package/dist/collection/components/wm-navigator/wm-navigator.css +1 -0
- package/dist/collection/components/wm-navigator/wm-navigator.js +13 -17
- package/dist/esm/{chartFunctions-d3fd6e7c.js → chartFunctions-0ebf83f3.js} +20 -21
- package/dist/esm/{global-588c6343.js → global-ec8d6686.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/priv-calendar.entry.js +13 -9
- package/dist/esm/priv-navigator-item.entry.js +1 -1
- package/dist/esm/ripple.js +1 -1
- package/dist/esm/wm-chart.entry.js +3 -12
- package/dist/esm/wm-date-range.entry.js +5 -1
- package/dist/esm/wm-datepicker.entry.js +5 -1
- package/dist/esm/wm-line-chart.entry.js +1 -1
- package/dist/esm/wm-navigator.entry.js +12 -16
- package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
- package/dist/esm-es5/chartFunctions-0ebf83f3.js +1 -0
- package/dist/esm-es5/global-ec8d6686.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/ripple/p-011477e2.entry.js +1 -0
- package/dist/ripple/p-021ff5fa.system.entry.js +1 -0
- package/dist/ripple/p-204bdd73.entry.js +1 -0
- package/dist/ripple/{p-e7a64841.system.entry.js → p-28b70082.system.entry.js} +1 -1
- package/dist/ripple/p-361f6e59.system.js +1 -0
- package/dist/ripple/p-3b8b1b44.system.entry.js +1 -0
- package/dist/ripple/{p-f67fd802.system.entry.js → p-4a6854d3.system.entry.js} +1 -1
- package/dist/ripple/{p-e3de5bbd.system.entry.js → p-4c8db09c.system.entry.js} +1 -1
- package/dist/ripple/{p-0aa17cac.entry.js → p-4d0b1890.entry.js} +1 -1
- package/dist/ripple/p-5d0e2006.system.entry.js +1 -0
- package/dist/ripple/{p-763a01bc.system.js → p-811d5a9f.system.js} +1 -1
- package/dist/ripple/p-825bd63b.entry.js +1 -0
- package/dist/ripple/p-99dd083d.system.js +1 -0
- package/dist/ripple/p-a27d2177.entry.js +1 -0
- package/dist/ripple/p-ab0e197b.js +1 -0
- package/dist/ripple/{p-591918a4.entry.js → p-ade3d9a9.entry.js} +1 -1
- package/dist/ripple/p-c47811a2.entry.js +1 -0
- package/dist/ripple/{p-9a3e656a.entry.js → p-dbc112a6.entry.js} +1 -1
- package/dist/ripple/p-e3241417.system.entry.js +1 -0
- package/dist/ripple/p-f92bd0c1.js +1 -0
- package/dist/ripple/{p-49b7970e.system.entry.js → p-fd0aae67.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/global/interfaces.d.ts +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/chartFunctions-d3fd6e7c.js +0 -1
- package/dist/esm-es5/global-588c6343.js +0 -1
- package/dist/ripple/p-0f0466c6.js +0 -1
- package/dist/ripple/p-2be33eb4.system.js +0 -1
- package/dist/ripple/p-3183bba8.entry.js +0 -1
- package/dist/ripple/p-4bacf5a7.system.entry.js +0 -1
- package/dist/ripple/p-5c10e2ae.entry.js +0 -1
- package/dist/ripple/p-75ba63ba.entry.js +0 -1
- package/dist/ripple/p-97aaa344.system.js +0 -1
- package/dist/ripple/p-bee9a5dc.js +0 -1
- package/dist/ripple/p-c91b10f3.system.entry.js +0 -1
- package/dist/ripple/p-cc4a429b.entry.js +0 -1
- package/dist/ripple/p-d86bd773.entry.js +0 -1
- package/dist/ripple/p-f4210450.system.entry.js +0 -1
- package/dist/ripple/p-fe8d02c3.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function n(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?r(e.value):a(e.value).then(n,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,a,o,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(i=1,a&&(o=s[0]&2?a["return"]:s[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,s[1])).done)return o;if(a=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js"],(function(e){"use strict";var t,r,i,a,o,n,s,l,c,p,d;return{setters:[function(e){t=e.r;r=e.c;i=e.h;a=e.H;o=e.g},function(e){n=e.t;s=e.j;l=e.a;c=e.k;p=e.l;d=e.i}],execute:function(){var u=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:"start-label-wrapper . end-label-wrapper" "start-date-input hyphen end-date-input"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:"start-label-wrapper . end-label-wrapper ." "start-date-input hyphen end-date-input toggle-wrapper"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var h=e("wm_datepicker",function(){function e(e){t(this,e);this.wmDatepickerDateSelected=r(this,"wmDatepickerDateSelected",7);this.wmDatepickerInputBlurred=r(this,"wmDatepickerInputBlurred",7);this.openUp=false;this.popupClicked=false;this.toggleButtonClicked=false;this.value="";this.disabled=false;this.dateFormat="mm/dd/yyyy";this.errorMessage=undefined;this.labelPosition="top";this.label="";this.requiredField=false;this.preselected=undefined;this.isExpanded=false}Object.defineProperty(e.prototype,"isDisabled",{get:function(){return n(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"calendarDate",{get:function(){var e=s(new Date);var t={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"};if(this.value&&t[this.dateFormat]&&this.isValidIsoInternal(this.reformatDateInternal(t[this.dateFormat],"ISO",this.value))){e=this.reformatDateInternal(t[this.dateFormat],"ISO",this.value)}else if(this.preselected){e=this.preselected}return e},enumerable:false,configurable:true});e.prototype.handleDisabledChange=function(){l(this.el,this.isDisabled)};e.prototype.updateValue=function(){this.inputEl.value=this.value?this.value:""};e.prototype.announceError=function(){var e=this;if(this.errorMessage){setTimeout((function(){return e.announce(e.errorMessage)}),100)}};e.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.toggleButtonClicked=true};e.prototype.closePopup=function(e){var t=this;if(e===void 0){e=false}this.isExpanded=false;this.calEl.view="day";this.calEl.view="day";this.popupEl.classList.remove("open");window.setTimeout((function(){t.popupEl.style.visibility="hidden"}),250);if(e){this.toggleEl.focus()}};e.prototype.openPopup=function(){var e=this;this.openUp=c(this.el,this.popupEl.clientHeight,this.labelWrapperEl.clientHeight);if(p(this.el,336)){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else{this.popupEl.style.right="0";this.popupEl.style.left="auto"}this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){e.popupEl.classList.add("open")}));this.isExpanded=true;this.calEl.focusDate=this.calendarDate;this.calEl.startDate=this.calendarDate;this.calEl.focusCell()};e.prototype.handleInput=function(e){this.value=e.target.value};e.prototype.handleInputBlur=function(){this.dpWrapperEl.classList.remove("focus");this.wmDatepickerInputBlurred.emit()};e.prototype.handleInputFocus=function(){this.dpWrapperEl.classList.add("focus")};e.prototype.handleInputChange=function(){var e=new CustomEvent("change");this.el.dispatchEvent(e)};e.prototype.handleKey=function(e){switch(e.key){case"Escape":e.preventDefault();e.stopPropagation();this.closePopup(true);break}};e.prototype.blurHandler=function(){if(!this.popupClicked&&!this.toggleButtonClicked&&this.isExpanded){this.closePopup()}this.popupClicked=false;this.toggleButtonClicked=false};e.prototype.handleBlurOnWindow=function(){if(this.isExpanded){this.closePopup()}};e.prototype.handleCellTriggered=function(e){var t=e.detail.cell;var r=t.getAttribute("data-year")+"-"+t.getAttribute("data-month")+"-"+t.textContent.padStart(2,"0");this.wmDatepickerDateSelected.emit({date:r});var i=new CustomEvent("input");this.el.dispatchEvent(i);var a=new CustomEvent("change");this.el.dispatchEvent(a);this.closePopup(true)};e.prototype.reformatDate=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.reformatDateInternal(e,t,r)]}))}))};e.prototype.reformatDateInternal=function(e,t,r){var i=/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;if(!r){return""}else if(!i.test(r)){return r}else{var a=r.replace(/[\-\.]/gi,"/").split("/");switch(t){case"US":return a[1].padStart(2,"0")+"/"+a[2].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"INT":return a[2].padStart(2,"0")+"/"+a[1].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"ISO":if(e==="US"){return a[2].padStart(4,"20")+"-"+a[0].padStart(2,"0")+"-"+a[1].padStart(2,"0")}else if(e==="INT"){return a[2].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[0].padStart(2,"0")}else if(e==="ISO"){return a[0].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[2].padStart(2,"0")}default:return a.join("/")}}};e.prototype.isValidIso=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.isValidIsoInternal(e)]}))}))};e.prototype.isValidIsoInternal=function(e){var t=/^\d\d\d\d[-]\d\d[-]\d\d$/;if(!e||!t.test(e)){return false}else{var r=e.split("-");var i=parseInt(r[2],10);var a=parseInt(r[1],10);var o=parseInt(r[0],10);if(o<1e3||o>3e3||a==0||a>12)return false;var n=[31,28,31,30,31,30,31,31,30,31,30,31];if(o%400==0||o%100!=0&&o%4==0)n[1]=29;return i>0&&i<=n[a-1]}};e.prototype.componentWillLoad=function(){if(this.label===""){console.error("You must include a label prop for the datepicker input (for accessibility reasons), even if the label position is none.")}l(this.el,this.isDisabled)};e.prototype.componentDidLoad=function(){var e=this;this.calEl.addEventListener("click",(function(){e.popupClicked=true}))};e.prototype.announce=function(e){if(this.liveRegionEl.textContent===e){e+=" "}this.liveRegionEl.textContent=e};e.prototype.render=function(){var e=this;return i(a,{"aria-busy":"false",class:"".concat(this.errorMessage?"invalid":"")},i("div",{ref:function(t){return e.dpWrapperEl=t},class:"wrapper label-".concat(this.labelPosition," ").concat(this.errorMessage?"invalid":"")},i("div",{class:"label-wrapper",ref:function(t){return e.labelWrapperEl=t}},this.labelPosition!=="none"&&i("label",{id:"datepickerLabel",htmlFor:"date-input",class:"label",title:"".concat(this.label," (").concat(this.dateFormat,")")},this.label,this.requiredField&&i("span",{"aria-hidden":"true",class:"required"},"*"))),i("div",null,i("div",{class:"single-wrapper input"},i("input",{disabled:this.isDisabled,type:"text",id:"single-date-input",class:"date-input",name:"date",placeholder:this.dateFormat,value:this.value,onFocus:function(){return e.handleInputFocus()},onInput:function(t){return e.handleInput(t)},onBlur:function(){return e.handleInputBlur()},onChange:function(){return e.handleInputChange()},ref:function(t){return e.inputEl=t},"aria-describedby":"error","aria-label":this.label,"aria-required":this.requiredField?"true":null}),i("div",{class:"container",id:"wm-container"},i("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"date-input",ref:function(t){return e.toggleEl=t},"aria-expanded":"".concat(this.isExpanded),class:"toggle",id:"toggle"},i("span",{class:"calendar",title:d.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),i("div",{class:"popup-wrapper ".concat(this.calEl&&this.calEl.view,"-view ").concat(this.openUp?"expand-upwards":""),id:"popup-wrapper",ref:function(t){return e.popupEl=t},onClick:function(){return e.popupClicked=true}},i("div",{tabIndex:0,onFocus:function(){return e.calEl.focusLastFocusable()}}),i("priv-calendar",{ref:function(t){return e.calEl=t},startDate:this.calendarDate,focusDate:this.calendarDate,class:"inside"}),i("div",{tabIndex:0,onFocus:function(){return e.calEl.focusFirstFocusable()}})),i("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),i("div",{id:"month-title",class:"sr-only"},d.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),i("div",{id:"year-title",class:"sr-only"},d.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})))),i("div",{id:"error",class:"error"},this.errorMessage),i("div",{ref:function(t){return e.liveRegionEl=t},class:"sr-only","aria-live":"polite","aria-atomic":"true"}))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["handleDisabledChange"],value:["updateValue"],errorMessage:["announceError"]}},enumerable:false,configurable:true});return e}());h.style=u}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function n(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?r(e.value):a(e.value).then(n,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,a,o,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(i=1,a&&(o=s[0]&2?a["return"]:s[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,s[1])).done)return o;if(a=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js"],(function(e){"use strict";var t,r,i,a,o,n,s,l,c,p,d;return{setters:[function(e){t=e.r;r=e.c;i=e.h;a=e.H;o=e.g},function(e){n=e.t;s=e.j;l=e.a;c=e.k;p=e.l;d=e.i}],execute:function(){var u=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:"start-label-wrapper . end-label-wrapper" "start-date-input hyphen end-date-input"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:"start-label-wrapper . end-label-wrapper ." "start-date-input hyphen end-date-input toggle-wrapper"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var h=e("wm_datepicker",function(){function e(e){t(this,e);this.wmDatepickerDateSelected=r(this,"wmDatepickerDateSelected",7);this.wmDatepickerInputBlurred=r(this,"wmDatepickerInputBlurred",7);this.openUp=false;this.popupClicked=false;this.toggleButtonClicked=false;this.value="";this.disabled=false;this.dateFormat="mm/dd/yyyy";this.errorMessage=undefined;this.labelPosition="top";this.label="";this.requiredField=false;this.preselected=undefined;this.isExpanded=false}Object.defineProperty(e.prototype,"isDisabled",{get:function(){return n(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"calendarDate",{get:function(){var e=s(new Date);var t={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"};if(this.value&&t[this.dateFormat]&&this.isValidIsoInternal(this.reformatDateInternal(t[this.dateFormat],"ISO",this.value))){e=this.reformatDateInternal(t[this.dateFormat],"ISO",this.value)}else if(this.preselected){e=this.preselected}return e},enumerable:false,configurable:true});e.prototype.handleDisabledChange=function(){l(this.el,this.isDisabled)};e.prototype.updateValue=function(){this.inputEl.value=this.value?this.value:""};e.prototype.announceError=function(){var e=this;if(this.errorMessage){setTimeout((function(){return e.announce(e.errorMessage)}),100)}};e.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.toggleButtonClicked=true};e.prototype.closePopup=function(e){var t=this;if(e===void 0){e=false}this.isExpanded=false;this.calEl.view="day";this.calEl.view="day";this.popupEl.classList.remove("open");window.setTimeout((function(){t.popupEl.style.visibility="hidden"}),250);if(e){this.toggleEl.focus()}};e.prototype.openPopup=function(){var e=this;this.openUp=c(this.el,this.popupEl.clientHeight,this.labelWrapperEl.clientHeight);if(p(this.el,336)){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else{this.popupEl.style.right="0";this.popupEl.style.left="auto"}this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){e.popupEl.classList.add("open")}));this.isExpanded=true;this.calEl.focusDate=this.calendarDate;this.calEl.startDate=this.calendarDate;this.calEl.focusCell()};e.prototype.handleInput=function(e){this.value=e.target.value};e.prototype.handleInputBlur=function(){this.dpWrapperEl.classList.remove("focus");this.wmDatepickerInputBlurred.emit()};e.prototype.handleInputFocus=function(){this.dpWrapperEl.classList.add("focus")};e.prototype.handleInputChange=function(){var e=new CustomEvent("change");this.el.dispatchEvent(e)};e.prototype.handleKey=function(e){switch(e.key){case"Escape":e.preventDefault();e.stopPropagation();this.closePopup(true);break}};e.prototype.blurHandler=function(){if(!this.popupClicked&&!this.toggleButtonClicked&&this.isExpanded){this.closePopup()}this.popupClicked=false;this.toggleButtonClicked=false};e.prototype.handleBlurOnWindow=function(){if(this.isExpanded){this.closePopup()}};e.prototype.handleCellTriggered=function(e){var t=e.detail.cell;var r=t.getAttribute("data-year")+"-"+t.getAttribute("data-month")+"-"+t.textContent.padStart(2,"0");this.wmDatepickerDateSelected.emit({date:r});var i=new CustomEvent("input");this.el.dispatchEvent(i);var a=new CustomEvent("change");this.el.dispatchEvent(a);this.closePopup(true)};e.prototype.reformatDate=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.reformatDateInternal(e,t,r)]}))}))};e.prototype.reformatDateInternal=function(e,t,r){var i=/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;if(!r){return""}else if(!i.test(r)){return r}else{var a=r.replace(/[\-\.]/gi,"/").split("/");switch(t){case"US":return a[1].padStart(2,"0")+"/"+a[2].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"INT":return a[2].padStart(2,"0")+"/"+a[1].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"ISO":if(e==="US"){return a[2].padStart(4,"20")+"-"+a[0].padStart(2,"0")+"-"+a[1].padStart(2,"0")}else if(e==="INT"){return a[2].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[0].padStart(2,"0")}else if(e==="ISO"){return a[0].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[2].padStart(2,"0")}default:return a.join("/")}}};e.prototype.isValidIso=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.isValidIsoInternal(e)]}))}))};e.prototype.isValidIsoInternal=function(e){var t=/^\d\d\d\d[-]\d\d[-]\d\d$/;if(!e||!t.test(e)){return false}else{var r=e.split("-");var i=parseInt(r[2],10);var a=parseInt(r[1],10);var o=parseInt(r[0],10);if(o<1e3||o>3e3||a==0||a>12)return false;var n=[31,28,31,30,31,30,31,31,30,31,30,31];if(o%400==0||o%100!=0&&o%4==0)n[1]=29;return i>0&&i<=n[a-1]}};e.prototype.componentWillLoad=function(){if(this.label===""){console.error("You must include a label prop for the datepicker input (for accessibility reasons), even if the label position is none.")}l(this.el,this.isDisabled)};e.prototype.componentDidLoad=function(){var e=this;this.calEl.addEventListener("click",(function(){e.popupClicked=true}))};e.prototype.announce=function(e){if(this.liveRegionEl.textContent===e){e+=" "}this.liveRegionEl.textContent=e};e.prototype.render=function(){var e=this;return i(a,{"aria-busy":"false",class:"".concat(this.errorMessage?"invalid":"")},i("div",{ref:function(t){return e.dpWrapperEl=t},class:"wrapper label-".concat(this.labelPosition," ").concat(this.errorMessage?"invalid":"")},i("div",{class:"label-wrapper",ref:function(t){return e.labelWrapperEl=t}},this.labelPosition!=="none"&&i("label",{id:"datepickerLabel",htmlFor:"date-input",class:"label",title:"".concat(this.label," (").concat(this.dateFormat,")")},this.label,this.requiredField&&i("span",{"aria-hidden":"true",class:"required"},"*"))),i("div",null,i("div",{class:"single-wrapper input"},i("input",{disabled:this.isDisabled,type:"text",id:"single-date-input",class:"date-input",name:"date",placeholder:this.dateFormat,value:this.value,onFocus:function(){return e.handleInputFocus()},onInput:function(t){return e.handleInput(t)},onBlur:function(){return e.handleInputBlur()},onChange:function(){return e.handleInputChange()},ref:function(t){return e.inputEl=t},"aria-describedby":"error","aria-label":this.label,"aria-required":this.requiredField?"true":null}),i("div",{class:"container",id:"wm-container"},i("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-label":d.formatMessage({id:"date.selectDate",defaultMessage:"Select date",description:"Button text for screen readers."}),"aria-describedby":"single-date-input",ref:function(t){return e.toggleEl=t},"aria-expanded":"".concat(this.isExpanded),class:"toggle",id:"toggle"},i("span",{class:"calendar",title:d.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),i("div",{class:"popup-wrapper ".concat(this.calEl&&this.calEl.view,"-view ").concat(this.openUp?"expand-upwards":""),id:"popup-wrapper",ref:function(t){return e.popupEl=t},onClick:function(){return e.popupClicked=true}},i("div",{tabIndex:0,onFocus:function(){return e.calEl.focusLastFocusable()}}),i("priv-calendar",{ref:function(t){return e.calEl=t},startDate:this.calendarDate,focusDate:this.calendarDate,class:"inside"}),i("div",{tabIndex:0,onFocus:function(){return e.calEl.focusFirstFocusable()}})),i("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),i("div",{id:"month-title",class:"sr-only"},d.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),i("div",{id:"year-title",class:"sr-only"},d.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})))),i("div",{id:"error",class:"error"},this.errorMessage),i("div",{ref:function(t){return e.liveRegionEl=t},class:"sr-only","aria-live":"polite","aria-atomic":"true"}))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["handleDisabledChange"],value:["updateValue"],errorMessage:["announceError"]}},enumerable:false,configurable:true});return e}());h.style=u}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,r,i){function a(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,n){function o(t){try{l(i.next(t))}catch(t){n(t)}}function s(t){try{l(i["throw"](t))}catch(t){n(t)}}function l(t){t.done?r(t.value):a(t.value).then(o,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return l([t,e])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(i=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];a=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js"],(function(t){"use strict";var e,r,i,a,n,o,s,l,d,c,u,p,h,f,w;return{setters:[function(t){e=t.r;r=t.c;i=t.h;a=t.F;n=t.H;o=t.g},function(t){s=t.t;l=t.j;d=t.a;c=t.k;u=t.A;p=t.B;h=t.C;f=t.D;w=t.i}],execute:function(){var m=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:"start-label-wrapper . end-label-wrapper" "start-date-input hyphen end-date-input"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:"start-label-wrapper . end-label-wrapper ." "start-date-input hyphen end-date-input toggle-wrapper"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var b=t("wm_date_range",function(){function t(t){e(this,t);this.wmRangeSelection=r(this,"wmRangeSelection",7);this.wmStartInputBlur=r(this,"wmStartInputBlur",7);this.wmEndInputBlur=r(this,"wmEndInputBlur",7);this.openUp=false;this.calWidth=681;this.popupClicked=false;this.toggleButtonClicked=false;this.formats={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"};this.dateFormat="mm/dd/yyyy";this.disabled=false;this.errorMessage=undefined;this.invalidStart=false;this.invalidEnd=false;this.labelStart="";this.labelEnd="";this.preselected=undefined;this.requiredField=false;this.valueStart="";this.valueEnd="";this.availSpace=0;this.isExpanded=false}Object.defineProperty(t.prototype,"_disabled",{get:function(){return s(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"focusDates",{get:function(){var t=this.toISO(this.valueStart);var e=l(new Date);if(this._isValidISO(t)){e=t}else if(this.preselected&&this._isValidISO(this.preselected)){e=this.preselected}var r=this.toJSDate(e);if(r.getUTCMonth()==11){r.setYear(r.getUTCFullYear()+1)}r.setMonth((r.getUTCMonth()+1)%12,1);var i=l(r);var a=this.toISO(this.valueEnd);if(this._isValidISO(a)){var n=this.isSameMonth(e,a);if(!n){i=a;if(!t){var o=this.toJSDate(i);var s=o.getUTCMonth()-1;if(s==-1){s=11;o.setYear(o.getUTCFullYear()-1)}o.setMonth(s,1);e=l(o)}}}return[e,i]},enumerable:false,configurable:true});t.prototype.isSameMonth=function(t,e){if(t&&e){return t.slice(0,-3)===e.slice(0,-3)}else{return false}};t.prototype.toJSDate=function(t){if(t&&this._isValidISO(t)){var e=new Date;e.setUTCFullYear(parseInt(t.split("-")[0]),parseInt(t.split("-")[1])-1,parseInt(t.split("-")[2]));return e}else{return undefined}};t.prototype.toISO=function(t){return this._reformatDate(this.formats[this.dateFormat],"ISO",t)};t.prototype.handleDisabled=function(){d(this.el,this._disabled)};t.prototype.updateValueStart=function(){this.startInputEl.value=this.valueStart?this.valueStart:""};t.prototype.updateValueEnd=function(){this.endInputEl.value=this.valueEnd?this.valueEnd:""};t.prototype.handleErrorMessage=function(){var t=this;if(this.errorMessage){setTimeout((function(){return t.announce(t.errorMessage)}),100)}};t.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.toggleButtonClicked=true};t.prototype.closePopup=function(t){var e=this;if(t===void 0){t=false}this.date1=undefined;this.date2=undefined;this.startCalEl.startDate=undefined;this.startCalEl.endDate=undefined;this.startCalEl.hoverDate=undefined;this.endCalEl.startDate=undefined;this.endCalEl.endDate=undefined;this.endCalEl.hoverDate=undefined;this.isExpanded=false;this.startCalEl.view="day";this.endCalEl.view="day";this.popupEl.classList.remove("open");window.setTimeout((function(){e.popupEl.style.visibility="hidden"}),250);if(t){this.toggleEl.focus()}};t.prototype.openPopup=function(){var t=this;this.openUp=c(this.el,this.popupEl.clientHeight,this.labelEl.clientHeight);var e=u(this.el),r=e.spaceLeft,i=e.spaceRight;if(i>=this.calWidth-this.el.clientWidth){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else if(r>=this.calWidth-this.el.clientWidth){this.popupEl.style.right="0";this.popupEl.style.left="auto"}else{var a=(this.availSpace-this.calWidth)/2-r;this.popupEl.style.left="".concat(a,"px");this.popupEl.style.right="auto"}this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){t.popupEl.classList.add("open")}));this.isExpanded=true;this.startCalEl.focusDate=this.focusDates[0];this.endCalEl.focusDate=this.focusDates[1];this.startCalEl.focusCell();if(this.valueStart){var n=this.toISO(this.valueStart);if(this._isValidISO(n)){this.startCalEl.startDate=n}if(this.valueEnd){var o=this.toISO(this.valueEnd);if(this._isValidISO(o)){if(this.isSameMonth(n,o)){this.startCalEl.endDate=o}else{this.endCalEl.endDate=o}}}}};t.prototype.handleFocus=function(){this.wrapperEl.classList.add("focus")};t.prototype.handleBlur=function(){this.wrapperEl.classList.remove("focus")};t.prototype.handleStartInputBlur=function(){this.wmStartInputBlur.emit()};t.prototype.handleEndInputBlur=function(){this.wmEndInputBlur.emit()};t.prototype.handleStartInput=function(t){this.valueStart=t.target.value};t.prototype.handleEndInput=function(t){this.valueEnd=t.target.value};t.prototype.handleKey=function(t){switch(t.key){case"Escape":t.preventDefault();t.stopPropagation();this.closePopup(true);break}};t.prototype.blurHandler=function(){if(!this.popupClicked&&!this.toggleButtonClicked&&this.isExpanded){this.closePopup()}this.popupClicked=false;this.toggleButtonClicked=false};t.prototype.handleBlurOnWindow=function(){if(this.isExpanded){this.closePopup()}};t.prototype.handleDateFocus=function(t){var e=t.target;var r=e.focusDate;var i=this.startCalEl.focusDate.slice(0,-3);var a=this.endCalEl.focusDate.slice(0,-3);if(e==this.startCalEl){if(i>=a){this.endCalEl.focusDate=p.month.increase(this.startCalEl.focusDate,1)}}else if(e==this.endCalEl){if(a<=i){this.startCalEl.focusDate=p.month.decrease(this.endCalEl.focusDate,1)}}if(this.oldFocusVal){var n=p.year.asInt(r);var o=p.year.asInt(this.oldFocusVal);var s=p.month.asInt(r);var l=p.month.asInt(this.oldFocusVal);if(e.view==="day"){if(n!=o||s!=l){this.liveRegionEl.innerHTML="Viewing ".concat(h[s-1],", ").concat(n)}}else{if(n!=o){this.liveRegionEl.innerHTML="".concat(n," selected.")}else if(s!=l){this.liveRegionEl.innerHTML="".concat(h[s-1],", ").concat(n)}}}this.oldFocusVal=e.focusDate};t.prototype.handlePopupBlurred=function(t){if(t.detail.relatedTarget!==this.el){var e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget;this.el.dispatchEvent(e)}};t.prototype.handleCellTriggered=function(t){var e=t.detail.cal;var r=t.detail.cell;var i=r.getAttribute("data-year")+"-"+r.getAttribute("data-month")+"-"+r.textContent.padStart(2,"0");if(this.startCalEl.endDate||this.endCalEl.endDate){this.startCalEl.startDate=undefined;this.startCalEl.endDate=undefined;this.endCalEl.startDate=undefined;this.endCalEl.endDate=undefined;e.startDate=i;this.date1=i;this.date2=undefined}else if(this.date1&&i!==this.date1){if(this.date1>i){this.date2=this.date1;this.date1=i}else{this.date2=i}var a={startDate:{iso:this.date1,us:this._reformatDate("ISO","US",this.date1),int:this._reformatDate("ISO","INT",this.date1)},endDate:{iso:this.date2,us:this._reformatDate("ISO","US",this.date2),int:this._reformatDate("ISO","INT",this.date2)}};this.wmRangeSelection.emit(a);this.closePopup(true);this.date1=undefined;this.date2=undefined}else{e.startDate=i;this.date1=i}var n=new CustomEvent("input");this.el.dispatchEvent(n);var o=new CustomEvent("change");this.el.dispatchEvent(o)};t.prototype.handleOutOfCal=function(){this.startCalEl.hoverDate=undefined;this.endCalEl.hoverDate=undefined};t.prototype.handleCellHovered=function(t){this.startCalEl.hoverDate=this.startCalEl.startDate===t.detail?undefined:t.detail;this.endCalEl.hoverDate=this.endCalEl.startDate===t.detail?undefined:t.detail};t.prototype.reformatDate=function(t,e,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this._reformatDate(t,e,r)]}))}))};t.prototype._reformatDate=function(t,e,r){if(t!=="ISO"&&e!=="ISO")return"";if(!t||!e||!r)return"";var i=/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;if(!i.test(r)){return r}else{var a=r.replace(/[\-\.]/gi,"/").split("/");switch(e){case"US":return a[1].padStart(2,"0")+"/"+a[2].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"INT":return a[2].padStart(2,"0")+"/"+a[1].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"ISO":if(t==="US"){return a[2].padStart(4,"20")+"-"+a[0].padStart(2,"0")+"-"+a[1].padStart(2,"0")}else if(t==="INT"){return a[2].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[0].padStart(2,"0")}else if(t==="ISO"){return a[0].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[2].padStart(2,"0")}default:return a.join("/")}}};t.prototype.isValidISO=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this._isValidISO(t)]}))}))};t.prototype._isValidISO=function(t){var e=/^\d\d\d\d[-]\d\d[-]\d\d$/;if(!t||!e.test(t)){return false}else{var r=t.split("-");var i=parseInt(r[2],10);var a=parseInt(r[1],10);var n=parseInt(r[0],10);if(n<1e3||n>3e3||a==0||a>12)return false;var o=[31,28,31,30,31,30,31,31,30,31,30,31];if(n%400==0||n%100!=0&&n%4==0)o[1]=29;return i>0&&i<=o[a-1]}};t.prototype.setAvailSpace=function(){this.availSpace=(this.hiddenOverflowParent||document.body).clientWidth};t.prototype.componentWillLoad=function(){var t=this;if(this.labelStart===""||this.labelEnd===""){console.error("For accessibility reasons you must specify labels for the date range inputs.")}d(this.el,this._disabled);this.hiddenOverflowParent=f(this.el);if(this.hiddenOverflowParent){var e=new ResizeObserver((function(){t.availSpace=t.hiddenOverflowParent.clientWidth}));e.observe(this.hiddenOverflowParent)}this.setAvailSpace()};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.liveRegionEl.textContent=t};t.prototype.renderCalendars=function(){var t=this;if(this.calWidth<=this.availSpace){return i(a,null,i("div",{class:"popup-wrapper ".concat(this.startCalEl&&this.startCalEl.view,"-view ").concat(this.openUp?"expand-upwards":""),id:"popup-wrapper",ref:function(e){return t.popupEl=e},onClick:function(){return t.popupClicked=true},style:{display:"flex"}},i("div",{class:"trapfocus",tabIndex:this.isExpanded?0:undefined,onFocus:function(){return t.endCalEl.focusLastFocusable()}}),i("priv-calendar",{ref:function(e){return t.startCalEl=e},onClick:function(){return t.popupClicked=true},onDateFocus:function(e){return t.handleDateFocus(e)}}),i("priv-calendar",{ref:function(e){return t.endCalEl=e},onClick:function(){return t.popupClicked=true},onDateFocus:function(e){return t.handleDateFocus(e)}}),i("div",{class:"trapfocus",tabIndex:this.isExpanded?0:undefined,onFocus:function(){return t.startCalEl.focusFirstFocusable()}})))}};t.prototype.render=function(){var t=this;return i(n,{"aria-busy":"false"},i("div",{ref:function(e){return t.wrapperEl=e},class:"wrapper"},i("div",{class:"range-wrapper ".concat(this.calWidth<=this.availSpace?"cal":"")},i("div",{class:"label-wrapper",id:"start-label-wrapper"},i("label",{ref:function(e){return t.labelEl=e},id:"startlabel",htmlFor:"start-date-input",class:"label",title:"".concat(this.labelStart," (").concat(this.dateFormat,")")},this.labelStart,this.requiredField&&i("span",{"aria-hidden":"true",class:"required"},"*"))),i("div",{class:"label-wrapper",id:"end-label-wrapper"},i("label",{id:"endlabel",htmlFor:"end-date-input",class:"label",title:"".concat(this.labelEnd," (").concat(this.dateFormat,")")},this.labelEnd,this.requiredField&&i("span",{"aria-hidden":"true",class:"required"},"*"))),i("input",{disabled:this._disabled,type:"text",id:"start-date-input",class:"date-input input ".concat(this.invalidStart?"invalid":""),name:"start-date",placeholder:this.dateFormat,value:this.valueStart,onFocus:function(){return t.handleFocus()},onInput:function(e){return t.handleStartInput(e)},onBlur:function(){return t.handleStartInputBlur()},ref:function(e){return t.startInputEl=e},"aria-describedby":"error","aria-label":this.labelStart,"aria-required":this.requiredField?"true":null}),i("div",{id:"hyphen"}," - "),i("input",{disabled:this._disabled,type:"text",id:"end-date-input",class:"date-input input ".concat(this.invalidEnd?"invalid":""),name:"end-date",placeholder:this.dateFormat,value:this.valueEnd,onFocus:function(){return t.handleFocus()},onInput:function(e){return t.handleEndInput(e)},onBlur:function(){return t.handleEndInputBlur()},ref:function(e){return t.endInputEl=e},"aria-describedby":"error","aria-label":this.labelEnd,"aria-required":this.requiredField?"true":null}),i("div",{class:"toggle-wrapper",id:"toggle-wrapper"},this.calWidth<=this.availSpace&&i("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"date-input",ref:function(e){return t.toggleEl=e},"aria-expanded":"".concat(this.isExpanded),class:"toggle",id:"toggle"},i("span",{class:"calendar",title:w.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})}))),this.renderCalendars()),i("div",null,i("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),i("div",{id:"month-title",class:"sr-only"},w.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),i("div",{id:"year-title",class:"sr-only"},w.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"}))),i("div",{id:"error",class:"error"},this.errorMessage),i("div",{ref:function(e){return t.liveRegionEl=e},class:"sr-only","aria-live":"polite","aria-atomic":"true"})))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:["handleDisabled"],valueStart:["updateValueStart"],valueEnd:["updateValueEnd"],errorMessage:["handleErrorMessage"]}},enumerable:false,configurable:true});return t}());b.style=m}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,r,i){function a(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,n){function o(t){try{l(i.next(t))}catch(t){n(t)}}function s(t){try{l(i["throw"](t))}catch(t){n(t)}}function l(t){t.done?r(t.value):a(t.value).then(o,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return l([t,e])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(i=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];a=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js"],(function(t){"use strict";var e,r,i,a,n,o,s,l,d,c,u,p,h,f,w;return{setters:[function(t){e=t.r;r=t.c;i=t.h;a=t.F;n=t.H;o=t.g},function(t){s=t.t;l=t.j;d=t.a;c=t.k;u=t.A;p=t.B;h=t.C;f=t.D;w=t.i}],execute:function(){var m=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:"start-label-wrapper . end-label-wrapper" "start-date-input hyphen end-date-input"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:"start-label-wrapper . end-label-wrapper ." "start-date-input hyphen end-date-input toggle-wrapper"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var b=t("wm_date_range",function(){function t(t){e(this,t);this.wmRangeSelection=r(this,"wmRangeSelection",7);this.wmStartInputBlur=r(this,"wmStartInputBlur",7);this.wmEndInputBlur=r(this,"wmEndInputBlur",7);this.openUp=false;this.calWidth=681;this.popupClicked=false;this.toggleButtonClicked=false;this.formats={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"};this.dateFormat="mm/dd/yyyy";this.disabled=false;this.errorMessage=undefined;this.invalidStart=false;this.invalidEnd=false;this.labelStart="";this.labelEnd="";this.preselected=undefined;this.requiredField=false;this.valueStart="";this.valueEnd="";this.availSpace=0;this.isExpanded=false}Object.defineProperty(t.prototype,"_disabled",{get:function(){return s(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"focusDates",{get:function(){var t=this.toISO(this.valueStart);var e=l(new Date);if(this._isValidISO(t)){e=t}else if(this.preselected&&this._isValidISO(this.preselected)){e=this.preselected}var r=this.toJSDate(e);if(r.getUTCMonth()==11){r.setYear(r.getUTCFullYear()+1)}r.setMonth((r.getUTCMonth()+1)%12,1);var i=l(r);var a=this.toISO(this.valueEnd);if(this._isValidISO(a)){var n=this.isSameMonth(e,a);if(!n){i=a;if(!t){var o=this.toJSDate(i);var s=o.getUTCMonth()-1;if(s==-1){s=11;o.setYear(o.getUTCFullYear()-1)}o.setMonth(s,1);e=l(o)}}}return[e,i]},enumerable:false,configurable:true});t.prototype.isSameMonth=function(t,e){if(t&&e){return t.slice(0,-3)===e.slice(0,-3)}else{return false}};t.prototype.toJSDate=function(t){if(t&&this._isValidISO(t)){var e=new Date;e.setUTCFullYear(parseInt(t.split("-")[0]),parseInt(t.split("-")[1])-1,parseInt(t.split("-")[2]));return e}else{return undefined}};t.prototype.toISO=function(t){return this._reformatDate(this.formats[this.dateFormat],"ISO",t)};t.prototype.handleDisabled=function(){d(this.el,this._disabled)};t.prototype.updateValueStart=function(){this.startInputEl.value=this.valueStart?this.valueStart:""};t.prototype.updateValueEnd=function(){this.endInputEl.value=this.valueEnd?this.valueEnd:""};t.prototype.handleErrorMessage=function(){var t=this;if(this.errorMessage){setTimeout((function(){return t.announce(t.errorMessage)}),100)}};t.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.toggleButtonClicked=true};t.prototype.closePopup=function(t){var e=this;if(t===void 0){t=false}this.date1=undefined;this.date2=undefined;this.startCalEl.startDate=undefined;this.startCalEl.endDate=undefined;this.startCalEl.hoverDate=undefined;this.endCalEl.startDate=undefined;this.endCalEl.endDate=undefined;this.endCalEl.hoverDate=undefined;this.isExpanded=false;this.startCalEl.view="day";this.endCalEl.view="day";this.popupEl.classList.remove("open");window.setTimeout((function(){e.popupEl.style.visibility="hidden"}),250);if(t){this.toggleEl.focus()}};t.prototype.openPopup=function(){var t=this;this.openUp=c(this.el,this.popupEl.clientHeight,this.labelEl.clientHeight);var e=u(this.el),r=e.spaceLeft,i=e.spaceRight;if(i>=this.calWidth-this.el.clientWidth){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else if(r>=this.calWidth-this.el.clientWidth){this.popupEl.style.right="0";this.popupEl.style.left="auto"}else{var a=(this.availSpace-this.calWidth)/2-r;this.popupEl.style.left="".concat(a,"px");this.popupEl.style.right="auto"}this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){t.popupEl.classList.add("open")}));this.isExpanded=true;this.startCalEl.focusDate=this.focusDates[0];this.endCalEl.focusDate=this.focusDates[1];this.startCalEl.focusCell();if(this.valueStart){var n=this.toISO(this.valueStart);if(this._isValidISO(n)){this.startCalEl.startDate=n}if(this.valueEnd){var o=this.toISO(this.valueEnd);if(this._isValidISO(o)){if(this.isSameMonth(n,o)){this.startCalEl.endDate=o}else{this.endCalEl.endDate=o}}}}};t.prototype.handleFocus=function(){this.wrapperEl.classList.add("focus")};t.prototype.handleBlur=function(){this.wrapperEl.classList.remove("focus")};t.prototype.handleStartInputBlur=function(){this.wmStartInputBlur.emit()};t.prototype.handleEndInputBlur=function(){this.wmEndInputBlur.emit()};t.prototype.handleStartInput=function(t){this.valueStart=t.target.value};t.prototype.handleEndInput=function(t){this.valueEnd=t.target.value};t.prototype.handleKey=function(t){switch(t.key){case"Escape":t.preventDefault();t.stopPropagation();this.closePopup(true);break}};t.prototype.blurHandler=function(){if(!this.popupClicked&&!this.toggleButtonClicked&&this.isExpanded){this.closePopup()}this.popupClicked=false;this.toggleButtonClicked=false};t.prototype.handleBlurOnWindow=function(){if(this.isExpanded){this.closePopup()}};t.prototype.handleDateFocus=function(t){var e=t.target;var r=e.focusDate;var i=this.startCalEl.focusDate.slice(0,-3);var a=this.endCalEl.focusDate.slice(0,-3);if(e==this.startCalEl){if(i>=a){this.endCalEl.focusDate=p.month.increase(this.startCalEl.focusDate,1)}}else if(e==this.endCalEl){if(a<=i){this.startCalEl.focusDate=p.month.decrease(this.endCalEl.focusDate,1)}}if(this.oldFocusVal){var n=p.year.asInt(r);var o=p.year.asInt(this.oldFocusVal);var s=p.month.asInt(r);var l=p.month.asInt(this.oldFocusVal);if(e.view==="day"){if(n!=o||s!=l){this.liveRegionEl.innerHTML="Viewing ".concat(h[s-1],", ").concat(n)}}else{if(n!=o){this.liveRegionEl.innerHTML="".concat(n," selected.")}else if(s!=l){this.liveRegionEl.innerHTML="".concat(h[s-1],", ").concat(n)}}}this.oldFocusVal=e.focusDate};t.prototype.handlePopupBlurred=function(t){if(t.detail.relatedTarget!==this.el){var e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget;this.el.dispatchEvent(e)}};t.prototype.handleCellTriggered=function(t){var e=t.detail.cal;var r=t.detail.cell;var i=r.getAttribute("data-year")+"-"+r.getAttribute("data-month")+"-"+r.textContent.padStart(2,"0");if(this.startCalEl.endDate||this.endCalEl.endDate){this.startCalEl.startDate=undefined;this.startCalEl.endDate=undefined;this.endCalEl.startDate=undefined;this.endCalEl.endDate=undefined;e.startDate=i;this.date1=i;this.date2=undefined}else if(this.date1&&i!==this.date1){if(this.date1>i){this.date2=this.date1;this.date1=i}else{this.date2=i}var a={startDate:{iso:this.date1,us:this._reformatDate("ISO","US",this.date1),int:this._reformatDate("ISO","INT",this.date1)},endDate:{iso:this.date2,us:this._reformatDate("ISO","US",this.date2),int:this._reformatDate("ISO","INT",this.date2)}};this.wmRangeSelection.emit(a);this.closePopup(true);this.date1=undefined;this.date2=undefined}else{e.startDate=i;this.date1=i}var n=new CustomEvent("input");this.el.dispatchEvent(n);var o=new CustomEvent("change");this.el.dispatchEvent(o)};t.prototype.handleOutOfCal=function(){this.startCalEl.hoverDate=undefined;this.endCalEl.hoverDate=undefined};t.prototype.handleCellHovered=function(t){this.startCalEl.hoverDate=this.startCalEl.startDate===t.detail?undefined:t.detail;this.endCalEl.hoverDate=this.endCalEl.startDate===t.detail?undefined:t.detail};t.prototype.reformatDate=function(t,e,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this._reformatDate(t,e,r)]}))}))};t.prototype._reformatDate=function(t,e,r){if(t!=="ISO"&&e!=="ISO")return"";if(!t||!e||!r)return"";var i=/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;if(!i.test(r)){return r}else{var a=r.replace(/[\-\.]/gi,"/").split("/");switch(e){case"US":return a[1].padStart(2,"0")+"/"+a[2].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"INT":return a[2].padStart(2,"0")+"/"+a[1].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"ISO":if(t==="US"){return a[2].padStart(4,"20")+"-"+a[0].padStart(2,"0")+"-"+a[1].padStart(2,"0")}else if(t==="INT"){return a[2].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[0].padStart(2,"0")}else if(t==="ISO"){return a[0].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[2].padStart(2,"0")}default:return a.join("/")}}};t.prototype.isValidISO=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this._isValidISO(t)]}))}))};t.prototype._isValidISO=function(t){var e=/^\d\d\d\d[-]\d\d[-]\d\d$/;if(!t||!e.test(t)){return false}else{var r=t.split("-");var i=parseInt(r[2],10);var a=parseInt(r[1],10);var n=parseInt(r[0],10);if(n<1e3||n>3e3||a==0||a>12)return false;var o=[31,28,31,30,31,30,31,31,30,31,30,31];if(n%400==0||n%100!=0&&n%4==0)o[1]=29;return i>0&&i<=o[a-1]}};t.prototype.setAvailSpace=function(){this.availSpace=(this.hiddenOverflowParent||document.body).clientWidth};t.prototype.componentWillLoad=function(){var t=this;if(this.labelStart===""||this.labelEnd===""){console.error("For accessibility reasons you must specify labels for the date range inputs.")}d(this.el,this._disabled);this.hiddenOverflowParent=f(this.el);if(this.hiddenOverflowParent){var e=new ResizeObserver((function(){t.availSpace=t.hiddenOverflowParent.clientWidth}));e.observe(this.hiddenOverflowParent)}this.setAvailSpace()};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.liveRegionEl.textContent=t};t.prototype.renderCalendars=function(){var t=this;if(this.calWidth<=this.availSpace){return i(a,null,i("div",{class:"popup-wrapper ".concat(this.startCalEl&&this.startCalEl.view,"-view ").concat(this.openUp?"expand-upwards":""),id:"popup-wrapper",ref:function(e){return t.popupEl=e},onClick:function(){return t.popupClicked=true},style:{display:"flex"}},i("div",{class:"trapfocus",tabIndex:this.isExpanded?0:undefined,onFocus:function(){return t.endCalEl.focusLastFocusable()}}),i("priv-calendar",{ref:function(e){return t.startCalEl=e},onClick:function(){return t.popupClicked=true},onDateFocus:function(e){return t.handleDateFocus(e)}}),i("priv-calendar",{ref:function(e){return t.endCalEl=e},onClick:function(){return t.popupClicked=true},onDateFocus:function(e){return t.handleDateFocus(e)}}),i("div",{class:"trapfocus",tabIndex:this.isExpanded?0:undefined,onFocus:function(){return t.startCalEl.focusFirstFocusable()}})))}};t.prototype.render=function(){var t=this;return i(n,{"aria-busy":"false"},i("div",{ref:function(e){return t.wrapperEl=e},class:"wrapper"},i("div",{class:"range-wrapper ".concat(this.calWidth<=this.availSpace?"cal":"")},i("div",{class:"label-wrapper",id:"start-label-wrapper"},i("label",{ref:function(e){return t.labelEl=e},id:"startlabel",htmlFor:"start-date-input",class:"label",title:"".concat(this.labelStart," (").concat(this.dateFormat,")")},this.labelStart,this.requiredField&&i("span",{"aria-hidden":"true",class:"required"},"*"))),i("div",{class:"label-wrapper",id:"end-label-wrapper"},i("label",{id:"endlabel",htmlFor:"end-date-input",class:"label",title:"".concat(this.labelEnd," (").concat(this.dateFormat,")")},this.labelEnd,this.requiredField&&i("span",{"aria-hidden":"true",class:"required"},"*"))),i("input",{disabled:this._disabled,type:"text",id:"start-date-input",class:"date-input input ".concat(this.invalidStart?"invalid":""),name:"start-date",placeholder:this.dateFormat,value:this.valueStart,onFocus:function(){return t.handleFocus()},onInput:function(e){return t.handleStartInput(e)},onBlur:function(){return t.handleStartInputBlur()},ref:function(e){return t.startInputEl=e},"aria-describedby":"error","aria-label":this.labelStart,"aria-required":this.requiredField?"true":null}),i("div",{id:"hyphen"}," - "),i("input",{disabled:this._disabled,type:"text",id:"end-date-input",class:"date-input input ".concat(this.invalidEnd?"invalid":""),name:"end-date",placeholder:this.dateFormat,value:this.valueEnd,onFocus:function(){return t.handleFocus()},onInput:function(e){return t.handleEndInput(e)},onBlur:function(){return t.handleEndInputBlur()},ref:function(e){return t.endInputEl=e},"aria-describedby":"error","aria-label":this.labelEnd,"aria-required":this.requiredField?"true":null}),i("div",{class:"toggle-wrapper",id:"toggle-wrapper"},this.calWidth<=this.availSpace&&i("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"start-date-input end-date-input","aria-label":w.formatMessage({id:"date.selectRange",defaultMessage:"Select range",description:"Button text for screen readers."}),ref:function(e){return t.toggleEl=e},"aria-expanded":"".concat(this.isExpanded),class:"toggle",id:"toggle"},i("span",{class:"calendar",title:w.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})}))),this.renderCalendars()),i("div",null,i("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),i("div",{id:"month-title",class:"sr-only"},w.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),i("div",{id:"year-title",class:"sr-only"},w.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"}))),i("div",{id:"error",class:"error"},this.errorMessage),i("div",{ref:function(e){return t.liveRegionEl=e},class:"sr-only","aria-live":"polite","aria-atomic":"true"})))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:["handleDisabled"],valueStart:["updateValueStart"],valueEnd:["updateValueEnd"],errorMessage:["handleErrorMessage"]}},enumerable:false,configurable:true});return t}());b.style=m}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as r,F as i,H as a,g as s}from"./p-568c595f.js";import{t as o,j as n,a as l,k as d,A as p,B as h,C as c,D as u,i as m}from"./p-e995f7f0.js";const w=class{constructor(r){t(this,r),this.wmRangeSelection=e(this,"wmRangeSelection",7),this.wmStartInputBlur=e(this,"wmStartInputBlur",7),this.wmEndInputBlur=e(this,"wmEndInputBlur",7),this.openUp=!1,this.calWidth=681,this.popupClicked=!1,this.toggleButtonClicked=!1,this.formats={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"},this.dateFormat="mm/dd/yyyy",this.disabled=!1,this.errorMessage=void 0,this.invalidStart=!1,this.invalidEnd=!1,this.labelStart="",this.labelEnd="",this.preselected=void 0,this.requiredField=!1,this.valueStart="",this.valueEnd="",this.availSpace=0,this.isExpanded=!1}get _disabled(){return o(this.disabled)}get focusDates(){const t=this.toISO(this.valueStart);let e=n(new Date);this._isValidISO(t)?e=t:this.preselected&&this._isValidISO(this.preselected)&&(e=this.preselected);let r=this.toJSDate(e);11==r.getUTCMonth()&&r.setYear(r.getUTCFullYear()+1),r.setMonth((r.getUTCMonth()+1)%12,1);let i=n(r);const a=this.toISO(this.valueEnd);if(this._isValidISO(a)&&!this.isSameMonth(e,a)&&(i=a,!t)){let t=this.toJSDate(i),r=t.getUTCMonth()-1;-1==r&&(r=11,t.setYear(t.getUTCFullYear()-1)),t.setMonth(r,1),e=n(t)}return[e,i]}isSameMonth(t,e){return!(!t||!e)&&t.slice(0,-3)===e.slice(0,-3)}toJSDate(t){if(t&&this._isValidISO(t)){let e=new Date;return e.setUTCFullYear(parseInt(t.split("-")[0]),parseInt(t.split("-")[1])-1,parseInt(t.split("-")[2])),e}}toISO(t){return this._reformatDate(this.formats[this.dateFormat],"ISO",t)}handleDisabled(){l(this.el,this._disabled)}updateValueStart(){this.startInputEl.value=this.valueStart?this.valueStart:""}updateValueEnd(){this.endInputEl.value=this.valueEnd?this.valueEnd:""}handleErrorMessage(){this.errorMessage&&setTimeout((()=>this.announce(this.errorMessage)),100)}togglePopup(){this.isExpanded?this.closePopup():this.openPopup(),this.toggleButtonClicked=!0}closePopup(t=!1){this.date1=void 0,this.date2=void 0,this.startCalEl.startDate=void 0,this.startCalEl.endDate=void 0,this.startCalEl.hoverDate=void 0,this.endCalEl.startDate=void 0,this.endCalEl.endDate=void 0,this.endCalEl.hoverDate=void 0,this.isExpanded=!1,this.startCalEl.view="day",this.endCalEl.view="day",this.popupEl.classList.remove("open"),window.setTimeout((()=>{this.popupEl.style.visibility="hidden"}),250),t&&this.toggleEl.focus()}openPopup(){this.openUp=d(this.el,this.popupEl.clientHeight,this.labelEl.clientHeight);const{spaceLeft:t,spaceRight:e}=p(this.el);if(e>=this.calWidth-this.el.clientWidth?(this.popupEl.style.left="0",this.popupEl.style.right="auto"):t>=this.calWidth-this.el.clientWidth?(this.popupEl.style.right="0",this.popupEl.style.left="auto"):(this.popupEl.style.left=(this.availSpace-this.calWidth)/2-t+"px",this.popupEl.style.right="auto"),this.popupEl.style.visibility="visible",window.requestAnimationFrame((()=>{this.popupEl.classList.add("open")})),this.isExpanded=!0,this.startCalEl.focusDate=this.focusDates[0],this.endCalEl.focusDate=this.focusDates[1],this.startCalEl.focusCell(),this.valueStart){const t=this.toISO(this.valueStart);if(this._isValidISO(t)&&(this.startCalEl.startDate=t),this.valueEnd){const e=this.toISO(this.valueEnd);this._isValidISO(e)&&(this.isSameMonth(t,e)?this.startCalEl.endDate=e:this.endCalEl.endDate=e)}}}handleFocus(){this.wrapperEl.classList.add("focus")}handleBlur(){this.wrapperEl.classList.remove("focus")}handleStartInputBlur(){this.wmStartInputBlur.emit()}handleEndInputBlur(){this.wmEndInputBlur.emit()}handleStartInput(t){this.valueStart=t.target.value}handleEndInput(t){this.valueEnd=t.target.value}handleKey(t){"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.closePopup(!0))}blurHandler(){this.popupClicked||this.toggleButtonClicked||!this.isExpanded||this.closePopup(),this.popupClicked=!1,this.toggleButtonClicked=!1}handleBlurOnWindow(){this.isExpanded&&this.closePopup()}handleDateFocus(t){const e=t.target,r=e.focusDate,i=this.startCalEl.focusDate.slice(0,-3),a=this.endCalEl.focusDate.slice(0,-3);if(e==this.startCalEl?i>=a&&(this.endCalEl.focusDate=h.month.increase(this.startCalEl.focusDate,1)):e==this.endCalEl&&a<=i&&(this.startCalEl.focusDate=h.month.decrease(this.endCalEl.focusDate,1)),this.oldFocusVal){const t=h.year.asInt(r),i=h.year.asInt(this.oldFocusVal),a=h.month.asInt(r),s=h.month.asInt(this.oldFocusVal);"day"===e.view?t==i&&a==s||(this.liveRegionEl.innerHTML=`Viewing ${c[a-1]}, ${t}`):t!=i?this.liveRegionEl.innerHTML=`${t} selected.`:a!=s&&(this.liveRegionEl.innerHTML=`${c[a-1]}, ${t}`)}this.oldFocusVal=e.focusDate}handlePopupBlurred(t){if(t.detail.relatedTarget!==this.el){const e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(e)}}handleCellTriggered(t){const e=t.detail.cal,r=t.detail.cell,i=r.getAttribute("data-year")+"-"+r.getAttribute("data-month")+"-"+r.textContent.padStart(2,"0");if(this.startCalEl.endDate||this.endCalEl.endDate)this.startCalEl.startDate=void 0,this.startCalEl.endDate=void 0,this.endCalEl.startDate=void 0,this.endCalEl.endDate=void 0,e.startDate=i,this.date1=i,this.date2=void 0;else if(this.date1&&i!==this.date1){this.date1>i?(this.date2=this.date1,this.date1=i):this.date2=i;const t={startDate:{iso:this.date1,us:this._reformatDate("ISO","US",this.date1),int:this._reformatDate("ISO","INT",this.date1)},endDate:{iso:this.date2,us:this._reformatDate("ISO","US",this.date2),int:this._reformatDate("ISO","INT",this.date2)}};this.wmRangeSelection.emit(t),this.closePopup(!0),this.date1=void 0,this.date2=void 0}else e.startDate=i,this.date1=i;const a=new CustomEvent("input");this.el.dispatchEvent(a);const s=new CustomEvent("change");this.el.dispatchEvent(s)}handleOutOfCal(){this.startCalEl.hoverDate=void 0,this.endCalEl.hoverDate=void 0}handleCellHovered(t){this.startCalEl.hoverDate=this.startCalEl.startDate===t.detail?void 0:t.detail,this.endCalEl.hoverDate=this.endCalEl.startDate===t.detail?void 0:t.detail}async reformatDate(t,e,r){return this._reformatDate(t,e,r)}_reformatDate(t,e,r){if("ISO"!==t&&"ISO"!==e)return"";if(!t||!e||!r)return"";if(!/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/.test(r))return r;{const i=r.replace(/[\-\.]/gi,"/").split("/");switch(e){case"US":return i[1].padStart(2,"0")+"/"+i[2].padStart(2,"0")+"/"+i[0].padStart(4,"20");case"INT":return i[2].padStart(2,"0")+"/"+i[1].padStart(2,"0")+"/"+i[0].padStart(4,"20");case"ISO":if("US"===t)return i[2].padStart(4,"20")+"-"+i[0].padStart(2,"0")+"-"+i[1].padStart(2,"0");if("INT"===t)return i[2].padStart(4,"20")+"-"+i[1].padStart(2,"0")+"-"+i[0].padStart(2,"0");if("ISO"===t)return i[0].padStart(4,"20")+"-"+i[1].padStart(2,"0")+"-"+i[2].padStart(2,"0");default:return i.join("/")}}}async isValidISO(t){return this._isValidISO(t)}_isValidISO(t){if(t&&/^\d\d\d\d[-]\d\d[-]\d\d$/.test(t)){const e=t.split("-"),r=parseInt(e[2],10),i=parseInt(e[1],10),a=parseInt(e[0],10);if(a<1e3||a>3e3||0==i||i>12)return!1;let s=[31,28,31,30,31,30,31,31,30,31,30,31];return(a%400==0||a%100!=0&&a%4==0)&&(s[1]=29),r>0&&r<=s[i-1]}return!1}setAvailSpace(){this.availSpace=(this.hiddenOverflowParent||document.body).clientWidth}componentWillLoad(){""!==this.labelStart&&""!==this.labelEnd||console.error("For accessibility reasons you must specify labels for the date range inputs."),l(this.el,this._disabled),this.hiddenOverflowParent=u(this.el),this.hiddenOverflowParent&&new ResizeObserver((()=>{this.availSpace=this.hiddenOverflowParent.clientWidth})).observe(this.hiddenOverflowParent),this.setAvailSpace()}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionEl.textContent=t}renderCalendars(){if(this.calWidth<=this.availSpace)return r(i,null,r("div",{class:`popup-wrapper ${this.startCalEl&&this.startCalEl.view}-view ${this.openUp?"expand-upwards":""}`,id:"popup-wrapper",ref:t=>this.popupEl=t,onClick:()=>this.popupClicked=!0,style:{display:"flex"}},r("div",{class:"trapfocus",tabIndex:this.isExpanded?0:void 0,onFocus:()=>this.endCalEl.focusLastFocusable()}),r("priv-calendar",{ref:t=>this.startCalEl=t,onClick:()=>this.popupClicked=!0,onDateFocus:t=>this.handleDateFocus(t)}),r("priv-calendar",{ref:t=>this.endCalEl=t,onClick:()=>this.popupClicked=!0,onDateFocus:t=>this.handleDateFocus(t)}),r("div",{class:"trapfocus",tabIndex:this.isExpanded?0:void 0,onFocus:()=>this.startCalEl.focusFirstFocusable()})))}render(){return r(a,{"aria-busy":"false"},r("div",{ref:t=>this.wrapperEl=t,class:"wrapper"},r("div",{class:"range-wrapper "+(this.calWidth<=this.availSpace?"cal":"")},r("div",{class:"label-wrapper",id:"start-label-wrapper"},r("label",{ref:t=>this.labelEl=t,id:"startlabel",htmlFor:"start-date-input",class:"label",title:`${this.labelStart} (${this.dateFormat})`},this.labelStart,this.requiredField&&r("span",{"aria-hidden":"true",class:"required"},"*"))),r("div",{class:"label-wrapper",id:"end-label-wrapper"},r("label",{id:"endlabel",htmlFor:"end-date-input",class:"label",title:`${this.labelEnd} (${this.dateFormat})`},this.labelEnd,this.requiredField&&r("span",{"aria-hidden":"true",class:"required"},"*"))),r("input",{disabled:this._disabled,type:"text",id:"start-date-input",class:"date-input input "+(this.invalidStart?"invalid":""),name:"start-date",placeholder:this.dateFormat,value:this.valueStart,onFocus:()=>this.handleFocus(),onInput:t=>this.handleStartInput(t),onBlur:()=>this.handleStartInputBlur(),ref:t=>this.startInputEl=t,"aria-describedby":"error","aria-label":this.labelStart,"aria-required":this.requiredField?"true":null}),r("div",{id:"hyphen"}," - "),r("input",{disabled:this._disabled,type:"text",id:"end-date-input",class:"date-input input "+(this.invalidEnd?"invalid":""),name:"end-date",placeholder:this.dateFormat,value:this.valueEnd,onFocus:()=>this.handleFocus(),onInput:t=>this.handleEndInput(t),onBlur:()=>this.handleEndInputBlur(),ref:t=>this.endInputEl=t,"aria-describedby":"error","aria-label":this.labelEnd,"aria-required":this.requiredField?"true":null}),r("div",{class:"toggle-wrapper",id:"toggle-wrapper"},this.calWidth<=this.availSpace&&r("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"date-input",ref:t=>this.toggleEl=t,"aria-expanded":`${this.isExpanded}`,class:"toggle",id:"toggle"},r("span",{class:"calendar",title:m.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})}))),this.renderCalendars()),r("div",null,r("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),r("div",{id:"month-title",class:"sr-only"},m.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),r("div",{id:"year-title",class:"sr-only"},m.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"}))),r("div",{id:"error",class:"error"},this.errorMessage),r("div",{ref:t=>this.liveRegionEl=t,class:"sr-only","aria-live":"polite","aria-atomic":"true"})))}static get delegatesFocus(){return!0}get el(){return s(this)}static get watchers(){return{disabled:["handleDisabled"],valueStart:["updateValueStart"],valueEnd:["updateValueEnd"],errorMessage:["handleErrorMessage"]}}};w.style=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:"start-label-wrapper . end-label-wrapper" "start-date-input hyphen end-date-input"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:"start-label-wrapper . end-label-wrapper ." "start-date-input hyphen end-date-input toggle-wrapper"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{w as wm_date_range}
|
|
1
|
+
import{r as t,c as e,h as r,F as i,H as a,g as s}from"./p-568c595f.js";import{t as o,j as n,a as l,k as d,A as p,B as h,C as c,D as u,i as m}from"./p-e995f7f0.js";const w=class{constructor(r){t(this,r),this.wmRangeSelection=e(this,"wmRangeSelection",7),this.wmStartInputBlur=e(this,"wmStartInputBlur",7),this.wmEndInputBlur=e(this,"wmEndInputBlur",7),this.openUp=!1,this.calWidth=681,this.popupClicked=!1,this.toggleButtonClicked=!1,this.formats={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"},this.dateFormat="mm/dd/yyyy",this.disabled=!1,this.errorMessage=void 0,this.invalidStart=!1,this.invalidEnd=!1,this.labelStart="",this.labelEnd="",this.preselected=void 0,this.requiredField=!1,this.valueStart="",this.valueEnd="",this.availSpace=0,this.isExpanded=!1}get _disabled(){return o(this.disabled)}get focusDates(){const t=this.toISO(this.valueStart);let e=n(new Date);this._isValidISO(t)?e=t:this.preselected&&this._isValidISO(this.preselected)&&(e=this.preselected);let r=this.toJSDate(e);11==r.getUTCMonth()&&r.setYear(r.getUTCFullYear()+1),r.setMonth((r.getUTCMonth()+1)%12,1);let i=n(r);const a=this.toISO(this.valueEnd);if(this._isValidISO(a)&&!this.isSameMonth(e,a)&&(i=a,!t)){let t=this.toJSDate(i),r=t.getUTCMonth()-1;-1==r&&(r=11,t.setYear(t.getUTCFullYear()-1)),t.setMonth(r,1),e=n(t)}return[e,i]}isSameMonth(t,e){return!(!t||!e)&&t.slice(0,-3)===e.slice(0,-3)}toJSDate(t){if(t&&this._isValidISO(t)){let e=new Date;return e.setUTCFullYear(parseInt(t.split("-")[0]),parseInt(t.split("-")[1])-1,parseInt(t.split("-")[2])),e}}toISO(t){return this._reformatDate(this.formats[this.dateFormat],"ISO",t)}handleDisabled(){l(this.el,this._disabled)}updateValueStart(){this.startInputEl.value=this.valueStart?this.valueStart:""}updateValueEnd(){this.endInputEl.value=this.valueEnd?this.valueEnd:""}handleErrorMessage(){this.errorMessage&&setTimeout((()=>this.announce(this.errorMessage)),100)}togglePopup(){this.isExpanded?this.closePopup():this.openPopup(),this.toggleButtonClicked=!0}closePopup(t=!1){this.date1=void 0,this.date2=void 0,this.startCalEl.startDate=void 0,this.startCalEl.endDate=void 0,this.startCalEl.hoverDate=void 0,this.endCalEl.startDate=void 0,this.endCalEl.endDate=void 0,this.endCalEl.hoverDate=void 0,this.isExpanded=!1,this.startCalEl.view="day",this.endCalEl.view="day",this.popupEl.classList.remove("open"),window.setTimeout((()=>{this.popupEl.style.visibility="hidden"}),250),t&&this.toggleEl.focus()}openPopup(){this.openUp=d(this.el,this.popupEl.clientHeight,this.labelEl.clientHeight);const{spaceLeft:t,spaceRight:e}=p(this.el);if(e>=this.calWidth-this.el.clientWidth?(this.popupEl.style.left="0",this.popupEl.style.right="auto"):t>=this.calWidth-this.el.clientWidth?(this.popupEl.style.right="0",this.popupEl.style.left="auto"):(this.popupEl.style.left=(this.availSpace-this.calWidth)/2-t+"px",this.popupEl.style.right="auto"),this.popupEl.style.visibility="visible",window.requestAnimationFrame((()=>{this.popupEl.classList.add("open")})),this.isExpanded=!0,this.startCalEl.focusDate=this.focusDates[0],this.endCalEl.focusDate=this.focusDates[1],this.startCalEl.focusCell(),this.valueStart){const t=this.toISO(this.valueStart);if(this._isValidISO(t)&&(this.startCalEl.startDate=t),this.valueEnd){const e=this.toISO(this.valueEnd);this._isValidISO(e)&&(this.isSameMonth(t,e)?this.startCalEl.endDate=e:this.endCalEl.endDate=e)}}}handleFocus(){this.wrapperEl.classList.add("focus")}handleBlur(){this.wrapperEl.classList.remove("focus")}handleStartInputBlur(){this.wmStartInputBlur.emit()}handleEndInputBlur(){this.wmEndInputBlur.emit()}handleStartInput(t){this.valueStart=t.target.value}handleEndInput(t){this.valueEnd=t.target.value}handleKey(t){"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.closePopup(!0))}blurHandler(){this.popupClicked||this.toggleButtonClicked||!this.isExpanded||this.closePopup(),this.popupClicked=!1,this.toggleButtonClicked=!1}handleBlurOnWindow(){this.isExpanded&&this.closePopup()}handleDateFocus(t){const e=t.target,r=e.focusDate,i=this.startCalEl.focusDate.slice(0,-3),a=this.endCalEl.focusDate.slice(0,-3);if(e==this.startCalEl?i>=a&&(this.endCalEl.focusDate=h.month.increase(this.startCalEl.focusDate,1)):e==this.endCalEl&&a<=i&&(this.startCalEl.focusDate=h.month.decrease(this.endCalEl.focusDate,1)),this.oldFocusVal){const t=h.year.asInt(r),i=h.year.asInt(this.oldFocusVal),a=h.month.asInt(r),s=h.month.asInt(this.oldFocusVal);"day"===e.view?t==i&&a==s||(this.liveRegionEl.innerHTML=`Viewing ${c[a-1]}, ${t}`):t!=i?this.liveRegionEl.innerHTML=`${t} selected.`:a!=s&&(this.liveRegionEl.innerHTML=`${c[a-1]}, ${t}`)}this.oldFocusVal=e.focusDate}handlePopupBlurred(t){if(t.detail.relatedTarget!==this.el){const e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(e)}}handleCellTriggered(t){const e=t.detail.cal,r=t.detail.cell,i=r.getAttribute("data-year")+"-"+r.getAttribute("data-month")+"-"+r.textContent.padStart(2,"0");if(this.startCalEl.endDate||this.endCalEl.endDate)this.startCalEl.startDate=void 0,this.startCalEl.endDate=void 0,this.endCalEl.startDate=void 0,this.endCalEl.endDate=void 0,e.startDate=i,this.date1=i,this.date2=void 0;else if(this.date1&&i!==this.date1){this.date1>i?(this.date2=this.date1,this.date1=i):this.date2=i;const t={startDate:{iso:this.date1,us:this._reformatDate("ISO","US",this.date1),int:this._reformatDate("ISO","INT",this.date1)},endDate:{iso:this.date2,us:this._reformatDate("ISO","US",this.date2),int:this._reformatDate("ISO","INT",this.date2)}};this.wmRangeSelection.emit(t),this.closePopup(!0),this.date1=void 0,this.date2=void 0}else e.startDate=i,this.date1=i;const a=new CustomEvent("input");this.el.dispatchEvent(a);const s=new CustomEvent("change");this.el.dispatchEvent(s)}handleOutOfCal(){this.startCalEl.hoverDate=void 0,this.endCalEl.hoverDate=void 0}handleCellHovered(t){this.startCalEl.hoverDate=this.startCalEl.startDate===t.detail?void 0:t.detail,this.endCalEl.hoverDate=this.endCalEl.startDate===t.detail?void 0:t.detail}async reformatDate(t,e,r){return this._reformatDate(t,e,r)}_reformatDate(t,e,r){if("ISO"!==t&&"ISO"!==e)return"";if(!t||!e||!r)return"";if(!/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/.test(r))return r;{const i=r.replace(/[\-\.]/gi,"/").split("/");switch(e){case"US":return i[1].padStart(2,"0")+"/"+i[2].padStart(2,"0")+"/"+i[0].padStart(4,"20");case"INT":return i[2].padStart(2,"0")+"/"+i[1].padStart(2,"0")+"/"+i[0].padStart(4,"20");case"ISO":if("US"===t)return i[2].padStart(4,"20")+"-"+i[0].padStart(2,"0")+"-"+i[1].padStart(2,"0");if("INT"===t)return i[2].padStart(4,"20")+"-"+i[1].padStart(2,"0")+"-"+i[0].padStart(2,"0");if("ISO"===t)return i[0].padStart(4,"20")+"-"+i[1].padStart(2,"0")+"-"+i[2].padStart(2,"0");default:return i.join("/")}}}async isValidISO(t){return this._isValidISO(t)}_isValidISO(t){if(t&&/^\d\d\d\d[-]\d\d[-]\d\d$/.test(t)){const e=t.split("-"),r=parseInt(e[2],10),i=parseInt(e[1],10),a=parseInt(e[0],10);if(a<1e3||a>3e3||0==i||i>12)return!1;let s=[31,28,31,30,31,30,31,31,30,31,30,31];return(a%400==0||a%100!=0&&a%4==0)&&(s[1]=29),r>0&&r<=s[i-1]}return!1}setAvailSpace(){this.availSpace=(this.hiddenOverflowParent||document.body).clientWidth}componentWillLoad(){""!==this.labelStart&&""!==this.labelEnd||console.error("For accessibility reasons you must specify labels for the date range inputs."),l(this.el,this._disabled),this.hiddenOverflowParent=u(this.el),this.hiddenOverflowParent&&new ResizeObserver((()=>{this.availSpace=this.hiddenOverflowParent.clientWidth})).observe(this.hiddenOverflowParent),this.setAvailSpace()}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionEl.textContent=t}renderCalendars(){if(this.calWidth<=this.availSpace)return r(i,null,r("div",{class:`popup-wrapper ${this.startCalEl&&this.startCalEl.view}-view ${this.openUp?"expand-upwards":""}`,id:"popup-wrapper",ref:t=>this.popupEl=t,onClick:()=>this.popupClicked=!0,style:{display:"flex"}},r("div",{class:"trapfocus",tabIndex:this.isExpanded?0:void 0,onFocus:()=>this.endCalEl.focusLastFocusable()}),r("priv-calendar",{ref:t=>this.startCalEl=t,onClick:()=>this.popupClicked=!0,onDateFocus:t=>this.handleDateFocus(t)}),r("priv-calendar",{ref:t=>this.endCalEl=t,onClick:()=>this.popupClicked=!0,onDateFocus:t=>this.handleDateFocus(t)}),r("div",{class:"trapfocus",tabIndex:this.isExpanded?0:void 0,onFocus:()=>this.startCalEl.focusFirstFocusable()})))}render(){return r(a,{"aria-busy":"false"},r("div",{ref:t=>this.wrapperEl=t,class:"wrapper"},r("div",{class:"range-wrapper "+(this.calWidth<=this.availSpace?"cal":"")},r("div",{class:"label-wrapper",id:"start-label-wrapper"},r("label",{ref:t=>this.labelEl=t,id:"startlabel",htmlFor:"start-date-input",class:"label",title:`${this.labelStart} (${this.dateFormat})`},this.labelStart,this.requiredField&&r("span",{"aria-hidden":"true",class:"required"},"*"))),r("div",{class:"label-wrapper",id:"end-label-wrapper"},r("label",{id:"endlabel",htmlFor:"end-date-input",class:"label",title:`${this.labelEnd} (${this.dateFormat})`},this.labelEnd,this.requiredField&&r("span",{"aria-hidden":"true",class:"required"},"*"))),r("input",{disabled:this._disabled,type:"text",id:"start-date-input",class:"date-input input "+(this.invalidStart?"invalid":""),name:"start-date",placeholder:this.dateFormat,value:this.valueStart,onFocus:()=>this.handleFocus(),onInput:t=>this.handleStartInput(t),onBlur:()=>this.handleStartInputBlur(),ref:t=>this.startInputEl=t,"aria-describedby":"error","aria-label":this.labelStart,"aria-required":this.requiredField?"true":null}),r("div",{id:"hyphen"}," - "),r("input",{disabled:this._disabled,type:"text",id:"end-date-input",class:"date-input input "+(this.invalidEnd?"invalid":""),name:"end-date",placeholder:this.dateFormat,value:this.valueEnd,onFocus:()=>this.handleFocus(),onInput:t=>this.handleEndInput(t),onBlur:()=>this.handleEndInputBlur(),ref:t=>this.endInputEl=t,"aria-describedby":"error","aria-label":this.labelEnd,"aria-required":this.requiredField?"true":null}),r("div",{class:"toggle-wrapper",id:"toggle-wrapper"},this.calWidth<=this.availSpace&&r("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"start-date-input end-date-input","aria-label":m.formatMessage({id:"date.selectRange",defaultMessage:"Select range",description:"Button text for screen readers."}),ref:t=>this.toggleEl=t,"aria-expanded":`${this.isExpanded}`,class:"toggle",id:"toggle"},r("span",{class:"calendar",title:m.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})}))),this.renderCalendars()),r("div",null,r("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),r("div",{id:"month-title",class:"sr-only"},m.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),r("div",{id:"year-title",class:"sr-only"},m.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"}))),r("div",{id:"error",class:"error"},this.errorMessage),r("div",{ref:t=>this.liveRegionEl=t,class:"sr-only","aria-live":"polite","aria-atomic":"true"})))}static get delegatesFocus(){return!0}get el(){return s(this)}static get watchers(){return{disabled:["handleDisabled"],valueStart:["updateValueStart"],valueEnd:["updateValueEnd"],errorMessage:["handleErrorMessage"]}}};w.style=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:"start-label-wrapper . end-label-wrapper" "start-date-input hyphen end-date-input"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:"start-label-wrapper . end-label-wrapper ." "start-date-input hyphen end-date-input toggle-wrapper"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{w as wm_date_range}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function i(e){try{s(o.next(e))}catch(e){a(e)}}function p(e){try{s(o["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):n(e.value).then(i,p)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:p(0),throw:p(1),return:p(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function p(e){return function(t){return s([e,t])}}function s(p){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,p[0]&&(r=0)),r)try{if(o=1,n&&(a=p[0]&2?n["return"]:p[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,p[1])).done)return a;if(n=0,a)p=[p[0]&2,a.value];switch(p[0]){case 0:case 1:a=p;break;case 4:r.label++;return{value:p[1],done:false};case 5:r.label++;n=p[1];p=[0];continue;case 7:p=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1];a=p;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(p);break}if(a[2])r.ops.pop();r.trys.pop();continue}p=t.call(e,r)}catch(e){p=[6,e];n=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js","./p-99dd083d.system.js"],(function(e){"use strict";var t,r,o,n,a,i,p,s,l,c,h,m,d,u,w,b,g,f,x,v,k;return{setters:[function(e){t=e.r;r=e.f;o=e.h;n=e.H;a=e.g;i=e.c},function(e){p=e.g;s=e.d;l=e.i;c=e.x},function(e){h=e.a;m=e.h;d=e.g;u=e.r;w=e.c;b=e.d;g=e.e;f=e.f;x=e.l;v=e.j;k=e.m}],execute:function(){var y=":host{--wmcolor-chart-label-text-negative:var(--wmcolor-text-negative);--wmcolor-chart-label-text-positive:var(--wmcolor-text-positive);--wmcolor-chart-label-text:var(--wmcolor-text);--wmcolor-chart-subinfo-text:var(--wmcolor-text);--wmcolor-chart-value-text:var(--wmcolor-text);display:block}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;outline:none;}:host .component-wrapper:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:600;position:relative}:host .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:var(--wmcolor-chart-subinfo-text)}:host .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .label.--none{display:none}:host .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex;gap:2px;margin-bottom:8px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex;gap:2px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .segment{print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .segment.fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper .fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper .faded{opacity:0.3}:host .component-wrapper path:active,:host .component-wrapper path:hover,:host .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment:not(:focus-visible),:host .component-wrapper path:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper path:focus.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:active.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment:not(:focus-visible){-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper .stacked-bar-segment:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper #kfbg1{stroke:white;stroke-width:10px}:host .component-wrapper #kfstroke{stroke:var(--wmcolor-interactive-focus);stroke-width:6px}:host .component-wrapper #kfbg2{stroke:white;stroke-width:2px}:host .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,:host .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, var(--wmcolor-chart-gridline) 1px, transparent 1px);background-position:-1px;border-left:1px solid var(--wmcolor-chart-gridline);border-bottom:1px solid var(--wmcolor-chart-gridline);background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:focus.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:focus.bar:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.bar6 .bar:focus-visible,:host .component-wrapper.bar7 .bar:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .hidden-values-warning.hidden{display:none}@media print{:host .component-wrapper .hidden-values-warning{display:none}}:host #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .legend-wrapper .legend .print-value{display:none}:host .component-wrapper .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .component-wrapper .legend-wrapper .legend .print-value{display:unset}}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}";var j=e("wm_progress_indicator",function(){function e(e){var o=this;t(this,e);this.uid=p();this.slicesDetails=[];this.barLabelsWidth=this.el.parentElement.barLabelsWidth;this.debouncedUpdate=s((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){r(this.el);return[2]}))}))}),10);this.label=undefined;this.subinfo=undefined;this.completionMessage=undefined;this.showLegend=true;this.printMode=false;this.printModeFormat="amount";this.isTabbing=false;this.mode=undefined;this.userIsNavigating=false;this.focusedSliceId=undefined}Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return this.mode?h[this.mode]:undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartRoleDescription",{get:function(){return l.formatMessage({id:"chart.roleDescription",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){m.call(this,e)};e.prototype.componentWillLoad=function(){var e=this;if(!this.label){console.error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}if(this.el.children.length!==2){console.warn("wm-progress-indicator component must have 2 wm-progress-slice children.")}this.el.parentElement.addEventListener("wmProgressMonitorModeChange",(function(t){return e.mode=t.detail}));var t=new ResizeObserver((function(){return e.debouncedUpdate()}));t.observe(this.el)};e.prototype.handleSliceUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,d.call(this,this.mode)];case 1:e.sent();r(this.el);return[2]}}))}))};e.prototype.handleModeUpdate=function(){if(this.mode){d.call(this,this.mode)}};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));u(r)}};e.prototype.renderBarOrDoughnut=function(){if(this.total>0&&this.mode==="bar"){return w.call(this,this.mode)}else{return b.call(this,this.mode)}};e.prototype.render=function(){var e=this;return o(n,{onBlur:function(){return v.call(e)}},o("div",{ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.mode," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""),role:"application","aria-label":this.ariaLabelText,tabindex:"0","aria-roledescription":this.chartRoleDescription,"aria-describedby":"chart-instructions"},o("label",{id:"label-".concat(this.uid),class:"label ".concat(this.barLabelsWidth&&this.mode==="bar"?"custom-width":""),style:{"--custom-label-width":this.barLabelsWidth},htmlFor:"graphic-".concat(this.uid)},o("span",{class:"label-text"},this.label),this.subinfo?o("span",{class:"subinfo"},this.subinfo):""),this.mode&&this.renderBarOrDoughnut(),this.mode==="doughnut"?f.call(this,this.mode):"",o("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.mode==="doughnut"?x.call(this):""),g())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mode:["handleModeUpdate"]}},enumerable:false,configurable:true});return e}());j.style=y;var z=":host .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .legend-wrapper .legend.bar6{display:none}:host .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .legend-wrapper .legend .legend-item{position:relative}:host .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .legend-wrapper .legend .print-value{display:none}:host .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .legend-wrapper .legend .print-value{display:unset}}:host .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host{display:-ms-flexbox;display:flex}:host .legend-wrapper{-ms-flex-align:start;align-items:flex-start}:host(.row){-ms-flex-direction:row;flex-direction:row}:host(.column){-ms-flex-direction:column;flex-direction:column}:host(.column) .legend-wrapper{margin-bottom:2rem}:host(.column) .legend-wrapper .legend{padding-bottom:0}:host(.column) ::slotted(wm-progress-indicator:not(:last-of-type)){margin-bottom:2.5rem}";var _=e("wm_progress_monitor",function(){function e(e){var o=this;t(this,e);this.wmProgressMonitorModeChange=i(this,"wmProgressMonitorModeChange",7);this.doughnutWidth=300;this.modeInitialized=false;this.debouncedUpdate=s((function(){return r(o.el)}),50);this.breakpoint=undefined;this.groupLegend=undefined;this.barLabelsWidth=undefined}Object.defineProperty(e.prototype,"parsedBreakpoint",{get:function(){var e=this.parseToNum(this.breakpoint?this.breakpoint:this.el.children.length);var t=e>=20?e:e*this.doughnutWidth;return t},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"mode",{get:function(){return this.el.clientWidth>this.parsedBreakpoint?"doughnut":"bar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return false},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDoughnut",{get:function(){return false},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){var e=this;var t=new ResizeObserver((function(){return e.debouncedUpdate()}));t.observe(this.el)};e.prototype.componentDidLoad=function(){this.wmProgressMonitorModeChange.emit(this.mode);this.modeInitialized=true};e.prototype.componentWillUpdate=function(){if(this.prevMode!==this.mode){this.wmProgressMonitorModeChange.emit(this.mode)}this.prevMode=this.mode};e.prototype.parseToNum=function(e){var t=e.toString();var r=t.replace("px","");return parseInt(r)};e.prototype.renderLegend=function(){var e=this;var t=c(this.groupLegend);var r=h.bar.colors;return o("div",{class:"legend-wrapper"},o("div",{class:"legend"},t.map((function(t,o){var n={key:t,color:r[o]};return k.call(e,n)}))))};e.prototype.render=function(){return o(n,{class:this.mode==="doughnut"?"row":"column"},this.modeInitialized&&this.groupLegend&&this.mode==="bar"&&this.renderLegend(),this.modeInitialized&&o("slot",null))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());_.style=z;var O=e("wm_progress_slice",function(){function e(e){t(this,e);this.wmProgressSliceUpdated=i(this,"wmProgressSliceUpdated",7);this.legend=undefined;this.amount=undefined;this.popoverTitle=undefined;this.popoverText=undefined;this.popoverButtonText=undefined}e.prototype.componentDidUpdate=function(){this.wmProgressSliceUpdated.emit()};return e}())}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-ab8d78cc.system.js","./p-2be33eb4.system.js"],(function(e,a){"use strict";var t,l;return{setters:[function(a){t=a.p;l=a.b;e("setNonce",a.s)},function(){}],execute:function(){var e=function(){var e=a.meta.url;var l={};if(e!==""){l.resourcesUrl=new URL(".",e).href}return t(l)};e().then((function(e){return l(JSON.parse('[["p-d24882a7.system",[[17,"wm-file",{"name":[1],"type":[1],"fileActions":[1,"file-actions"],"lastUpdated":[1,"last-updated"],"progress":[514],"size":[1],"uploadedBy":[1,"uploaded-by"],"errorMessage":[1,"error-message"],"showInfo":[1025,"show-info"]}]]],["p-240124b0.system",[[17,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"keydownOnTabItem","handleKeydown"]],{"selectedTab":["setSelected"]}],[17,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]}],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]}]]],["p-fe8d02c3.system",[[17,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"itemIndexToFocus":[32]},[[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]],{"products":["parseData"]}]]],["p-b2dac998.system",[[17,"wm-navigation",{"open":[1540]},[[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]],{"open":["handleStateChange"]}],[17,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[17,"wm-navigation-item",{"href":[1],"text":[1],"active":[4]}]]],["p-f4210450.system",[[17,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]],{"mode":["handleModeUpdate"]}],[17,"wm-progress-monitor",{"breakpoint":[8],"groupLegend":[1,"group-legend"],"barLabelsWidth":[1,"bar-labels-width"]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-4bacf5a7.system",[[17,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"labelWidth":[1,"label-width"],"subinfo":[1],"valueFormat":[1,"value-format"],"showGrid":[4,"show-grid"],"showLegend":[4,"show-legend"],"showBarLegend":[4,"show-bar-legend"],"notStartedColor":[4,"not-started-color"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-e3de5bbd.system",[[17,"wm-date-range",{"dateFormat":[1,"date-format"],"disabled":[4],"errorMessage":[513,"error-message"],"invalidStart":[4,"invalid-start"],"invalidEnd":[4,"invalid-end"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"],"preselected":[1],"requiredField":[4,"required-field"],"valueStart":[1025,"value-start"],"valueEnd":[1025,"value-end"],"availSpace":[32],"isExpanded":[32],"reformatDate":[64],"isValidISO":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"],[0,"outOfCal","handleOutOfCal"],[0,"cellHovered","handleCellHovered"],[9,"resize","setAvailSpace"]],{"disabled":["handleDisabled"],"valueStart":["updateValueStart"],"valueEnd":["updateValueEnd"],"errorMessage":["handleErrorMessage"]}]]],["p-f67fd802.system",[[17,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1,"label-position"],"label":[1],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"reformatDate":[64],"isValidIso":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"cellTriggered","handleCellTriggered"]],{"disabled":["handleDisabledChange"],"value":["updateValue"],"errorMessage":["announceError"]}]]],["p-49b7970e.system",[[1,"wm-line-chart",{"label":[1],"description":[1],"xAxisLabel":[1,"x-axis-label"],"yAxisLabel":[1,"y-axis-label"],"lineData":[513,"line-data"],"units":[1],"labelWidth":[1,"label-width"],"highlightQualifier":[1,"highlight-qualifier"],"highlightStart":[1,"highlight-start"],"highlightEnd":[1,"highlight-end"],"visibilityToggles":[4,"visibility-toggles"],"showDeltas":[4,"show-deltas"],"yRange":[1,"y-range"],"parsedLineData":[32],"popoverIndex":[32],"focusedLine":[32],"hiddenLines":[32],"isTabbing":[32],"intervalSkip":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"lineData":["parseData"],"intervalSkip":["handleIntervalSkip"]}]]],["p-294b38ca.system",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}]]],["p-7e6f5a1e.system",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]}]]],["p-cacfbaf1.system",[[17,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"announcement":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"numResults":["handleNumResultsUpdate"],"disabled":["handleDisabledChange"]}]]],["p-32bf3f5b.system",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-c9543950.system",[[17,"wm-file-list",{"showInfo":[1,"show-info"]}]]],["p-26fbc7f5.system",[[17,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"inputWidth":[1,"input-width"],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"symbolBefore":[1,"symbol-before"],"symbolAfter":[1,"symbol-after"],"textAfter":[1,"text-after"],"type":[1],"step":[2],"min":[2],"max":[2],"isSubmit":[4,"is-submit"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-df2560f3.system",[[4,"wm-modal",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"returnFocusEl":[32],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},null,{"open":["toggleModal"]}]]],["p-0ea8609b.system",[[17,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeSize":[4,"is-large-size"],"srAnnouncement":[32]},null,{"totalItems":["calculateTotalPages"],"itemsPerPage":["calculateTotalPages"]}]]],["p-510679f8.system",[[1,"wm-snackbar",{"notifications":[1537],"isTabbing":[32],"announcement":[32]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]],{"notifications":["updateSnacks"]}]]],["p-99c24568.system",[[17,"wm-tag-input",{"label":[1],"errorMessage":[1,"error-message"],"info":[1],"labelPosition":[1,"label-position"],"maxTags":[2,"max-tags"],"placeholder":[1025],"requiredField":[4,"required-field"],"tagInputType":[1,"tag-input-type"],"helpText":[1,"help-text"],"addNew":[4,"add-new"],"characterLimit":[2,"character-limit"],"colHeaders":[1,"col-headers"],"colWidths":[1,"col-widths"],"colWrap":[1,"col-wrap"],"isKeying":[32],"isExpanded":[32],"liveRegionMessage":[32],"focusedOption":[32],"focusedColumn":[32],"focusedTagIndex":[32],"tagsList":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"privTagOptionSelected","handleTagOptionSelected"],[0,"privTagOptionDeselected","handleTagOptionDeselected"],[4,"click","handleClick"],[11,"scroll","dismissTooltip"],[0,"blur","handleBlur"]],{"errorMessage":["announceError"]}]]],["p-df1a11f1.system",[[0,"wm-tag-option",{"selected":[1540],"locked":[4],"col1":[1],"col2":[1],"col3":[1],"col4":[1],"emitSelectedEvent":[64],"emitDeselectedEvent":[64]},null,{"selected":["handleSelected"]}]]],["p-ffb31979.system",[[1,"wm-textarea",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"inputWidth":[1,"input-width"],"inputHeight":[1,"input-height"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-8fbddb6c.system",[[17,"wm-timepicker",{"disabled":[4],"value":[1025],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"isValidTime":[64],"reformatTime":[64]},[[0,"keydown","handleKey"]],{"disabled":["handleDisabledChange"],"value":["handleValueChange"],"errorMessage":["announceError"]}]]],["p-b7ead395.system",[[17,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipPosition":[1537,"tooltip-position"],"targetSize":[1,"target-size"],"isOpen":[32]},[[0,"keydown","handleKeydown"],[4,"click","handleClick"]]]]],["p-a152cf3a.system",[[17,"wm-uploader",{"label":[1],"buttonText":[1,"button-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1,"max-size"],"maxFiles":[2,"max-files"],"errorMessage":[1,"error-message"],"requiredField":[4,"required-field"],"showInfo":[1,"show-info"],"isTabbing":[32],"notif":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmFileErrorCleared","handleFileErrorCleared"],[0,"wmFileDelete","storeDeletedId"]],{"errorMessage":["announceError"]}]]],["p-65d26233.system",[[0,"wm-wrapper"]]],["p-311923b2.system",[[17,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"]}]]],["p-c91b10f3.system",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-e7a64841.system",[[0,"priv-calendar",{"disabled":[4],"view":[1025],"focusDate":[1025,"focus-date"],"startDate":[1,"start-date"],"endDate":[1,"end-date"],"hoverDate":[1,"hover-date"],"focusFirstFocusable":[64],"focusLastFocusable":[64],"focusCell":[64]},[[0,"keydown","handleKey"]],{"focusDate":["handleFocusDate"]}]]],["p-905dd4da.system",[[0,"priv-chart-popover",{"open":[1028],"sliceDetails":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]],{"open":["handleOpenChange"],"sliceDetails":["handleDetailsChange"]}]]],["p-d33d6e96.system",[[17,"wm-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isExpanded":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"intCloneClicked","handleOptionCloneSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusOption"]],{"errorMessage":["announceError"],"disabled":["handleDisabledChange"]}],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]],{"selected":["syncAriaSelected"],"disabled":["syncAriaDisabled","updateDisabledOnClick"]}]]],["p-79106e23.system",[[17,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"icon":[1537],"iconSize":[1,"icon-size"],"iconRotate":[2,"icon-rotate"],"iconFlip":[1,"icon-flip"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"isSubmit":[4,"is-submit"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]],{"buttonType":["validateType"],"icon":["updateIcon"],"disabled":["handleDisabledChange"]}]]],["p-e3bcdde8.system",[[17,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"darkMode":[4,"dark-mode"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"icon":[1025],"description":[1]},[[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]],{"disabled":["setOnClick"]}]]]]'),e)}))}}}));
|
|
1
|
+
System.register(["./p-ab8d78cc.system.js","./p-361f6e59.system.js"],(function(e,a){"use strict";var t,l;return{setters:[function(a){t=a.p;l=a.b;e("setNonce",a.s)},function(){}],execute:function(){var e=function(){var e=a.meta.url;var l={};if(e!==""){l.resourcesUrl=new URL(".",e).href}return t(l)};e().then((function(e){return l(JSON.parse('[["p-d24882a7.system",[[17,"wm-file",{"name":[1],"type":[1],"fileActions":[1,"file-actions"],"lastUpdated":[1,"last-updated"],"progress":[514],"size":[1],"uploadedBy":[1,"uploaded-by"],"errorMessage":[1,"error-message"],"showInfo":[1025,"show-info"]}]]],["p-240124b0.system",[[17,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"keydownOnTabItem","handleKeydown"]],{"selectedTab":["setSelected"]}],[17,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]}],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]}]]],["p-3b8b1b44.system",[[17,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"itemIndexToFocus":[32]},[[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]],{"products":["parseData"]}]]],["p-b2dac998.system",[[17,"wm-navigation",{"open":[1540]},[[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]],{"open":["handleStateChange"]}],[17,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[17,"wm-navigation-item",{"href":[1],"text":[1],"active":[4]}]]],["p-5d0e2006.system",[[17,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]],{"mode":["handleModeUpdate"]}],[17,"wm-progress-monitor",{"breakpoint":[8],"groupLegend":[1,"group-legend"],"barLabelsWidth":[1,"bar-labels-width"]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-e3241417.system",[[17,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"labelWidth":[1,"label-width"],"subinfo":[1],"valueFormat":[1,"value-format"],"showGrid":[4,"show-grid"],"showLegend":[4,"show-legend"],"showBarLegend":[4,"show-bar-legend"],"notStartedColor":[4,"not-started-color"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-4c8db09c.system",[[17,"wm-date-range",{"dateFormat":[1,"date-format"],"disabled":[4],"errorMessage":[513,"error-message"],"invalidStart":[4,"invalid-start"],"invalidEnd":[4,"invalid-end"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"],"preselected":[1],"requiredField":[4,"required-field"],"valueStart":[1025,"value-start"],"valueEnd":[1025,"value-end"],"availSpace":[32],"isExpanded":[32],"reformatDate":[64],"isValidISO":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"],[0,"outOfCal","handleOutOfCal"],[0,"cellHovered","handleCellHovered"],[9,"resize","setAvailSpace"]],{"disabled":["handleDisabled"],"valueStart":["updateValueStart"],"valueEnd":["updateValueEnd"],"errorMessage":["handleErrorMessage"]}]]],["p-4a6854d3.system",[[17,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1,"label-position"],"label":[1],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"reformatDate":[64],"isValidIso":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"cellTriggered","handleCellTriggered"]],{"disabled":["handleDisabledChange"],"value":["updateValue"],"errorMessage":["announceError"]}]]],["p-fd0aae67.system",[[1,"wm-line-chart",{"label":[1],"description":[1],"xAxisLabel":[1,"x-axis-label"],"yAxisLabel":[1,"y-axis-label"],"lineData":[513,"line-data"],"units":[1],"labelWidth":[1,"label-width"],"highlightQualifier":[1,"highlight-qualifier"],"highlightStart":[1,"highlight-start"],"highlightEnd":[1,"highlight-end"],"visibilityToggles":[4,"visibility-toggles"],"showDeltas":[4,"show-deltas"],"yRange":[1,"y-range"],"parsedLineData":[32],"popoverIndex":[32],"focusedLine":[32],"hiddenLines":[32],"isTabbing":[32],"intervalSkip":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"lineData":["parseData"],"intervalSkip":["handleIntervalSkip"]}]]],["p-294b38ca.system",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}]]],["p-7e6f5a1e.system",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]}]]],["p-cacfbaf1.system",[[17,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"announcement":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"numResults":["handleNumResultsUpdate"],"disabled":["handleDisabledChange"]}]]],["p-32bf3f5b.system",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-c9543950.system",[[17,"wm-file-list",{"showInfo":[1,"show-info"]}]]],["p-26fbc7f5.system",[[17,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"inputWidth":[1,"input-width"],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"symbolBefore":[1,"symbol-before"],"symbolAfter":[1,"symbol-after"],"textAfter":[1,"text-after"],"type":[1],"step":[2],"min":[2],"max":[2],"isSubmit":[4,"is-submit"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-df2560f3.system",[[4,"wm-modal",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"returnFocusEl":[32],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},null,{"open":["toggleModal"]}]]],["p-0ea8609b.system",[[17,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeSize":[4,"is-large-size"],"srAnnouncement":[32]},null,{"totalItems":["calculateTotalPages"],"itemsPerPage":["calculateTotalPages"]}]]],["p-510679f8.system",[[1,"wm-snackbar",{"notifications":[1537],"isTabbing":[32],"announcement":[32]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]],{"notifications":["updateSnacks"]}]]],["p-99c24568.system",[[17,"wm-tag-input",{"label":[1],"errorMessage":[1,"error-message"],"info":[1],"labelPosition":[1,"label-position"],"maxTags":[2,"max-tags"],"placeholder":[1025],"requiredField":[4,"required-field"],"tagInputType":[1,"tag-input-type"],"helpText":[1,"help-text"],"addNew":[4,"add-new"],"characterLimit":[2,"character-limit"],"colHeaders":[1,"col-headers"],"colWidths":[1,"col-widths"],"colWrap":[1,"col-wrap"],"isKeying":[32],"isExpanded":[32],"liveRegionMessage":[32],"focusedOption":[32],"focusedColumn":[32],"focusedTagIndex":[32],"tagsList":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"privTagOptionSelected","handleTagOptionSelected"],[0,"privTagOptionDeselected","handleTagOptionDeselected"],[4,"click","handleClick"],[11,"scroll","dismissTooltip"],[0,"blur","handleBlur"]],{"errorMessage":["announceError"]}]]],["p-df1a11f1.system",[[0,"wm-tag-option",{"selected":[1540],"locked":[4],"col1":[1],"col2":[1],"col3":[1],"col4":[1],"emitSelectedEvent":[64],"emitDeselectedEvent":[64]},null,{"selected":["handleSelected"]}]]],["p-ffb31979.system",[[1,"wm-textarea",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"inputWidth":[1,"input-width"],"inputHeight":[1,"input-height"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-8fbddb6c.system",[[17,"wm-timepicker",{"disabled":[4],"value":[1025],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"isValidTime":[64],"reformatTime":[64]},[[0,"keydown","handleKey"]],{"disabled":["handleDisabledChange"],"value":["handleValueChange"],"errorMessage":["announceError"]}]]],["p-b7ead395.system",[[17,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipPosition":[1537,"tooltip-position"],"targetSize":[1,"target-size"],"isOpen":[32]},[[0,"keydown","handleKeydown"],[4,"click","handleClick"]]]]],["p-a152cf3a.system",[[17,"wm-uploader",{"label":[1],"buttonText":[1,"button-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1,"max-size"],"maxFiles":[2,"max-files"],"errorMessage":[1,"error-message"],"requiredField":[4,"required-field"],"showInfo":[1,"show-info"],"isTabbing":[32],"notif":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmFileErrorCleared","handleFileErrorCleared"],[0,"wmFileDelete","storeDeletedId"]],{"errorMessage":["announceError"]}]]],["p-65d26233.system",[[0,"wm-wrapper"]]],["p-311923b2.system",[[17,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"]}]]],["p-021ff5fa.system",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-28b70082.system",[[0,"priv-calendar",{"disabled":[4],"view":[1025],"focusDate":[1025,"focus-date"],"startDate":[1,"start-date"],"endDate":[1,"end-date"],"hoverDate":[1,"hover-date"],"focusFirstFocusable":[64],"focusLastFocusable":[64],"focusCell":[64]},[[0,"keydown","handleKey"]],{"focusDate":["handleFocusDate"]}]]],["p-905dd4da.system",[[0,"priv-chart-popover",{"open":[1028],"sliceDetails":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]],{"open":["handleOpenChange"],"sliceDetails":["handleDetailsChange"]}]]],["p-d33d6e96.system",[[17,"wm-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isExpanded":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"intCloneClicked","handleOptionCloneSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusOption"]],{"errorMessage":["announceError"],"disabled":["handleDisabledChange"]}],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]],{"selected":["syncAriaSelected"],"disabled":["syncAriaDisabled","updateDisabledOnClick"]}]]],["p-79106e23.system",[[17,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"icon":[1537],"iconSize":[1,"icon-size"],"iconRotate":[2,"icon-rotate"],"iconFlip":[1,"icon-flip"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"isSubmit":[4,"is-submit"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]],{"buttonType":["validateType"],"icon":["updateIcon"],"disabled":["handleDisabledChange"]}]]],["p-e3bcdde8.system",[[17,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"darkMode":[4,"dark-mode"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"icon":[1025],"description":[1]},[[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]],{"disabled":["setOnClick"]}]]]]'),e)}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as r,h as a,H as t,g as i}from"./p-568c595f.js";import{i as o,B as n,I as d,J as p,C as s,K as l}from"./p-e995f7f0.js";const c=class{constructor(t){e(this,t),this.cellTriggered=r(this,"cellTriggered",7),this.cellHovered=r(this,"cellHovered",7),this.outOfCal=r(this,"outOfCal",7),this.popupBlurred=r(this,"popupBlurred",7),this.dateFocus=r(this,"dateFocus",7),this.today=this.dateToISO(new Date),this.calType="single",this.calName="",this.calInstructions=o.formatMessage({id:"date.instructions",defaultMessage:"Use arrows to select a date in the table. Tab left or right to buttons for selecting previous month, next month, or the month selection table."}),this._focus={year:{asString:()=>n.year.asString(this.focusDate),asInt:()=>n.year.asInt(this.focusDate),set:e=>{const r=this._focus.month.asInt(),a=this._focus.day.asInt();this.focusDate=d(e,r,a)},increase:e=>{const r=n.year.increase(this.focusDate,e);this.focusDate=r},decrease:e=>{const r=n.year.decrease(this.focusDate,e);this.focusDate=r}},month:{asString:()=>n.month.asString(this.focusDate),asInt:()=>n.month.asInt(this.focusDate),set:e=>{const r=this._focus.year.asInt(),a=this._focus.day.asInt();this.focusDate=d(r,e,a)},increase:e=>{const r=n.month.increase(this.focusDate,e);this.focusDate=r},decrease:e=>{const r=n.month.decrease(this.focusDate,e);this.focusDate=r}},day:{asString:()=>n.day.asString(this.focusDate),asInt:()=>n.day.asInt(this.focusDate),set:e=>{const r=this._focus.year.asInt(),a=this._focus.month.asInt();e=-1===e?l(a,r):e,this.focusDate=d(r,a,e)},increase:e=>{const r=n.day.increase(this.focusDate,e);this.focusDate=r},decrease:e=>{const r=n.day.decrease(this.focusDate,e);this.focusDate=r}}},this.monthButtonFocus={set:e=>{const r=Array.from(this.el.querySelectorAll(".month")),a=r.filter((e=>e.classList.contains("focused")))[0];a.classList.remove("selected"),a.tabIndex=-1,r[e-1].classList.add("selected"),r[e-1].tabIndex=0,r[e-1].focus()},increase:e=>{const r=Array.from(this.el.querySelectorAll(".month")),a=r.filter((e=>e.classList.contains("focused")))[0],t=r.indexOf(a),i=(t+e)%12;i<t&&this._focus.year.increase(1),a.classList.remove("focused"),a.tabIndex=-1,r[i].classList.add("focused"),r[i].tabIndex=0,r[i].focus()},decrease:e=>{const r=Array.from(this.el.querySelectorAll(".month")),a=r.filter((e=>e.classList.contains("focused")))[0],t=r.indexOf(a);let i=t+24;i=(i-e)%12,i>t&&this._focus.year.decrease(1),a.classList.remove("focused"),a.tabIndex=-1,r[i].classList.add("focused"),r[i].tabIndex=0,r[i].focus()}},this.renderCalendarDate=(e,r,t,i)=>{if("placeholder"===e)return a("div",{role:"gridcell"});const d=n.month.asInt(e),c=n.day.asInt(e),g=n.year.asInt(e),h=t&&t===e;let w=h?"true":"false";const u=["date-cell"],v=e===this.focusDate,b=e===this.today;if(b&&u.push("today"),"range"===this.calType){const r=t&&i&&i===e&&t<i;w=r?"true":w;const a=1===c,o=c===l(d,g),n=this.isInRange(e),p=this.isInRangePreview(e),s=!i&&t&&this.hoverDate&&e===this.hoverDate,v=s&&this.hoverDate<t,b=s&&this.hoverDate>t;a&&u.push("first-of-month"),o&&u.push("last-of-month"),h&&u.push(p&&!r&&this.hoverDate&&this.hoverDate<t?"range-end":"range-start"),r&&u.push("range-end"),n&&u.push("in-range"),p&&u.push("in-range preview"),v&&u.push("preview-start"),b&&u.push("preview-end")}const m=u.join(" ");return a("div",{role:"gridcell",id:`cell-${e}`,class:m,"aria-selected":w,"aria-label":`${b?`${o.formatMessage({id:"date.today",defaultMessage:"today",description:"calendar button"})}, `:""}${p[r]}, ${s[d-1]} ${c}, ${g}`,onClick:e=>{this.handleDateClick(e.target)},onMouseOver:()=>this.cellHovered.emit(e),"data-month":n.month.asString(e),"data-year":n.year.asString(e),onBlur:e=>e.stopPropagation(),tabIndex:v?0:-1},c)},this.disabled=!1,this.view="day",this.focusDate=this.today,this.startDate=void 0,this.endDate=void 0,this.hoverDate=void 0}setCalName(){const e=this.el.parentElement.querySelectorAll("priv-calendar");let r;r=o.formatMessage(1===e.length?{id:"date.calName",defaultMessage:"Calendar. "}:e[0]===this.el?{id:"date.firstCalName",defaultMessage:"First calendar. "}:{id:"date.secondCalName",defaultMessage:"Second calendar. "}),this.calName=r}setCalType(){const e=this.el.parentElement.querySelectorAll("priv-calendar");this.calType=1===e.length?"single":"range"}componentWillLoad(){this.setCalName(),this.setCalType()}handleFocusDate(e,r){if("day"===this.view){const a=this.getCell(r);a&&(a.tabIndex=-1);const t=this.getCell(e);t&&(t.tabIndex=0)}else{const a=this.el.querySelector(`#month-${n.month.asInt(r)}`);a&&(a.tabIndex=-1);const t=this.el.querySelector(`#month-${n.month.asInt(e)}`);t&&(t.tabIndex=0)}this.dateFocus.emit()}get otherCalEl(){const e=this.el.parentElement.querySelectorAll("priv-calendar");let r;return 2===e.length&&(r=e[0]===this.el?e[1]:e[0]),r}get headerButtonEls(){return Array.from(this.el.querySelectorAll(".header-btn"))}handleKey(e){switch(e.key){case" ":case"Enter":e.preventDefault(),!e.target.id.includes("popup-title")&&e.target.click();break;case"PageUp":e.preventDefault(),"day"===this.view?(this._focus.month.decrease(1),this.focusCell()):this._focus.year.decrease(1);break;case"PageDown":e.preventDefault(),"day"===this.view?(this._focus.month.increase(1),this.focusCell()):this._focus.year.increase(1);break;case"Home":e.preventDefault(),"day"===this.view?(this._focus.day.set(1),this.focusCell()):this.monthButtonFocus.set(1);break;case"End":e.preventDefault(),"day"===this.view?(this._focus.day.set(-1),this.focusCell()):this.monthButtonFocus.set(12);break;case"ArrowLeft":e.preventDefault(),"day"===this.view?(this._focus.day.decrease(1),this.focusCell()):this.monthButtonFocus.decrease(1);break;case"ArrowRight":e.preventDefault(),"day"===this.view?(this._focus.day.increase(1),this.focusCell()):this.monthButtonFocus.increase(1);break;case"ArrowUp":e.preventDefault(),"day"===this.view?(this._focus.day.decrease(7),this.focusCell()):this.monthButtonFocus.decrease(3);break;case"ArrowDown":if(e.preventDefault(),"day"===this.view){if(!(document.activeElement.shadowRoot||document).activeElement.classList.contains("date-cell")){this.focusCell();break}this._focus.day.increase(7),this.focusCell()}else{if((document.activeElement.shadowRoot||document).activeElement.classList.contains("header-btn")){this.focusCell();break}this.monthButtonFocus.increase(3)}}}handleDateClick(e){this.cellTriggered.emit({cal:this.el,cell:e})}removeZeroes(e){return+e<10?+e.slice(1):+e}dateToISO(e){return[e.getUTCFullYear().toString().padStart(4,"0"),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0")].join("-")}isInRange(e){if(this.otherCalEl){const r=this.startDate||this.otherCalEl.startDate,a=this.endDate||this.otherCalEl.endDate;if(r&&a)return r<=e&&e<=a}return!1}isInRangePreview(e){if(this.otherCalEl){const r=this.startDate||this.otherCalEl.startDate,a=this.endDate||this.otherCalEl.endDate;if(r&&a)return!1;if(r&&this.hoverDate){if(this.hoverDate>r)return r<=e&&e<=this.hoverDate;if(this.hoverDate<r)return this.hoverDate<=e&&e<=r}else if(a&&this.hoverDate){if(this.hoverDate<a)return this.hoverDate<=e&&e<=a;if(this.hoverDate>a)return a<=e&&e<=this.hoverDate}}return!1}getMonthFirstDay(e,r){return+new Date(r,e-1,1,12,0,0).getDay()+1}getCalendarDates(e){const r=n.month.asInt(e),a=n.year.asInt(e),t=l(r,a),i=[...new Array(t).fill(void 0)].map(((e,t)=>d(a,r,t+1))),o=this.getMonthFirstDay(r,a)-1;let p=42-(o+t);return p=p>6?p-7:p,[...o>0?new Array(o).fill("placeholder"):[],...i,...p>0?new Array(p).fill("placeholder"):[]]}getCell(e){return this.el.querySelector(`#cell-${e}`)}async focusFirstFocusable(){this.prevBtnEl.focus()}async focusLastFocusable(){this.focusCell()}async focusCell(){requestAnimationFrame((()=>{const e=l(this._focus.month.asInt(),this._focus.year.asInt());if(this._focus.day.asInt()>e&&this._focus.day.set(e),"day"==this.view){const e=this.getCell(this.focusDate);e&&(e.tabIndex=0,e.focus()),this.cellHovered.emit(this.focusDate)}else{const e=this.el.querySelector(`#month-${this._focus.month.asInt()}`);e&&(e.tabIndex=0,e.focus())}}))}toggleBusyAttribute(e){this.el.querySelector("#wm-container").setAttribute("aria-busy",e)}renderMonth(e,r){return a("button",{id:`month-${r+1}`,class:"month "+(this._focus.month.asInt()===r+1?"selected focused":""),role:"gridcell",tabindex:r+1===this._focus.month.asInt()?0:-1,onBlur:e=>e.stopPropagation(),onClick:()=>{this._focus.month.set(r+1),this.view="day",this.focusCell()}},e)}renderDayView(){const e=this.getCalendarDates(this.focusDate),r=this.startDate||this.otherCalEl&&this.otherCalEl.startDate,t=this.endDate||this.otherCalEl&&this.otherCalEl.endDate;return a("div",{class:"popup day-view"},a("div",{class:"calendar-header"},a("button",{onClick:()=>{this._focus.month.decrease(1)},class:"header-btn arw-btn",ref:e=>this.prevBtnEl=e,"aria-label":o.formatMessage({id:"date.selectPreviousMonth",defaultMessage:"Select previous month",description:"Calendar button"})},a("span",{class:"mdi"},"")),a("div",{id:"popup-title-month",class:"header-btn title-box",tabindex:"0",role:"button",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.view="month")},onClick:()=>this.view="month","aria-label":`${o.formatMessage({id:"date.currentMonth",defaultMessage:"current month",description:"Calendar button"})}: ${s[this._focus.month.asInt()-1]}\n ${this._focus.year.asString()}.`,"aria-describedby":"month-title"},a("span",{class:"title","aria-hidden":"true"},s[this._focus.month.asInt()-1]," ",this._focus.year.asString())),a("button",{onClick:()=>{this._focus.month.increase(1)},"aria-label":o.formatMessage({id:"date.selectNextMonth",defaultMessage:"Select next month",description:"Calendar button"}),class:"header-btn arw-btn"},a("span",{class:"mdi"},""))),a("div",{"aria-labelledby":"popup-title-month",role:"grid",class:"date-grid"},a("div",{role:"rowgroup",class:"date-header"},a("div",{role:"row",class:"header-row"},a("div",{role:"columnheader",class:"header-cell"},a("span",null,o.formatMessage({id:"date.su",defaultMessage:"Su",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,o.formatMessage({id:"date.mo",defaultMessage:"Mo",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,o.formatMessage({id:"date.tu",defaultMessage:"Tu",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,o.formatMessage({id:"date.we",defaultMessage:"We",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,o.formatMessage({id:"date.th",defaultMessage:"Th",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,o.formatMessage({id:"date.fr",defaultMessage:"Fr",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,o.formatMessage({id:"date.sa",defaultMessage:"Sa",description:"Abbreviated day of the week"}))))),a("div",{role:"rowgroup"},a("div",{role:"row",class:"date-row"},e.slice(0,7).map(((e,a)=>this.renderCalendarDate(e,a,r,t)))),a("div",{role:"row"},e.slice(7,14).map(((e,a)=>this.renderCalendarDate(e,a,r,t)))),a("div",{role:"row"},e.slice(14,21).map(((e,a)=>this.renderCalendarDate(e,a,r,t)))),a("div",{role:"row"},e.slice(21,28).map(((e,a)=>this.renderCalendarDate(e,a,r,t)))),a("div",{role:"row"},e.slice(28,35).map(((e,a)=>this.renderCalendarDate(e,a,r,t)))),e.length>35?a("div",{role:"row"},e.slice(35).map(((e,a)=>this.renderCalendarDate(e,a,r,t)))):"")))}renderMonthView(){return a("div",{class:"month-view"},a("div",{class:"calendar-header"},a("button",{onClick:()=>{this._focus.year.decrease(1)},"aria-label":o.formatMessage({id:"date.selectPreviousYear",defaultMessage:"Select previous year",description:"Calendar button"}),class:"header-btn arw-btn",ref:e=>this.prevBtnEl=e},a("span",{class:"mdi"},"")),a("div",{id:"popup-title-year",tabindex:"0",class:"header-btn title-box year",role:"button",onClick:()=>this.view="day",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.view="day")},"aria-labelledby":"year-title"},a("span",{class:"title"},this._focus.year.asString())),a("button",{onClick:()=>{this._focus.year.increase(1)},"aria-label":o.formatMessage({id:"date.selectNextYear",defaultMessage:"Select next year",description:"Calendar button"}),class:"header-btn arw-btn"},a("span",{class:"mdi"},""))),a("div",{"aria-labelledby":"popup-title-year",role:"grid",class:"months"},a("div",{role:"row",class:"month-row"},s.slice(0,3).map(((e,r)=>this.renderMonth(e,r)))),a("div",{role:"row",class:"month-row"},s.slice(3,6).map(((e,r)=>this.renderMonth(e,r+3)))),a("div",{role:"row",class:"month-row"},s.slice(6,9).map(((e,r)=>this.renderMonth(e,r+6)))),a("div",{role:"row",class:"month-row"},s.slice(9).map(((e,r)=>this.renderMonth(e,r+9))))))}render(){return a(t,{onMouseOut:e=>{this.el.parentElement.contains(e.toElement)||this.outOfCal.emit()},role:"application","aria-describedby":"application"},"day"===this.view?this.renderDayView():this.renderMonthView(),a("div",{id:"application",class:"sr-only"},this.calName,this.calInstructions))}get el(){return i(this)}static get watchers(){return{focusDate:["handleFocusDate"]}}};c.style=':host{--wmcolor-calendar-border:var(--wmcolor-border);--wmcolor-calendar-day-border-hover:var(--wmcolor-border-focus);--wmcolor-calendar-range-background:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-range-background-hover:var(--wmcolor-datepicker-day-background-hover);--wmcolor-datepicker-range-background-selected:var(--wmcolor-background-selected);--range-start-svg:url(\'data:image/svg+xml,<svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 6C0 2.68629 2.68629 0 6 0H28.8457C31.0777 0 33.1251 1.23886 34.1607 3.21596L42.5417 19.216C43.455 20.9596 43.455 23.0404 42.5417 24.784L34.1607 40.784C33.1251 42.7611 31.0777 44 28.8458 44H6C2.68629 44 0 41.3137 0 38V6Z" fill="%23575195"/></svg>\');--range-end-svg:url(\'data:image/svg+xml,<svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M44 6C44 2.68629 41.3137 0 38 0H15.1543C12.9223 0 10.8749 1.23886 9.83926 3.21596L1.45831 19.216C0.544956 20.9596 0.54496 23.0404 1.45831 24.784L9.83926 40.784C10.8749 42.7611 12.9223 44 15.1542 44H38C41.3137 44 44 41.3137 44 38V6Z" fill="%23575195"/></svg>\');--range-background-selected:linear-gradient(\n transparent,\n transparent 5px,\n var(--wmcolor-datepicker-range-background-selected) 5px,\n var(--wmcolor-datepicker-range-background-selected) 39px,\n transparent 39px\n );--range-background-hover:linear-gradient(\n transparent,\n transparent 5px,\n var(--wmcolor-datepicker-range-background-hover) 5px,\n var(--wmcolor-datepicker-range-background-hover) 39px,\n transparent 39px\n )}:host priv-calendar+priv-calendar{-webkit-border-start:1px solid var(--wmcolor-calendar-border);border-inline-start:1px solid var(--wmcolor-calendar-border)}.toggle{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:var(--wmcolor-datepicker-toggle-background);border:none;border-radius:3px}.toggle span::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f0ed";font-size:1.5rem;color:var(--wmcolor-datepicker-toggle-icon);padding:0;line-height:2.5rem}.toggle:hover{-webkit-box-shadow:none;box-shadow:none;background:var(--wmcolor-datepicker-toggle-background-hover)}.toggle:disabled{pointer-events:none;-webkit-box-shadow:none;box-shadow:none;background-color:var(--wmcolor-datepicker-toggle-background-disabled)}.toggle:disabled .calendar::after{color:var(--wmcolor-datepicker-toggle-icon-disabled)}[dir=RTL] .toggle{right:auto;left:0}.toggle::-moz-focus-inner{border:0}.toggle:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0}.toggle:focus-visible:not(:active){border:none;z-index:11}.inside .toggle{border-top-left-radius:0;border-bottom-left-radius:0;border-start-start-radius:0;border-end-start-radius:0}.popup-wrapper{visibility:hidden;font-family:inherit;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);z-index:10;position:absolute;left:0;top:calc(100% + 2px);min-height:21.0625rem;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform:scale(1, 0);transform:scale(1, 0);background-color:var(--wmcolor-datepicker-background)}.popup-wrapper.start{border:2px solid cyan}.popup-wrapper.end{left:247px !important;border:2px solid teal}.popup-wrapper.open{-webkit-transform:scale(1, 1);transform:scale(1, 1)}.popup-wrapper.expand-upwards{top:auto;bottom:2.375rem;-webkit-transform-origin:center bottom;transform-origin:center bottom}.popup-wrapper .calendar-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;position:relative;padding:0.9375rem 0.25rem}.popup-wrapper .calendar-header .title-box{height:2.625rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;font-weight:500;font-size:0.875rem;background:var(--wmcolor-datepicker-selector-background);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 0.375rem 0 0.75rem;border-color:var(--wmcolor-datepicker-selector-border);color:var(--wmcolor-datepicker-selector-text)}.popup-wrapper .calendar-header .title-box:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";padding-left:0.75rem;font-size:1.12rem}.popup-wrapper .calendar-header .title-box.year:after{content:"\\f143"}.popup-wrapper .calendar-header .title-box::-moz-focus-inner{border:0}.popup-wrapper .calendar-header .arw-btn{cursor:pointer;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;width:2.75rem;height:2.75rem;border:none;color:var(--wmcolor-datepicker-navigation-text);background:var(--wmcolor-datepicker-navigation-background);padding:0;-webkit-box-shadow:none;box-shadow:none;line-height:2.75rem}.popup-wrapper .calendar-header .arw-btn .mdi{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1.5rem;font-weight:normal;line-height:2.75rem}.popup-wrapper .calendar-header .arw-btn:hover{background-color:var(--wmcolor-datepicker-navigation-background-hover)}.popup-wrapper .calendar-header .arw-btn:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}.popup-wrapper .separator{min-width:1px;background:var(--wm-color-border)}.popup-wrapper .day-view{min-width:21rem}.popup-wrapper .day-view .date-grid{width:100%;text-align:center;border-collapse:collapse;margin-bottom:0.4375rem;color:var(--wmcolor-datepicker-day-text)}.popup-wrapper .day-view .date-grid div[role=row]{display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around;padding-inline:0.875rem}.popup-wrapper .day-view .date-grid div[role=row]:not(.header-row){height:2.75rem}.popup-wrapper .day-view .date-grid .date-header{background-color:var(--wmcolor-datepicker-weekdays-background)}.popup-wrapper .day-view .date-grid .header-cell{height:2.0625rem;line-height:2.0625rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);padding:0;display:inline-block;font-size:0.8125rem;font-weight:bold;color:var(--wmcolor-datepicker-weekdays-text);border:none}.popup-wrapper .day-view .date-grid [role=gridcell]{padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;aspect-ratio:1;font-size:0.875rem;font-weight:500;position:relative;display:-ms-flexbox;display:flex;-ms-flex:1 0 2.75rem;flex:1 0 2.75rem;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.popup-wrapper .day-view .date-grid .date-cell{cursor:pointer}.popup-wrapper .day-view .date-grid .date-cell:hover{background-color:var(--wmcolor-datepicker-day-background-hover)}.popup-wrapper .day-view .date-grid .date-cell[aria-selected=true]{background-color:var(--wmcolor-datepicker-day-background-selected);color:var(--wmcolor-datepicker-day-text-selected)}.popup-wrapper .day-view .date-grid .date-cell.in-range{background:var(--range-background-selected);border-radius:0}.popup-wrapper .day-view .date-grid .date-cell.in-range.range-start:not(.preview):hover{background-repeat:no-repeat;background-position:center, center left 17px}.popup-wrapper .day-view .date-grid .date-cell.in-range.range-end:not(.preview):hover{background-position:center, center right 17px;background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.in-range:not(.preview):hover{background-image:radial-gradient(#dbd9ef 20px, transparent 21px), var(--range-background-selected);color:var(--wmcolor-datepicker-day-text)}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview{position:relative;background-image:var(--range-background-hover)}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview:last-child:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.preview:last-of-type:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.preview:first-child:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.preview:first-of-type:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.preview.last-of-month:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.preview.first-of-month:not(.preview-start,.preview-end,.range-start,.range-end){background-image:radial-gradient(var(--wmcolor-datepicker-range-background-hover) 16px, transparent 17px), var(--range-background-hover);background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview:first-child:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.preview:first-of-type:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.preview.first-of-month:not(.preview-start,.preview-end,.range-start,.range-end){background-position:center left -5px, center left 17px}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview:last-child:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.preview:last-of-type:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.preview.last-of-month:not(.preview-start,.preview-end,.range-start,.range-end){background-position:center right -5px, center right 17px}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview.last-of-month:first-child:not(.preview-start,.preview-end){background-image:radial-gradient(var(--wmcolor-datepicker-range-background-hover) 16px, transparent 17px), radial-gradient(var(--wmcolor-datepicker-range-background-hover) 16px, transparent 17px), linear-gradient(transparent, transparent 15px, var(--wmcolor-datepicker-range-background-hover) 15px, var(--wmcolor-datepicker-range-background-hover) 29px, transparent 29px);background-position:center left -5px, center right -5px, center;background-size:auto, auto, 9px}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-start:last-child,.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-end:first-child{background-image:radial-gradient(var(--wmcolor-datepicker-range-background-hover) 17px, var(--wmcolor-calendar-day-border-hover) 18px, var(--wmcolor-calendar-day-border-hover) 20px, transparent 21px)}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-start{background-position:center, center left 17px;background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-start:first-child{background-position:center, center left 17px;background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-end{background-position:center, center right 17px;background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-end:last-child{background-position:center, center right 17px;background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-end,.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-start{background-image:radial-gradient(var(--wmcolor-datepicker-range-background-hover) 17px, var(--wmcolor-calendar-day-border-hover) 18px, var(--wmcolor-calendar-day-border-hover) 20px, transparent 21px), var(--range-background-hover)}.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-end:focus-visible,.popup-wrapper .day-view .date-grid .date-cell.in-range.preview-start:focus-visible{outline:none;border:none}.popup-wrapper .day-view .date-grid .date-cell.in-range:first-of-type:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range:first-child:not(.preview-start,.preview-end,.range-start,.range-end),.popup-wrapper .day-view .date-grid .date-cell.in-range.first-of-month:not(.preview-start,.preview-end,.range-start,.range-end){background-image:radial-gradient(var(--wmcolor-datepicker-range-background-selected) 16px, transparent 17px), var(--range-background-selected);background-position:-5px center, center left 17px;background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.in-range:first-of-type:not(.preview-start,.preview-end,.range-start,.range-end):hover,.popup-wrapper .day-view .date-grid .date-cell.in-range:first-child:not(.preview-start,.preview-end,.range-start,.range-end):hover,.popup-wrapper .day-view .date-grid .date-cell.in-range.first-of-month:not(.preview-start,.preview-end,.range-start,.range-end):hover{background-image:radial-gradient(#dbd9ef 20px, transparent 21px), radial-gradient(var(--wmcolor-datepicker-range-background-selected) 16px, transparent 17px), var(--range-background-selected);background-position:center, -5px center, center left 17px;background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.in-range.range-start:last-child:hover,.popup-wrapper .day-view .date-grid .date-cell.in-range.range-end:first-child:hover{background:radial-gradient(#dbd9ef 20px, transparent 21px);background-position:center}.popup-wrapper .day-view .date-grid .date-cell.in-range:last-of-type:not(.range-start,.range-end,.preview),.popup-wrapper .day-view .date-grid .date-cell.in-range:last-child:not(.range-start,.range-end,.preview),.popup-wrapper .day-view .date-grid .date-cell.in-range.last-of-month:not(.range-start,.range-end,.preview){background:radial-gradient(var(--wmcolor-datepicker-range-background-selected) 16px, transparent 17px), var(--range-background-selected);background-position:5px center, center right 17px;background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.in-range:last-of-type:not(.range-start,.range-end,.preview-start,.preview-end):hover,.popup-wrapper .day-view .date-grid .date-cell.in-range:last-child:not(.range-start,.range-end,.preview-start,.preview-end):hover,.popup-wrapper .day-view .date-grid .date-cell.in-range.last-of-month:not(.range-start,.range-end,.preview-start,.preview-end):hover{background-image:radial-gradient(#dbd9ef 20px, transparent 21px), radial-gradient(var(--wmcolor-datepicker-range-background-selected) 16px, transparent 17px), var(--range-background-selected);background-position:center, 5px center, center right 17px;background-repeat:no-repeat}.popup-wrapper .day-view .date-grid .date-cell.today:after{content:"";display:block;position:absolute;inset:auto 0 6px 0;width:6px;aspect-ratio:1;border-radius:50%;justify-self:center;background-color:var(--wmcolor-datepicker-day-background-selected);margin:auto}.popup-wrapper .day-view .date-grid .date-cell.range-start,.popup-wrapper .day-view .date-grid .date-cell.range-end{border-radius:0;margin:0;outline:none;font-weight:600;color:var(--wmcolor-datepicker-day-text-selected)}.popup-wrapper .day-view .date-grid .date-cell.range-start:focus-visible,.popup-wrapper .day-view .date-grid .date-cell.range-end:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-2px;border:none;z-index:11}.popup-wrapper .day-view .date-grid .date-cell.range-start:focus-visible[aria-selected=true],.popup-wrapper .day-view .date-grid .date-cell.range-end:focus-visible[aria-selected=true]{outline-offset:2px}.popup-wrapper .day-view .date-grid .date-cell.range-start{background-image:var(--range-start-svg);-webkit-padding-end:2px;padding-inline-end:2px;background-color:transparent}.popup-wrapper .day-view .date-grid .date-cell.range-start.in-range:not(:hover,:last-of-type,:last-child){background-image:var(--range-start-svg), var(--range-background-selected);border-radius:0}.popup-wrapper .day-view .date-grid .date-cell.range-start.in-range.preview:not(:last-of-type,:last-child){background-image:var(--range-start-svg), var(--range-background-hover)}.popup-wrapper .day-view .date-grid .date-cell.range-end{background-image:var(--range-end-svg);-webkit-padding-start:2px;padding-inline-start:2px;background-color:transparent}.popup-wrapper .day-view .date-grid .date-cell.range-end.in-range:not(:hover,:first-of-type,:first-child){background-image:var(--range-end-svg), var(--range-background-selected);border-radius:0}.popup-wrapper .day-view .date-grid .date-cell.range-end.in-range.preview:not(:first-of-type,:first-child){background-image:var(--range-end-svg), var(--range-background-hover)}.popup-wrapper .day-view .date-grid .date-cell.range-start.range-end{background:var(--wmcolor-datepicker-day-background-selected);border-radius:50%;padding-inline:0;margin:1px;-ms-flex-preferred-size:42px;flex-basis:42px}.popup-wrapper .month-view .months{border-top:2px solid;border-top-color:var(--wmcolor-datepicker-month-border);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.popup-wrapper .month-view .month-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;width:100%;border-bottom:2px solid;border-bottom-color:var(--wmcolor-datepicker-month-border)}.popup-wrapper .month-view .month{border:none;background:white;cursor:pointer;width:7rem;height:4rem;line-height:4rem;font-family:inherit;font-weight:500;color:var(--wmcolor-datepicker-month-text)}.popup-wrapper .month-view .month:not(:last-child){border-right:2px solid;border-right-color:var(--wmcolor-datepicker-month-border)}.popup-wrapper .month-view .month:hover{border-right-color:transparent;background-color:var(--wmcolor-datepicker-month-background-hover)}.popup-wrapper .month-view .month:active,.popup-wrapper .month-view .month.selected{background-color:var(--wmcolor-datepicker-month-background-selected);color:var(--wmcolor-datepicker-month-text-selected)}.popup-wrapper button:focus-visible:not(.preview-start,.preview-end),.popup-wrapper .title-box:focus-visible:not(.preview-start,.preview-end),.popup-wrapper .month.focused:focus-visible:not(.preview-start,.preview-end),.popup-wrapper .date-cell:focus-visible:not(.preview-start,.preview-end){outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-2px;border:none;z-index:11}.popup-wrapper button:focus-visible:not(.preview-start,.preview-end)[aria-selected=true],.popup-wrapper .title-box:focus-visible:not(.preview-start,.preview-end)[aria-selected=true],.popup-wrapper .month.focused:focus-visible:not(.preview-start,.preview-end)[aria-selected=true],.popup-wrapper .date-cell:focus-visible:not(.preview-start,.preview-end)[aria-selected=true]{outline-offset:2px}.popup-range{display:-ms-flexbox;display:flex}.popup{width:21rem}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{c as priv_calendar}
|