@watermarkinsights/ripple 3.8.0-8 → 3.8.0
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/{functions-f40cb19b.js → functions-b90816b8.js} +2 -2
- package/dist/cjs/{global-619e76b2.js → global-0eb4b183.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
- package/dist/cjs/priv-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/ripple.cjs.js +1 -1
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/wm-button.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +1 -1
- package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-input.cjs.entry.js +1 -1
- package/dist/cjs/wm-modal-header.cjs.entry.js +1 -1
- package/dist/cjs/wm-modal.cjs.entry.js +1 -1
- package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
- package/dist/cjs/wm-network-uploader.cjs.entry.js +1 -1
- package/dist/cjs/wm-option_2.cjs.entry.js +1 -1
- package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
- package/dist/cjs/wm-search.cjs.entry.js +1 -1
- package/dist/cjs/wm-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +1 -1
- package/dist/cjs/wm-tag-input.cjs.entry.js +1 -1
- package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/wm-uploader.cjs.entry.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.js +1 -1
- package/dist/esm/{functions-bab72507.js → functions-8d09a511.js} +2 -2
- package/dist/esm/{global-8bbc13f5.js → global-01afc908.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/priv-chart-popover.entry.js +1 -1
- package/dist/esm/priv-datepicker.entry.js +1 -1
- package/dist/esm/ripple.js +1 -1
- package/dist/esm/wm-action-menu_2.entry.js +1 -1
- package/dist/esm/wm-button.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +1 -1
- package/dist/esm/wm-datepicker.entry.js +1 -1
- package/dist/esm/wm-input.entry.js +1 -1
- package/dist/esm/wm-modal-header.entry.js +1 -1
- package/dist/esm/wm-modal.entry.js +1 -1
- package/dist/esm/wm-navigation_3.entry.js +2 -2
- package/dist/esm/wm-navigator.entry.js +1 -1
- package/dist/esm/wm-network-uploader.entry.js +1 -1
- package/dist/esm/wm-option_2.entry.js +1 -1
- package/dist/esm/wm-pagination.entry.js +1 -1
- package/dist/esm/wm-search.entry.js +1 -1
- package/dist/esm/wm-snackbar.entry.js +1 -1
- package/dist/esm/wm-tab-item_3.entry.js +1 -1
- package/dist/esm/wm-tag-input.entry.js +1 -1
- package/dist/esm/wm-timepicker.entry.js +1 -1
- package/dist/esm/wm-toggletip.entry.js +1 -1
- package/dist/esm/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/{functions-bab72507.js → functions-8d09a511.js} +1 -1
- package/dist/esm-es5/global-01afc908.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-datepicker.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/ripple/{p-8f536b53.entry.js → p-0019a53b.entry.js} +1 -1
- package/dist/ripple/{p-937ad4f8.entry.js → p-09508c2d.entry.js} +1 -1
- package/dist/ripple/{p-6b918dc6.system.entry.js → p-142d292c.system.entry.js} +1 -1
- package/dist/ripple/p-1aea9937.system.entry.js +1 -0
- package/dist/ripple/{p-1bdaf8f4.entry.js → p-1ef19ec1.entry.js} +1 -1
- package/dist/ripple/p-2041fb68.entry.js +1 -0
- package/dist/ripple/{p-4eca954a.system.js → p-253a08fe.system.js} +1 -1
- package/dist/ripple/{p-1cf84785.entry.js → p-27f0d9be.entry.js} +1 -1
- package/dist/ripple/{p-cf04a67d.system.entry.js → p-34e0410e.system.entry.js} +1 -1
- package/dist/ripple/{p-31b2238d.system.entry.js → p-39eea6bd.system.entry.js} +1 -1
- package/dist/ripple/{p-9cda12ea.entry.js → p-3b6b7618.entry.js} +1 -1
- package/dist/ripple/{p-f97f1a13.system.entry.js → p-44342459.system.entry.js} +1 -1
- package/dist/ripple/{p-cc49e5a7.system.js → p-453dcff5.system.js} +1 -1
- package/dist/ripple/{p-23d007e1.system.entry.js → p-53caf7e4.system.entry.js} +1 -1
- package/dist/ripple/{p-705daf9c.system.entry.js → p-56963e2f.system.entry.js} +1 -1
- package/dist/ripple/{p-9ebb877f.entry.js → p-597985b9.entry.js} +1 -1
- package/dist/ripple/{p-4fdd9f45.entry.js → p-5adc422a.entry.js} +1 -1
- package/dist/ripple/{p-0829f91e.system.entry.js → p-5bc67a90.system.entry.js} +1 -1
- package/dist/ripple/{p-1a1a5bfe.system.entry.js → p-5e0d47b9.system.entry.js} +1 -1
- package/dist/ripple/{p-2e5c991e.entry.js → p-67f74636.entry.js} +1 -1
- package/dist/ripple/{p-213fde22.system.entry.js → p-6c65643e.system.entry.js} +1 -1
- package/dist/ripple/{p-806d1f78.entry.js → p-71a400fd.entry.js} +1 -1
- package/dist/ripple/{p-e9770d99.system.entry.js → p-7484c4e6.system.entry.js} +1 -1
- package/dist/ripple/{p-1c680aef.system.entry.js → p-7913283e.system.entry.js} +1 -1
- package/dist/ripple/{p-d0478903.entry.js → p-8af7c223.entry.js} +1 -1
- package/dist/ripple/{p-c07ead2a.system.entry.js → p-8e2cbae6.system.entry.js} +1 -1
- package/dist/ripple/{p-1eeccf23.system.entry.js → p-93b1c864.system.entry.js} +1 -1
- package/dist/ripple/{p-4209831e.entry.js → p-99d610f9.entry.js} +1 -1
- package/dist/ripple/{p-3a9e5917.system.entry.js → p-9de1bcc5.system.entry.js} +1 -1
- package/dist/ripple/{p-a71df582.system.entry.js → p-a605a78b.system.entry.js} +1 -1
- package/dist/ripple/{p-bf63bb07.js → p-a8d66745.js} +1 -1
- package/dist/ripple/{p-bbaab9b6.entry.js → p-adde97b9.entry.js} +1 -1
- package/dist/ripple/p-bb796d63.system.js +1 -0
- package/dist/ripple/{p-eaa9cebd.entry.js → p-bd449bb6.entry.js} +1 -1
- package/dist/ripple/{p-96c4dc9e.entry.js → p-bdd8caf1.entry.js} +1 -1
- package/dist/ripple/{p-0e69fab1.entry.js → p-bf3c22d9.entry.js} +1 -1
- package/dist/ripple/{p-d0674295.system.entry.js → p-c043d040.system.entry.js} +1 -1
- package/dist/ripple/{p-a8c489cb.system.entry.js → p-c8040acd.system.entry.js} +1 -1
- package/dist/ripple/{p-6ae89155.entry.js → p-c9284e6b.entry.js} +1 -1
- package/dist/ripple/{p-4027ec1c.entry.js → p-cd75be7a.entry.js} +1 -1
- package/dist/ripple/{p-cc4fa5ac.entry.js → p-cdd5ce00.entry.js} +1 -1
- package/dist/ripple/p-d59b3b74.js +1 -0
- package/dist/ripple/{p-abbfcf28.entry.js → p-d680d98f.entry.js} +1 -1
- package/dist/ripple/{p-e218688f.system.entry.js → p-dc0e6d55.system.entry.js} +1 -1
- package/dist/ripple/{p-e961c483.system.entry.js → p-dcfe93ea.system.entry.js} +1 -1
- package/dist/ripple/{p-27e06d30.entry.js → p-dd6b9aee.entry.js} +1 -1
- package/dist/ripple/{p-1ea471c2.system.entry.js → p-f6b0fd8d.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/global-8bbc13f5.js +0 -1
- package/dist/ripple/p-35fe1e16.js +0 -1
- package/dist/ripple/p-6f0779a0.system.js +0 -1
- package/dist/ripple/p-8c09409a.system.entry.js +0 -1
- package/dist/ripple/p-bae0a8a9.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as r,h as t,H as i,g as o}from"./p-38062c39.js";import{i as s,g as a,l as n,e as p}from"./p-bf63bb07.js";let l=class{constructor(t){e(this,t),this.wmTimepickerNewValidValue=r(this,"wmTimepickerNewValidValue",7),this.wmTimepickerOnChange=r(this,"wmTimepickerOnChange",7),this.disabled=!1,this.value="",this.label="",this.labelPosition="top",this.requiredField=!1,this.isExpanded=!1,this.isTabbing=!1,this.twelveHrValid=/^(0?[0-9]|1[0-2])\s*:?\s*([0-5][0-9])?\s?(a|p|am|pm)?$/i,this.twentyFourHrValid=/^(0?[0-9]|1[0-9]|2[0-4])\s*:?\s*([0-5][0-9])?$/,this.uid="",this.timeFormat="hh:mm",this.times=[],this.openUp=!1,this.buttonAriaLabel=s.formatMessage({id:"time.selectTime",defaultMessage:"Select time",description:"Button text for screen readers."})}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKey(e){switch(e.key){case"ArrowDown":e.preventDefault(),!1===this.isExpanded?this.open("next"):this.moveDown(this.selectedOption);break;case"ArrowUp":e.preventDefault(),!1===this.isExpanded?this.open("previous"):this.moveUp(this.selectedOption);break;case"Enter":case" ":this.isExpanded&&(e.preventDefault(),this.handleOptionClick(this.selectedOption.textContent));break;case"Escape":e.preventDefault(),this.isExpanded&&(e.stopPropagation(),this.close());break;case"Tab":this.isExpanded&&this.close(!1);break;case"Home":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"));break;case"End":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}}updateErrorState(){this.displayedErrorMessage=this.errorMessage}componentWillLoad(){""===this.label&&console.error("You must include a label prop for the timepicker (for accessibility reasons), even if the label position is none."),this.el.focus=function(){this.disabled||this.shadowRoot.querySelector("input").focus()},this.uid=this.el.id?this.el.id:a(),this.updateErrorState(),this.timeFormat=s.formatMessage({id:"time.timeFormat",defaultMessage:"hh:mm"}),this.times=this.generateTimes()}componentDidLoad(){this.optionsEl.classList.add("hidden"),this.optionsList=Array.from(this.optionsEl.querySelectorAll("li")),this.value&&this.processInput()}isValidTime(e){return this.twelveHrValid.test(e)||this.twentyFourHrValid.test(e)}generateTimes(){let e=[],r=0;for(let t=0;r<1440;t++){const i=Math.floor(r/60).toString().padStart(2,"0"),o=(r%60).toString().padStart(2,"0");e[t]=`${i}:${o}`,r+=15}return e}findNearestTimeInterval(e){let r=this.formatToStorage(e);const t=parseInt(r.slice(3,5));if(t%15!=0){const i=parseInt(r.slice(0,2));let o=(15*Math.round(t/15)).toString().padStart(2,"0");if("60"===o){o="00";let e=i+1;24===e&&(e=0),r=r.replace(`${i.toString().padStart(2,"0")}:`,`${e.toString().padStart(2,"0")}:`)}parseInt(o)<8&&(o="00"),e=r.replace(`:${t.toString().padStart(2,"0")}`,`:${o}`)}return e}handleListSelection(e){e=this.findNearestTimeInterval(e);const r=this.optionsList.filter((r=>r.textContent==this.formatToDisplay(e)))[0];r&&this.focusOption(r)}setValue(e){const r=this.value;this.inputEl.value=this.formatToDisplay(e),this.value=this.formatToStorage(e),this.handleListSelection(e),r!==this.value&&this.wmTimepickerNewValidValue.emit({value:this.value}),this.wmTimepickerOnChange.emit({value:this.value,isValid:!!this.displayedErrorMessage})}processInput(){this.isValidTime(this.value)&&this.setValue(this.value);const e=this.determineErrorMessage();this.displayedErrorMessage=e}determineErrorMessage(){let e=this.errorMessage;const r=s.formatMessage({id:"time.requiredError",defaultMessage:"A time is required."}),t=s.formatMessage({id:"time.invalidTime",defaultMessage:"Please enter a valid time."}),i=this.isValidTime(this.value);return i&&!this.errorMessage?e=null:i||this.errorMessage||(e=this.requiredField&&!this.value?r:this.value?t:null),e}splitTime(e){const r=this.twelveHrValid.exec(e)||this.twentyFourHrValid.exec(e);let t=parseInt(r[1]),i=r[2]||"00",o=r?r[3]:void 0;return 0===t&&(null==o?void 0:o.toUpperCase().includes("P"))&&(o="AM"),[t,i,o]}formatToDisplay(e){let[r,t,i]=this.splitTime(e);return 12!==r||i||(i="PM"),0!==r&&24!==r||(r=12),r>12&&(r-=12,i="PM"),i=i&&i.toUpperCase().includes("P")?"PM":"AM",`${r.toString().padStart(2,"0")}:${t} ${i}`}formatToStorage(e){let[r,t,i]=this.splitTime(e);return 24===r&&(r=0),12===r&&i&&i.toUpperCase().includes("A")&&(r-=12),i&&i.toUpperCase().includes("P")&&12!==r&&(r+=12),`${r.toString().padStart(2,"0")}:${t}`}open(e){this.openUp=n(this.el,this.optionsEl),this.isExpanded=!0,this.optionsEl.classList.remove("hidden"),!this.errorMessage&&this.value||this.handleListSelection("09:00"),this.setDropdownPosition("center",this.selectedOption),this.focusOption(this.selectedOption),window.requestAnimationFrame((()=>{"next"===e?this.moveDown(this.selectedOption):"previous"===e&&this.moveUp(this.selectedOption)}))}close(e=!0){this.isExpanded=!1,window.setTimeout((()=>{this.optionsEl.classList.add("hidden"),e&&this.buttonEl.focus()}),150)}focusOption(e){this.optionsList.forEach((e=>{e.tabIndex=-1})),e.tabIndex=0,this.selectedOption=e,e.focus()}setDropdownPosition(e,r){switch(e){case"top":this.optionsEl.scrollTop=(null==r?void 0:r.previousElementSibling).getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop;break;case"bottom":this.optionsEl.scrollTop=(null==r?void 0:r.nextElementSibling).getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight;break;case"center":this.optionsEl.scrollTop=(this.optionsList.findIndex((e=>e.textContent===(null==r?void 0:r.textContent)))-2)*r.offsetHeight;break;case"first":this.optionsEl.scrollTop=0;break;case"last":this.optionsEl.scrollTop=this.optionsList[0].clientHeight*this.optionsList.length}}moveUp(e){const r=e.previousElementSibling;r?(r.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top&&this.setDropdownPosition("top",e),this.focusOption(r)):(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}moveDown(e){const r=e.nextElementSibling;r?(r.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom&&this.setDropdownPosition("bottom",e),this.focusOption(r)):(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"))}handleOptionClick(e){this.close(),this.setValue(e),this.processInput()}handleInput(){this.value=this.inputEl.value,this.isValidTime(this.value)&&(this.handleListSelection(this.findNearestTimeInterval(this.value)),this.setDropdownPosition("center",this.selectedOption))}handleInputBlur(e){this.preventValidation&&p(e,this.preventValidation)||this.processInput(),this.tpWrapper.classList.remove("focus")}renderOptions(){return this.times.map(((e,r)=>t("li",{id:`option${r+1}`,role:"option",onClick:()=>this.handleOptionClick(e)},this.formatToDisplay(e))))}render(){return t(i,{id:this.uid,invalid:this.displayedErrorMessage?"true":null,onBlur:()=>this.close(!1)},t("div",{class:`wrapper label-${this.labelPosition} ${this.displayedErrorMessage?"invalid":""}`,ref:e=>this.tpWrapper=e},t("div",{class:"label-wrapper"},"none"!==this.labelPosition&&t("label",{id:`label-${this.uid}`,class:"label",htmlFor:`time-input-${this.uid}`},this.label,this.requiredField&&t("span",{class:"required","aria-hidden":"true"},"*"))),t("div",null,t("div",{class:"inner-wrapper"},t("input",{id:`time-input-${this.uid}`,"aria-label":this.label,"aria-describedby":`error-${this.uid}`,ref:e=>this.inputEl=e,onBlur:e=>this.handleInputBlur(e),onInput:()=>this.handleInput(),disabled:this.disabled,required:this.requiredField,placeholder:this.timeFormat,autocomplete:"off",onFocus:()=>this.tpWrapper.classList.add("focus")}),t("button",{id:`btn-${this.uid}`,class:this.isTabbing?"user-is-tabbing":"",ref:e=>this.buttonEl=e,disabled:this.disabled,"aria-controls":`list-${this.uid}`,"aria-expanded":this.isExpanded?"true":"false","aria-label":this.buttonAriaLabel,"aria-describedby":`time-input-${this.uid}`,onClick:()=>this.isExpanded?this.close():this.open(),onMouseDown:e=>{e.preventDefault(),this.buttonEl.focus()}},t("span",{class:"clock"})),t("ul",{class:`options ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,id:`list-${this.uid}`,role:"listbox","aria-labelledby":`label-${this.uid}`,"aria-describedby":this.isExpanded?"collapsed":null,tabindex:-1,ref:e=>this.optionsEl=e},this.renderOptions())),t("div",{id:`error-${this.uid}`,class:"error","aria-live":"assertive","aria-atomic":"true"},this.displayedErrorMessage))))}get el(){return o(this)}static get watchers(){return{errorMessage:["updateErrorState"]}}};l.style=':host,wm-timepicker{font-family:inherit}:host *,wm-timepicker *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .sr-only,wm-timepicker .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}:host .wrapper,wm-timepicker .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,wm-timepicker .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-timepicker .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-timepicker .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-timepicker .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-timepicker .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,wm-timepicker .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,wm-timepicker .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-timepicker .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,[dir=RTL] wm-timepicker .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-timepicker .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper,wm-timepicker .wrapper .inner-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .inner-wrapper input,wm-timepicker .wrapper .inner-wrapper input{-moz-border-top-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-bottom-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none;font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;height:100%;-ms-flex:1;flex:1;margin:0;font-family:inherit}:host .wrapper .inner-wrapper input:disabled,wm-timepicker .wrapper .inner-wrapper input:disabled{background-color:#f0f0f0;color:#737373}:host .wrapper .inner-wrapper input:focus,wm-timepicker .wrapper .inner-wrapper input:focus{outline:none}:host .wrapper .inner-wrapper button,wm-timepicker .wrapper .inner-wrapper button{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:#fff;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button .clock::after,wm-timepicker .wrapper .inner-wrapper button .clock::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:"\\f150";color:#575195;font-size:1.5rem;padding:0;line-height:2.5rem}:host .wrapper .inner-wrapper button:hover,wm-timepicker .wrapper .inner-wrapper button:hover{background:#e6e6e6;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled,wm-timepicker .wrapper .inner-wrapper button:disabled{background-color:rgba(74, 74, 74, 0.05);pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled .clock::after,wm-timepicker .wrapper .inner-wrapper button:disabled .clock::after{color:#7b7b7b}[dir=RTL] :host .wrapper .inner-wrapper button,[dir=RTL] wm-timepicker .wrapper .inner-wrapper button{right:auto;left:0}:host .wrapper .inner-wrapper button:focus,wm-timepicker .wrapper .inner-wrapper button:focus{outline:none}:host .wrapper .inner-wrapper button.user-is-tabbing:focus,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper button::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper .options,wm-timepicker .wrapper .inner-wrapper .options{margin:0;padding:0;-webkit-overflow-scrolling:touch;overflow:auto;max-height:19.0625rem;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-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;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:2.5rem;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .wrapper .inner-wrapper .options.upwards,wm-timepicker .wrapper .inner-wrapper .options.upwards{top:unset;bottom:2.5rem;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .wrapper .inner-wrapper .options.hidden,wm-timepicker .wrapper .inner-wrapper .options.hidden{visibility:hidden}:host .wrapper .inner-wrapper .options [role=option],wm-timepicker .wrapper .inner-wrapper .options [role=option]{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a}:host .wrapper .inner-wrapper .options [role=option]:hover,wm-timepicker .wrapper .inner-wrapper .options [role=option]:hover{background:#f4f4f4;outline:none}:host .wrapper .inner-wrapper .options [role=option]:focus,wm-timepicker .wrapper .inner-wrapper .options [role=option]:focus{outline:none;background:#f4f4f4}:host .wrapper .inner-wrapper .options [role=option]:not(:last-child),wm-timepicker .wrapper .inner-wrapper .options [role=option]:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .wrapper .inner-wrapper .options.open,wm-timepicker .wrapper .inner-wrapper .options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper.invalid .inner-wrapper,wm-timepicker .wrapper.invalid .inner-wrapper{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .wrapper.invalid .error,wm-timepicker .wrapper.invalid .error{color:#c0392b;margin-top:4px;margin-bottom:4px;display:block;top:100%;left:0;font-style:italic}:host .wrapper:focus .inner-wrapper,:host .wrapper.focus .inner-wrapper,wm-timepicker .wrapper:focus .inner-wrapper,wm-timepicker .wrapper.focus .inner-wrapper{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}';export{l as wm_timepicker}
|
|
1
|
+
import{r as e,c as r,h as t,H as i,g as o}from"./p-38062c39.js";import{i as s,g as a,l as n,e as p}from"./p-a8d66745.js";let l=class{constructor(t){e(this,t),this.wmTimepickerNewValidValue=r(this,"wmTimepickerNewValidValue",7),this.wmTimepickerOnChange=r(this,"wmTimepickerOnChange",7),this.disabled=!1,this.value="",this.label="",this.labelPosition="top",this.requiredField=!1,this.isExpanded=!1,this.isTabbing=!1,this.twelveHrValid=/^(0?[0-9]|1[0-2])\s*:?\s*([0-5][0-9])?\s?(a|p|am|pm)?$/i,this.twentyFourHrValid=/^(0?[0-9]|1[0-9]|2[0-4])\s*:?\s*([0-5][0-9])?$/,this.uid="",this.timeFormat="hh:mm",this.times=[],this.openUp=!1,this.buttonAriaLabel=s.formatMessage({id:"time.selectTime",defaultMessage:"Select time",description:"Button text for screen readers."})}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKey(e){switch(e.key){case"ArrowDown":e.preventDefault(),!1===this.isExpanded?this.open("next"):this.moveDown(this.selectedOption);break;case"ArrowUp":e.preventDefault(),!1===this.isExpanded?this.open("previous"):this.moveUp(this.selectedOption);break;case"Enter":case" ":this.isExpanded&&(e.preventDefault(),this.handleOptionClick(this.selectedOption.textContent));break;case"Escape":e.preventDefault(),this.isExpanded&&(e.stopPropagation(),this.close());break;case"Tab":this.isExpanded&&this.close(!1);break;case"Home":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"));break;case"End":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}}updateErrorState(){this.displayedErrorMessage=this.errorMessage}componentWillLoad(){""===this.label&&console.error("You must include a label prop for the timepicker (for accessibility reasons), even if the label position is none."),this.el.focus=function(){this.disabled||this.shadowRoot.querySelector("input").focus()},this.uid=this.el.id?this.el.id:a(),this.updateErrorState(),this.timeFormat=s.formatMessage({id:"time.timeFormat",defaultMessage:"hh:mm"}),this.times=this.generateTimes()}componentDidLoad(){this.optionsEl.classList.add("hidden"),this.optionsList=Array.from(this.optionsEl.querySelectorAll("li")),this.value&&this.processInput()}isValidTime(e){return this.twelveHrValid.test(e)||this.twentyFourHrValid.test(e)}generateTimes(){let e=[],r=0;for(let t=0;r<1440;t++){const i=Math.floor(r/60).toString().padStart(2,"0"),o=(r%60).toString().padStart(2,"0");e[t]=`${i}:${o}`,r+=15}return e}findNearestTimeInterval(e){let r=this.formatToStorage(e);const t=parseInt(r.slice(3,5));if(t%15!=0){const i=parseInt(r.slice(0,2));let o=(15*Math.round(t/15)).toString().padStart(2,"0");if("60"===o){o="00";let e=i+1;24===e&&(e=0),r=r.replace(`${i.toString().padStart(2,"0")}:`,`${e.toString().padStart(2,"0")}:`)}parseInt(o)<8&&(o="00"),e=r.replace(`:${t.toString().padStart(2,"0")}`,`:${o}`)}return e}handleListSelection(e){e=this.findNearestTimeInterval(e);const r=this.optionsList.filter((r=>r.textContent==this.formatToDisplay(e)))[0];r&&this.focusOption(r)}setValue(e){const r=this.value;this.inputEl.value=this.formatToDisplay(e),this.value=this.formatToStorage(e),this.handleListSelection(e),r!==this.value&&this.wmTimepickerNewValidValue.emit({value:this.value}),this.wmTimepickerOnChange.emit({value:this.value,isValid:!!this.displayedErrorMessage})}processInput(){this.isValidTime(this.value)&&this.setValue(this.value);const e=this.determineErrorMessage();this.displayedErrorMessage=e}determineErrorMessage(){let e=this.errorMessage;const r=s.formatMessage({id:"time.requiredError",defaultMessage:"A time is required."}),t=s.formatMessage({id:"time.invalidTime",defaultMessage:"Please enter a valid time."}),i=this.isValidTime(this.value);return i&&!this.errorMessage?e=null:i||this.errorMessage||(e=this.requiredField&&!this.value?r:this.value?t:null),e}splitTime(e){const r=this.twelveHrValid.exec(e)||this.twentyFourHrValid.exec(e);let t=parseInt(r[1]),i=r[2]||"00",o=r?r[3]:void 0;return 0===t&&(null==o?void 0:o.toUpperCase().includes("P"))&&(o="AM"),[t,i,o]}formatToDisplay(e){let[r,t,i]=this.splitTime(e);return 12!==r||i||(i="PM"),0!==r&&24!==r||(r=12),r>12&&(r-=12,i="PM"),i=i&&i.toUpperCase().includes("P")?"PM":"AM",`${r.toString().padStart(2,"0")}:${t} ${i}`}formatToStorage(e){let[r,t,i]=this.splitTime(e);return 24===r&&(r=0),12===r&&i&&i.toUpperCase().includes("A")&&(r-=12),i&&i.toUpperCase().includes("P")&&12!==r&&(r+=12),`${r.toString().padStart(2,"0")}:${t}`}open(e){this.openUp=n(this.el,this.optionsEl),this.isExpanded=!0,this.optionsEl.classList.remove("hidden"),!this.errorMessage&&this.value||this.handleListSelection("09:00"),this.setDropdownPosition("center",this.selectedOption),this.focusOption(this.selectedOption),window.requestAnimationFrame((()=>{"next"===e?this.moveDown(this.selectedOption):"previous"===e&&this.moveUp(this.selectedOption)}))}close(e=!0){this.isExpanded=!1,window.setTimeout((()=>{this.optionsEl.classList.add("hidden"),e&&this.buttonEl.focus()}),150)}focusOption(e){this.optionsList.forEach((e=>{e.tabIndex=-1})),e.tabIndex=0,this.selectedOption=e,e.focus()}setDropdownPosition(e,r){switch(e){case"top":this.optionsEl.scrollTop=(null==r?void 0:r.previousElementSibling).getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop;break;case"bottom":this.optionsEl.scrollTop=(null==r?void 0:r.nextElementSibling).getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight;break;case"center":this.optionsEl.scrollTop=(this.optionsList.findIndex((e=>e.textContent===(null==r?void 0:r.textContent)))-2)*r.offsetHeight;break;case"first":this.optionsEl.scrollTop=0;break;case"last":this.optionsEl.scrollTop=this.optionsList[0].clientHeight*this.optionsList.length}}moveUp(e){const r=e.previousElementSibling;r?(r.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top&&this.setDropdownPosition("top",e),this.focusOption(r)):(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}moveDown(e){const r=e.nextElementSibling;r?(r.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom&&this.setDropdownPosition("bottom",e),this.focusOption(r)):(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"))}handleOptionClick(e){this.close(),this.setValue(e),this.processInput()}handleInput(){this.value=this.inputEl.value,this.isValidTime(this.value)&&(this.handleListSelection(this.findNearestTimeInterval(this.value)),this.setDropdownPosition("center",this.selectedOption))}handleInputBlur(e){this.preventValidation&&p(e,this.preventValidation)||this.processInput(),this.tpWrapper.classList.remove("focus")}renderOptions(){return this.times.map(((e,r)=>t("li",{id:`option${r+1}`,role:"option",onClick:()=>this.handleOptionClick(e)},this.formatToDisplay(e))))}render(){return t(i,{id:this.uid,invalid:this.displayedErrorMessage?"true":null,onBlur:()=>this.close(!1)},t("div",{class:`wrapper label-${this.labelPosition} ${this.displayedErrorMessage?"invalid":""}`,ref:e=>this.tpWrapper=e},t("div",{class:"label-wrapper"},"none"!==this.labelPosition&&t("label",{id:`label-${this.uid}`,class:"label",htmlFor:`time-input-${this.uid}`},this.label,this.requiredField&&t("span",{class:"required","aria-hidden":"true"},"*"))),t("div",null,t("div",{class:"inner-wrapper"},t("input",{id:`time-input-${this.uid}`,"aria-label":this.label,"aria-describedby":`error-${this.uid}`,ref:e=>this.inputEl=e,onBlur:e=>this.handleInputBlur(e),onInput:()=>this.handleInput(),disabled:this.disabled,required:this.requiredField,placeholder:this.timeFormat,autocomplete:"off",onFocus:()=>this.tpWrapper.classList.add("focus")}),t("button",{id:`btn-${this.uid}`,class:this.isTabbing?"user-is-tabbing":"",ref:e=>this.buttonEl=e,disabled:this.disabled,"aria-controls":`list-${this.uid}`,"aria-expanded":this.isExpanded?"true":"false","aria-label":this.buttonAriaLabel,"aria-describedby":`time-input-${this.uid}`,onClick:()=>this.isExpanded?this.close():this.open(),onMouseDown:e=>{e.preventDefault(),this.buttonEl.focus()}},t("span",{class:"clock"})),t("ul",{class:`options ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,id:`list-${this.uid}`,role:"listbox","aria-labelledby":`label-${this.uid}`,"aria-describedby":this.isExpanded?"collapsed":null,tabindex:-1,ref:e=>this.optionsEl=e},this.renderOptions())),t("div",{id:`error-${this.uid}`,class:"error","aria-live":"assertive","aria-atomic":"true"},this.displayedErrorMessage))))}get el(){return o(this)}static get watchers(){return{errorMessage:["updateErrorState"]}}};l.style=':host,wm-timepicker{font-family:inherit}:host *,wm-timepicker *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .sr-only,wm-timepicker .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}:host .wrapper,wm-timepicker .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,wm-timepicker .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-timepicker .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-timepicker .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-timepicker .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-timepicker .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,wm-timepicker .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,wm-timepicker .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-timepicker .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,[dir=RTL] wm-timepicker .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-timepicker .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper,wm-timepicker .wrapper .inner-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .inner-wrapper input,wm-timepicker .wrapper .inner-wrapper input{-moz-border-top-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-bottom-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none;font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;height:100%;-ms-flex:1;flex:1;margin:0;font-family:inherit}:host .wrapper .inner-wrapper input:disabled,wm-timepicker .wrapper .inner-wrapper input:disabled{background-color:#f0f0f0;color:#737373}:host .wrapper .inner-wrapper input:focus,wm-timepicker .wrapper .inner-wrapper input:focus{outline:none}:host .wrapper .inner-wrapper button,wm-timepicker .wrapper .inner-wrapper button{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:#fff;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button .clock::after,wm-timepicker .wrapper .inner-wrapper button .clock::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:"\\f150";color:#575195;font-size:1.5rem;padding:0;line-height:2.5rem}:host .wrapper .inner-wrapper button:hover,wm-timepicker .wrapper .inner-wrapper button:hover{background:#e6e6e6;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled,wm-timepicker .wrapper .inner-wrapper button:disabled{background-color:rgba(74, 74, 74, 0.05);pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled .clock::after,wm-timepicker .wrapper .inner-wrapper button:disabled .clock::after{color:#7b7b7b}[dir=RTL] :host .wrapper .inner-wrapper button,[dir=RTL] wm-timepicker .wrapper .inner-wrapper button{right:auto;left:0}:host .wrapper .inner-wrapper button:focus,wm-timepicker .wrapper .inner-wrapper button:focus{outline:none}:host .wrapper .inner-wrapper button.user-is-tabbing:focus,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper button::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper .options,wm-timepicker .wrapper .inner-wrapper .options{margin:0;padding:0;-webkit-overflow-scrolling:touch;overflow:auto;max-height:19.0625rem;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-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;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:2.5rem;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .wrapper .inner-wrapper .options.upwards,wm-timepicker .wrapper .inner-wrapper .options.upwards{top:unset;bottom:2.5rem;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .wrapper .inner-wrapper .options.hidden,wm-timepicker .wrapper .inner-wrapper .options.hidden{visibility:hidden}:host .wrapper .inner-wrapper .options [role=option],wm-timepicker .wrapper .inner-wrapper .options [role=option]{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a}:host .wrapper .inner-wrapper .options [role=option]:hover,wm-timepicker .wrapper .inner-wrapper .options [role=option]:hover{background:#f4f4f4;outline:none}:host .wrapper .inner-wrapper .options [role=option]:focus,wm-timepicker .wrapper .inner-wrapper .options [role=option]:focus{outline:none;background:#f4f4f4}:host .wrapper .inner-wrapper .options [role=option]:not(:last-child),wm-timepicker .wrapper .inner-wrapper .options [role=option]:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .wrapper .inner-wrapper .options.open,wm-timepicker .wrapper .inner-wrapper .options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper.invalid .inner-wrapper,wm-timepicker .wrapper.invalid .inner-wrapper{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .wrapper.invalid .error,wm-timepicker .wrapper.invalid .error{color:#c0392b;margin-top:4px;margin-bottom:4px;display:block;top:100%;left:0;font-style:italic}:host .wrapper:focus .inner-wrapper,:host .wrapper.focus .inner-wrapper,wm-timepicker .wrapper:focus .inner-wrapper,wm-timepicker .wrapper.focus .inner-wrapper{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}';export{l as wm_timepicker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as o}from"./p-38062c39.js";import{n,g as r,l as h,q as a}from"./p-bf63bb07.js";import{g as m}from"./p-888bec42.js";let l=class{constructor(s){t(this,s),this.wmActionMenuLoaded=i(this,"wmActionMenuLoaded",7),this.menuLoaded=i(this,"menuLoaded",7),this.openUp=!1,this.isExpanded=!1,this.actionMenuType=null,this.buttonType=null,this.disabled=!1,this.keysSoFar="",this.searchIndex=0,this.keyClear=null}get horizontalPosition(){return this.el&&this.itemsEl&&n(this.el,this.itemsEl)?"right":"left"}get childItems(){return Array.from(this.el.querySelectorAll("wm-menuitem"))}get tempActionMenuType(){return this.actionMenuType||this.buttonType||"icon"}handleClickedItem(){this.close()}handleKeyUp(t){this.moveUp(t.target)}handleKeyDown(t){this.moveDown(t.detail)}handleHomeKey(){this.focusFirstItem()}handleEndKey(){this.focusLastItem()}handleTabKey(){this.isExpanded&&this.close()}handleEscKey(){this.close(),this.wmButtonEl.focus()}handleClick(t){t.target!==this.el&&!this.el.contains(t.target)&&this.isExpanded&&this.close()}handleKey(t){switch(t.key){case"ArrowDown":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusFirstItem())));break;case"ArrowUp":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusLastItem())))}}handleMenuitemBlur(t){if(t.detail.relatedTarget!==this.el&&!this.el.contains(t.detail.relatedTarget)){const i=new CustomEvent("blur");i.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(i)}}handleButtonBlur(t){(t.relatedTarget===this.el||this.el.contains(t.relatedTarget))&&t.stopPropagation()}componentWillLoad(){this.uid=this.el.id?this.el.id:r(),this.el.focus=function(){if(!this.disabled){const t=this.shadowRoot.querySelector("wm-button");t&&t.focus()}},this.buttonType&&console.warn("wm-action-menu: button-type has been deprecated as of v3.1.0. Please use action-menu-type instead.")}componentDidLoad(){0===this.childItems.length?console.error("wm-action-menu should have wm-menuitem elements as children"):this.focusFirstItem(),"icon"===this.tempActionMenuType||this.buttonText||console.error("wm-action-menu should have a valid button-text property when button-type is set to 'text' or 'selector'"),"icon"!==this.tempActionMenuType||this.tooltip||console.error("wm-action-menu should have a valid tooltip when button-type is set to 'icon'"),this.wmActionMenuLoaded.emit(),this.menuLoaded.emit()}moveUp(t){const i=this.childItems.indexOf(t);0===i?this.focusLastItem():this.focusItem(this.childItems[i-1])}moveDown(t){const i=this.childItems.indexOf(t);i===this.childItems.length-1?this.focusFirstItem():this.focusItem(this.childItems[i+1])}open(){this.disabled||(this.openUp=h(this.el,this.itemsEl),this.isExpanded=!0,this.itemsEl.classList.remove("hidden"),window.requestAnimationFrame((()=>this.focusFirstItem())))}close(t=!0){this.isExpanded=!1,this.childItems.forEach((t=>t.focused=!1)),window.setTimeout((()=>{this.itemsEl.classList.add("hidden")}),150),window.setTimeout((()=>{!t||"BODY"!==document.activeElement.tagName&&"WM-MENUITEM"!==document.activeElement.tagName||this.wmButtonEl.focus()}),250)}focusItem(t){this.childItems.map((i=>i.focused=i===t)),t.focus&&t.focus()}focusFirstItem(){this.focusItem(this.childItems[0])}focusLastItem(){this.focusItem(this.childItems[this.childItems.length-1])}findAndFocusItem(t){const i=t.detail.toUpperCase();if(this.focusFirstItem(),!this.keysSoFar)for(var s=0;s<this.childItems.length;s++)this.childItems[s]===document.activeElement&&(this.searchIndex=s);this.keysSoFar+=i,this.clearKeysSoFarAfterDelay();var e=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);e||(e=this.findMatchInRange(this.childItems,0,this.searchIndex)),e&&this.focusItem(e)}clearKeysSoFarAfterDelay(){this.keyClear&&(window.clearTimeout(this.keyClear),this.keyClear=null),this.keyClear=window.setTimeout(function(){this.keysSoFar="",this.keyClear=null}.bind(this),500)}findMatchInRange(t,i,s){for(var e=i;e<s;e++){var o=t[e].innerText;if(o&&0===o.toUpperCase().indexOf(this.keysSoFar))return t[e]}return null}render(){return s(e,{onBlur:()=>this.close(!1)},s("div",{class:a()},s("wm-button",{"button-type":`${this.tempActionMenuType}only`,tooltip:this.tooltip,"label-for-identical-buttons":this.labelForIdenticalButtons,icon:"icon"===this.tempActionMenuType?"f1d9":"",id:`menubtn-${this.uid}`,onClick:()=>this.isExpanded?this.close():this.open(),onBlur:t=>this.handleButtonBlur(t),disabled:this.disabled,ref:t=>this.wmButtonEl=t,"tooltip-position":this.tooltipPosition||this.horizontalPosition,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false","aria-controls":`menu-${this.uid}`},this.buttonText),s("div",{class:`dropdown ${this.openUp?"open-up":""} ${this.horizontalPosition} ${this.isExpanded?"open":""} hidden`,id:`menu-${this.uid}`,tabindex:-1,role:"menu",ref:t=>this.itemsEl=t},s("slot",null))))}get el(){return o(this)}};l.style=":host{position:relative;display:inline-block;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;color:#575195;font-family:inherit}:host .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}:host(:focus){outline:none}wm-action-menu:focus{outline:none}.dropdown{position:absolute;padding:0;margin:0.25rem 0;border-radius:3px 3px 3px 3px;min-width:11.4375rem;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-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;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;visibility:hidden;-webkit-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);background:#fff;z-index:10;text-align:left;white-space:nowrap}.dropdown:focus{outline:none}.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1);visibility:visible}.dropdown.open-up{bottom:2.5rem;top:auto;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.dropdown.right{left:0}.dropdown.left{right:0}";let d=class{constructor(s){t(this,s),this.wmMenuitemClicked=i(this,"wmMenuitemClicked",7),this.wmKeyUpPressed=i(this,"wmKeyUpPressed",7),this.wmKeyDownPressed=i(this,"wmKeyDownPressed",7),this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7),this.wmHomeKeyPressed=i(this,"wmHomeKeyPressed",7),this.wmEndKeyPressed=i(this,"wmEndKeyPressed",7),this.wmPageDownItems=i(this,"wmPageDownItems",7),this.wmPageUpItems=i(this,"wmPageUpItems",7),this.wmTabKeyPressed=i(this,"wmTabKeyPressed",7),this.wmLetterPressed=i(this,"wmLetterPressed",7),this.wmMenuitemBlurred=i(this,"wmMenuitemBlurred",7),this.disabled=!1,this.focused=!1,this.icon=void 0,this.description=void 0,this.descriptionCharLimit=100,this.isKeying=!1}toggleKeyingOn(){this.isKeying=!0}toggleKeyingOff(){this.isKeying=!1}handleKeydown(t){const i=t.altKey||t.ctrlKey||t.metaKey,s=/^.$/.test(t.key)&&!i;switch(t.key){case"ArrowUp":t.preventDefault(),this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":t.preventDefault(),this.wmKeyDownPressed.emit(this.el);break;case"Enter":t.preventDefault(),this.disabled||this.el.click();break;case"Escape":t.preventDefault(),t.stopPropagation(),this.wmEscKeyPressed.emit();break;case"Home":t.preventDefault(),this.wmHomeKeyPressed.emit();break;case"End":t.preventDefault(),this.wmEndKeyPressed.emit();break;case"Tab":this.wmTabKeyPressed.emit();break;default:s&&(t.preventDefault(),this.wmLetterPressed.emit(t.key))}}handleClick(){this.disabled||this.wmMenuitemClicked.emit()}handleBlur(t){this.wmMenuitemBlurred.emit({relatedTarget:t.relatedTarget})}setOnClick(){this.disabled&&this.el.onclick?(this.onClickFunc=this.el.onclick,this.el.onclick=null):!this.disabled&&this.onClickFunc&&(this.el.onclick=this.onClickFunc)}componentWillLoad(){this.icon&&(this.icon=m(this.icon)),this.description&&(this.description.length>this.descriptionCharLimit&&console.error(`wm-menuitem description is above the character limit of ${this.descriptionCharLimit}`),this.icon&&console.error("wm-menuitems with descriptions do not support the use of icons")),this.setOnClick()}componentDidLoad(){this.icon&&(this.iconEl.classList.add("mdi"),this.iconEl.innerHTML=`&#x${this.icon};`)}render(){return s(e,{tabindex:-1,role:"menuitem","aria-disabled":this.disabled?"true":null},s("div",{class:"wrapper "+(this.focused&&this.isKeying?"focus":""),"aria-disabled":this.disabled?"true":null},s("span",{ref:t=>this.iconEl=t}),s("slot",null),this.description?s("div",{class:"description"},this.description):""))}get el(){return o(this)}static get watchers(){return{disabled:["setOnClick"]}}};d.style=':host,wm-menuitem{contain:content;font-family:inherit}:host .wrapper,wm-menuitem .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:#fff;font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid rgba(46, 27, 70, 0.05);color:#575195;font-weight:700}:host .wrapper:focus,:host .wrapper.focus,wm-menuitem .wrapper:focus,wm-menuitem .wrapper.focus{outline:none;background:#f4f3f6}:host .wrapper:hover,wm-menuitem .wrapper:hover{background:#f4f3f6;outline:none}:host .wrapper .description,wm-menuitem .wrapper .description{color:#4a4a4a;font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper[aria-disabled=true],wm-menuitem .wrapper[aria-disabled=true]{font-style:italic;color:#6b6b6b}:host .wrapper:not(:last-child),wm-menuitem .wrapper:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host ::slotted,wm-menuitem ::slotted{font-family:inherit}:host .mdi,wm-menuitem .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;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus),wm-menuitem:focus{outline:none;background:#f4f3f6}:host([aria-disabled=true]),wm-menuitem[aria-disabled=true]{pointer-events:none}';export{l as wm_action_menu,d as wm_menuitem}
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as o}from"./p-38062c39.js";import{n,g as r,l as h,q as a}from"./p-a8d66745.js";import{g as m}from"./p-888bec42.js";let l=class{constructor(s){t(this,s),this.wmActionMenuLoaded=i(this,"wmActionMenuLoaded",7),this.menuLoaded=i(this,"menuLoaded",7),this.openUp=!1,this.isExpanded=!1,this.actionMenuType=null,this.buttonType=null,this.disabled=!1,this.keysSoFar="",this.searchIndex=0,this.keyClear=null}get horizontalPosition(){return this.el&&this.itemsEl&&n(this.el,this.itemsEl)?"right":"left"}get childItems(){return Array.from(this.el.querySelectorAll("wm-menuitem"))}get tempActionMenuType(){return this.actionMenuType||this.buttonType||"icon"}handleClickedItem(){this.close()}handleKeyUp(t){this.moveUp(t.target)}handleKeyDown(t){this.moveDown(t.detail)}handleHomeKey(){this.focusFirstItem()}handleEndKey(){this.focusLastItem()}handleTabKey(){this.isExpanded&&this.close()}handleEscKey(){this.close(),this.wmButtonEl.focus()}handleClick(t){t.target!==this.el&&!this.el.contains(t.target)&&this.isExpanded&&this.close()}handleKey(t){switch(t.key){case"ArrowDown":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusFirstItem())));break;case"ArrowUp":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusLastItem())))}}handleMenuitemBlur(t){if(t.detail.relatedTarget!==this.el&&!this.el.contains(t.detail.relatedTarget)){const i=new CustomEvent("blur");i.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(i)}}handleButtonBlur(t){(t.relatedTarget===this.el||this.el.contains(t.relatedTarget))&&t.stopPropagation()}componentWillLoad(){this.uid=this.el.id?this.el.id:r(),this.el.focus=function(){if(!this.disabled){const t=this.shadowRoot.querySelector("wm-button");t&&t.focus()}},this.buttonType&&console.warn("wm-action-menu: button-type has been deprecated as of v3.1.0. Please use action-menu-type instead.")}componentDidLoad(){0===this.childItems.length?console.error("wm-action-menu should have wm-menuitem elements as children"):this.focusFirstItem(),"icon"===this.tempActionMenuType||this.buttonText||console.error("wm-action-menu should have a valid button-text property when button-type is set to 'text' or 'selector'"),"icon"!==this.tempActionMenuType||this.tooltip||console.error("wm-action-menu should have a valid tooltip when button-type is set to 'icon'"),this.wmActionMenuLoaded.emit(),this.menuLoaded.emit()}moveUp(t){const i=this.childItems.indexOf(t);0===i?this.focusLastItem():this.focusItem(this.childItems[i-1])}moveDown(t){const i=this.childItems.indexOf(t);i===this.childItems.length-1?this.focusFirstItem():this.focusItem(this.childItems[i+1])}open(){this.disabled||(this.openUp=h(this.el,this.itemsEl),this.isExpanded=!0,this.itemsEl.classList.remove("hidden"),window.requestAnimationFrame((()=>this.focusFirstItem())))}close(t=!0){this.isExpanded=!1,this.childItems.forEach((t=>t.focused=!1)),window.setTimeout((()=>{this.itemsEl.classList.add("hidden")}),150),window.setTimeout((()=>{!t||"BODY"!==document.activeElement.tagName&&"WM-MENUITEM"!==document.activeElement.tagName||this.wmButtonEl.focus()}),250)}focusItem(t){this.childItems.map((i=>i.focused=i===t)),t.focus&&t.focus()}focusFirstItem(){this.focusItem(this.childItems[0])}focusLastItem(){this.focusItem(this.childItems[this.childItems.length-1])}findAndFocusItem(t){const i=t.detail.toUpperCase();if(this.focusFirstItem(),!this.keysSoFar)for(var s=0;s<this.childItems.length;s++)this.childItems[s]===document.activeElement&&(this.searchIndex=s);this.keysSoFar+=i,this.clearKeysSoFarAfterDelay();var e=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);e||(e=this.findMatchInRange(this.childItems,0,this.searchIndex)),e&&this.focusItem(e)}clearKeysSoFarAfterDelay(){this.keyClear&&(window.clearTimeout(this.keyClear),this.keyClear=null),this.keyClear=window.setTimeout(function(){this.keysSoFar="",this.keyClear=null}.bind(this),500)}findMatchInRange(t,i,s){for(var e=i;e<s;e++){var o=t[e].innerText;if(o&&0===o.toUpperCase().indexOf(this.keysSoFar))return t[e]}return null}render(){return s(e,{onBlur:()=>this.close(!1)},s("div",{class:a()},s("wm-button",{"button-type":`${this.tempActionMenuType}only`,tooltip:this.tooltip,"label-for-identical-buttons":this.labelForIdenticalButtons,icon:"icon"===this.tempActionMenuType?"f1d9":"",id:`menubtn-${this.uid}`,onClick:()=>this.isExpanded?this.close():this.open(),onBlur:t=>this.handleButtonBlur(t),disabled:this.disabled,ref:t=>this.wmButtonEl=t,"tooltip-position":this.tooltipPosition||this.horizontalPosition,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false","aria-controls":`menu-${this.uid}`},this.buttonText),s("div",{class:`dropdown ${this.openUp?"open-up":""} ${this.horizontalPosition} ${this.isExpanded?"open":""} hidden`,id:`menu-${this.uid}`,tabindex:-1,role:"menu",ref:t=>this.itemsEl=t},s("slot",null))))}get el(){return o(this)}};l.style=":host{position:relative;display:inline-block;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;color:#575195;font-family:inherit}:host .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}:host(:focus){outline:none}wm-action-menu:focus{outline:none}.dropdown{position:absolute;padding:0;margin:0.25rem 0;border-radius:3px 3px 3px 3px;min-width:11.4375rem;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-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;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;visibility:hidden;-webkit-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);background:#fff;z-index:10;text-align:left;white-space:nowrap}.dropdown:focus{outline:none}.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1);visibility:visible}.dropdown.open-up{bottom:2.5rem;top:auto;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.dropdown.right{left:0}.dropdown.left{right:0}";let d=class{constructor(s){t(this,s),this.wmMenuitemClicked=i(this,"wmMenuitemClicked",7),this.wmKeyUpPressed=i(this,"wmKeyUpPressed",7),this.wmKeyDownPressed=i(this,"wmKeyDownPressed",7),this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7),this.wmHomeKeyPressed=i(this,"wmHomeKeyPressed",7),this.wmEndKeyPressed=i(this,"wmEndKeyPressed",7),this.wmPageDownItems=i(this,"wmPageDownItems",7),this.wmPageUpItems=i(this,"wmPageUpItems",7),this.wmTabKeyPressed=i(this,"wmTabKeyPressed",7),this.wmLetterPressed=i(this,"wmLetterPressed",7),this.wmMenuitemBlurred=i(this,"wmMenuitemBlurred",7),this.disabled=!1,this.focused=!1,this.icon=void 0,this.description=void 0,this.descriptionCharLimit=100,this.isKeying=!1}toggleKeyingOn(){this.isKeying=!0}toggleKeyingOff(){this.isKeying=!1}handleKeydown(t){const i=t.altKey||t.ctrlKey||t.metaKey,s=/^.$/.test(t.key)&&!i;switch(t.key){case"ArrowUp":t.preventDefault(),this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":t.preventDefault(),this.wmKeyDownPressed.emit(this.el);break;case"Enter":t.preventDefault(),this.disabled||this.el.click();break;case"Escape":t.preventDefault(),t.stopPropagation(),this.wmEscKeyPressed.emit();break;case"Home":t.preventDefault(),this.wmHomeKeyPressed.emit();break;case"End":t.preventDefault(),this.wmEndKeyPressed.emit();break;case"Tab":this.wmTabKeyPressed.emit();break;default:s&&(t.preventDefault(),this.wmLetterPressed.emit(t.key))}}handleClick(){this.disabled||this.wmMenuitemClicked.emit()}handleBlur(t){this.wmMenuitemBlurred.emit({relatedTarget:t.relatedTarget})}setOnClick(){this.disabled&&this.el.onclick?(this.onClickFunc=this.el.onclick,this.el.onclick=null):!this.disabled&&this.onClickFunc&&(this.el.onclick=this.onClickFunc)}componentWillLoad(){this.icon&&(this.icon=m(this.icon)),this.description&&(this.description.length>this.descriptionCharLimit&&console.error(`wm-menuitem description is above the character limit of ${this.descriptionCharLimit}`),this.icon&&console.error("wm-menuitems with descriptions do not support the use of icons")),this.setOnClick()}componentDidLoad(){this.icon&&(this.iconEl.classList.add("mdi"),this.iconEl.innerHTML=`&#x${this.icon};`)}render(){return s(e,{tabindex:-1,role:"menuitem","aria-disabled":this.disabled?"true":null},s("div",{class:"wrapper "+(this.focused&&this.isKeying?"focus":""),"aria-disabled":this.disabled?"true":null},s("span",{ref:t=>this.iconEl=t}),s("slot",null),this.description?s("div",{class:"description"},this.description):""))}get el(){return o(this)}static get watchers(){return{disabled:["setOnClick"]}}};d.style=':host,wm-menuitem{contain:content;font-family:inherit}:host .wrapper,wm-menuitem .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:#fff;font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid rgba(46, 27, 70, 0.05);color:#575195;font-weight:700}:host .wrapper:focus,:host .wrapper.focus,wm-menuitem .wrapper:focus,wm-menuitem .wrapper.focus{outline:none;background:#f4f3f6}:host .wrapper:hover,wm-menuitem .wrapper:hover{background:#f4f3f6;outline:none}:host .wrapper .description,wm-menuitem .wrapper .description{color:#4a4a4a;font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper[aria-disabled=true],wm-menuitem .wrapper[aria-disabled=true]{font-style:italic;color:#6b6b6b}:host .wrapper:not(:last-child),wm-menuitem .wrapper:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host ::slotted,wm-menuitem ::slotted{font-family:inherit}:host .mdi,wm-menuitem .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;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus),wm-menuitem:focus{outline:none;background:#f4f3f6}:host([aria-disabled=true]),wm-menuitem[aria-disabled=true]{pointer-events:none}';export{l as wm_action_menu,d as wm_menuitem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.navigator.plugins.length>0&&console.log("Ripple component library","3.8.0"),window.addEventListener("keydown",(function(n){var o=n.key||n.keyCode;if("Tab"==o||9===o){var e=new Event("wmUserIsTabbing");window.dispatchEvent(e),document.querySelector("body").classList.add("wmcl-user-is-tabbing")}"ArrowLeft"!=o&&37!==o&&"ArrowUp"!=o&&38!==o&&"ArrowRight"!=o&&39!==o&&"ArrowDown"!=o&&40!==o||(e=new Event("wmUserIsKeying"),window.dispatchEvent(e),document.querySelector("body").classList.add("wmcl-user-is-keying"))})),window.addEventListener("mousedown",(function(){var n=new Event("wmUserIsNotTabbing");window.dispatchEvent(n),document.querySelector("body").classList.remove("wmcl-user-is-tabbing"),document.querySelector("body").classList.remove("wmcl-user-is-keying")}));const n=document.createElement("div");n.id="wm-tooltip-container";const o=document.createElement("div");o.id="wm-tooltip",o.setAttribute("aria-hidden","true"),o.style.position="fixed",o.style.overflow="hidden",o.style.pointerEvents="none",o.style.lineHeight="normal",o.style.fontFamily="inherit",o.style.fontSize="0.875rem",o.style.textTransform="none",o.style.fontWeight="normal",o.style.background="black",o.style.color="#fff",o.style.zIndex="999999",o.style.maxWidth="13.75rem",o.style.marginRight="1.5rem",o.style.padding="0.375rem",o.style.transitionProperty="opacity",o.style.transitionDelay="opacity",o.style.opacity="0",n.appendChild(o),document.querySelector("body").appendChild(n);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as e,h as t,H as r,g as a}from"./p-38062c39.js";import{i as s,g as p,e as n}from"./p-
|
|
1
|
+
import{r as i,c as e,h as t,H as r,g as a}from"./p-38062c39.js";import{i as s,g as p,e as n}from"./p-a8d66745.js";let l=class{constructor(t){i(this,t),this.wmInputValueChanged=e(this,"wmInputValueChanged",7),this.labelPosition="top",this.value="",this.disabled=!1,this.placeholder="",this.requiredField=!1,this.type="text",this.step=1,this.announcement="",this.displayedErrorMessage="",this.uid="",this.previousBlurredValue="",this.requiredErrorMessage=s.formatMessage({id:"global.requiredError",defaultMessage:"This field is required."}),this.numberErrorMessage=s.formatMessage({id:"input.numberError",defaultMessage:"Please enter a valid number."})}get charCount(){return this.value.length}componentWillLoad(){this.uid=this.el.id?this.el.id:p(),this.el.focus=function(){this.disabled||this.shadowRoot.querySelector("input").focus()},this.label||console.error("wm-input requires the label property")}componentDidLoad(){this.value&&(this.inputEl.value=this.value,this.previousBlurredValue=this.inputEl.value)}handleErrorMessage(i){this.displayedErrorMessage=i}handleKeyDown(i){const e=i.ctrlKey||i.metaKey||i.altKey;/^.$/.test(i.key)&&!e&&this.characterLimit&&this.inputEl.value.length>=this.characterLimit&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit))}handleBlur(i){this.value!==this.previousBlurredValue&&this.wmInputValueChanged.emit({value:this.value}),this.previousBlurredValue=this.value,this.preventValidation&&n(i,this.preventValidation)||(this.displayedErrorMessage=this.validate()),this.inputWrapperEl.classList.remove("focus")}handleInput(i){this.value=i.target.value,this.characterLimit&&this.charCount>=this.characterLimit-5&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit))}handleFocus(){this.inputWrapperEl.classList.add("focus")}validate(){const i=[this.validateNumber.bind(this),this.validateRequired.bind(this)];return this.errorMessage?this.errorMessage:i.reduce(((i,e)=>i||e()),"")}validateRequired(){return this.requiredField&&""===this.value?this.requiredErrorMessage:""}validateNumber(){return"number"===this.type&&this.inputEl.validity.badInput?this.numberErrorMessage:""}announce(i){this.liveRegionEl.textContent===i&&(i+=" "),this.announcement=i}generateCharacterLimitWarning(i,e){const t=s.formatMessage({id:"global.charactersEntered",defaultMessage:"{x, number} of {y, number} characters entered.",description:"for screen readers"},{x:i,y:e}),r=s.formatMessage({id:"global.characterLimitReached",defaultMessage:"No additional characters will be entered.",description:"for screen readers"});return`${t}${i>=e?" "+r:""}`}generateCharacterLimitLabel(i){return s.formatMessage({id:"global.characterLimit",defaultMessage:"{limit, number} characters allowed.",description:"for screen readers"},{limit:i})}renderErrorMessage(){return this.errorMessage||this.displayedErrorMessage}render(){return t(r,{id:this.uid},t("div",{class:`wrapper label-${this.labelPosition} ${this.errorMessage||this.displayedErrorMessage?"invalid":""}`,ref:i=>this.inputWrapperEl=i},t("div",{class:"label-wrapper"},"none"!==this.labelPosition&&t("label",{htmlFor:`inputfield-${this.uid}`,class:"label"},this.label,this.requiredField&&t("span",{class:"required","aria-hidden":"true"},"*"))),t("div",{class:"inner-wrapper"},t("div",{class:"inputfield-wrapper"},t("input",{ref:i=>this.inputEl=i,id:`inputfield-${this.uid}`,disabled:this.disabled,"aria-label":`${this.label}${this.characterLimit?" "+this.generateCharacterLimitLabel(this.characterLimit):""}`,"aria-describedby":`info-${this.uid} error-${this.uid}`,onInput:i=>this.handleInput(i),onKeyDown:i=>this.handleKeyDown(i),onBlur:i=>this.handleBlur(i),onFocus:this.handleFocus.bind(this),placeholder:this.placeholder,autocomplete:"off",required:this.requiredField,maxLength:this.characterLimit||void 0,type:this.type,step:this.step,max:this.max,min:this.min}),this.characterLimit&&"number"==typeof this.characterLimit?t("div",{class:"character-count"},this.charCount,"/",this.characterLimit):""),this.info&&t("div",{id:`info-${this.uid}`,class:"info"},this.info),t("div",{id:`error-${this.uid}`,"aria-live":"assertive",class:"error-message","aria-atomic":"true"},this.renderErrorMessage()),t("div",{class:"sr-only","aria-live":"polite","aria-atomic":"true",ref:i=>this.liveRegionEl=i},this.announcement))))}get el(){return a(this)}static get watchers(){return{errorMessage:["handleErrorMessage"]}}};l.style=':host,wm-input{font-family:inherit;width:100%}:host *,wm-input *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper,wm-input .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,wm-input .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-input .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-input .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-input .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-input .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,wm-input .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,wm-input .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-input .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,[dir=RTL] wm-input .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-input .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper,wm-input .wrapper .inner-wrapper{width:100%}:host .wrapper .inputfield-wrapper,wm-input .wrapper .inputfield-wrapper{height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:-ms-flexbox;display:flex}:host .wrapper .character-count,wm-input .wrapper .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:rgba(74, 74, 74, 0.05);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .wrapper input,wm-input .wrapper input{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:none;font-family:inherit;font-size:0.875rem;height:100%;-ms-flex:1;flex:1;padding:0.75rem 1rem;width:100%}:host .wrapper input:disabled,wm-input .wrapper input:disabled{background-color:#f0f0f0;color:#737373}:host .wrapper input:focus,wm-input .wrapper input:focus{outline:none}:host .wrapper .info,wm-input .wrapper .info{font-style:italic;line-height:100%;margin:4px 0}:host .wrapper.invalid .inputfield-wrapper,wm-input .wrapper.invalid .inputfield-wrapper{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .wrapper.invalid .error-message,wm-input .wrapper.invalid .error-message{color:#c0392b;margin:4px 0;display:block;font-style:italic;line-height:100%}:host .wrapper:focus .inputfield-wrapper,:host .wrapper.focus .inputfield-wrapper,wm-input .wrapper:focus .inputfield-wrapper,wm-input .wrapper.focus .inputfield-wrapper{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}:host .sr-only,wm-input .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{l as wm_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-20856a2d.system.js","./p-
|
|
1
|
+
System.register(["./p-20856a2d.system.js","./p-253a08fe.system.js"],(function(e){"use strict";var t,i,o,n,s;return{setters:[function(e){t=e.r;i=e.h;o=e.H;n=e.g},function(e){s=e.i}],execute:function(){var r="wm-modal-header{-webkit-border-radius:5px 5px 0 0px;-moz-border-radius:5px 5px 0 0px;-ms-border-radius:5px 5px 0 0px;border-radius:5px 5px 0 0px;margin-bottom:-1px}wm-modal-header .wm-wrapper{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;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}wm-modal-header .wm-wrapper .title{margin:0;font-weight:600;font-size:1.125rem;color:#4a4a4a;line-height:normal}wm-modal-header .wm-wrapper .title .subtitle{display:block;font-size:0.875rem;font-weight:normal}wm-modal-header .wm-wrapper .title:focus{outline:none}";var a=e("wm_modal_header",function(){function e(e){t(this,e);this.heading="";this.subheading="";this.closeTooltipMessage=s.formatMessage({id:"global.closeVerb",defaultMessage:"Close",description:"For a button, to close a user interface element"})}e.prototype.focusFirstEl=function(){this.closeButtonEl.focus()};e.prototype.componentWillLoad=function(){this.uid=this.el.parentElement.uid};e.prototype.emitParentCloseEvent=function(){var e=this.el.parentElement;e.emitCloseEvent()};e.prototype.render=function(){var e=this;return i(o,null,i("div",{class:"wm-wrapper"},i("div",null,i("h2",{class:"title",id:"wm-modal-heading-text-".concat(this.uid)},this.heading,i("span",{class:"subtitle"},this.subheading))),i("wm-button",{"button-type":"navigational",icon:"f156",tooltip:this.closeTooltipMessage,"tooltip-position":"left",id:"wm-modal-close-".concat(this.uid),ref:function(t){return e.closeButtonEl=t},onClick:function(){return e.emitParentCloseEvent()}})))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());a.style=r}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,n){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;i=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(a[0]===6&&o.label<r[1]){o.label=r[1];r=a;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(a);break}if(r[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-20856a2d.system.js","./p-4eca954a.system.js"],(function(e){"use strict";var t,o,n,i,r,a,s,l;return{setters:[function(e){t=e.r;o=e.c;n=e.h;i=e.H;r=e.g},function(e){a=e.g;s=e.j;l=e.c}],execute:function(){var d="wm-modal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal>*{width:80vw;max-width:750px;background:#fff}wm-modal>*:focus{outline:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem}wm-modal wm-modal-header{z-index:2003}wm-modal wm-modal-footer{z-index:2003}wm-modal>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal.wm-modal wm-modal-header{border-bottom:1px solid #f4f3f6}wm-modal.wm-modal wm-modal-footer{border-top:1px solid #f4f3f6}@media only screen and (max-width: 768px){wm-modal.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal.wm-modal>*{max-width:none;width:100vw}wm-modal.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal.wm-dialog>:not(wm-modal-header):not(wm-modal-footer){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out;z-index:2000}wm-modal.hide{visibility:hidden}wm-modal .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;top:0;left:0}";var m=e("wm_modal",function(){function e(e){var n=this;t(this,e);this.focusLastElement=o(this,"focusLastElement",7);this.focusFirstElement=o(this,"focusFirstElement",7);this.wmModalCloseTriggered=o(this,"wmModalCloseTriggered",3);this.wmCloseTriggered=o(this,"wmCloseTriggered",7);this.wmModalPrimaryTriggered=o(this,"wmModalPrimaryTriggered",7);this.wmPrimaryTriggered=o(this,"wmPrimaryTriggered",7);this.wmModalSecondaryTriggered=o(this,"wmModalSecondaryTriggered",7);this.wmSecondaryTriggered=o(this,"wmSecondaryTriggered",7);this.open=false;this.isOpen=false;this.elementToFocus="";this.modalType=null;this.isTypeDialog=null;this.bodyFocusListener=function(){return n.redirectFocusFromBody()}}Object.defineProperty(e.prototype,"tempOpen",{get:function(){return this.open||this.isOpen},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempModalType",{get:function(){return this.modalType?this.modalType:this.isTypeDialog?"dialog":"modal"},enumerable:false,configurable:true});e.prototype.toggleModal=function(){this.tempOpen?this.showModal():this.hideModal()};e.prototype.handleClick=function(e){this.tempOpen&&e.target===this.overlayEl&&this.focusOnOpen.focus()};e.prototype.closeModalOnEscape=function(e){if(e.key==="Escape"){e.stopPropagation();this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();this.open=false}};e.prototype.showModal=function(){var e=this;this.setElToFocusOnClose();document.body.style.overflow="hidden";document.body.tabIndex=0;document.body.removeEventListener("focus",this.bodyFocusListener,true);document.body.addEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){e.setElToFocusOnOpen();window.requestAnimationFrame((function(){return e.focusOnOpen.focus()}))}))};e.prototype.hideModal=function(){var e=this;document.body.style.overflow="visible";document.body.tabIndex=-1;document.body.removeEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){return e.focusOnClose.focus()}))};e.prototype.componentWillLoad=function(){if(this.isOpen){console.warn("wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead.")}if(this.isTypeDialog){console.warn("wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead.")}if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){if(!this.el.id){console.error("You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes.")}}this.uid=this.el.id?this.el.id:a()};e.prototype.componentDidLoad=function(){if(this.tempOpen){this.showModal()}};e.prototype.emitCloseEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();return[2]}))}))};e.prototype.emitPrimaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalPrimaryTriggered.emit();this.wmPrimaryTriggered.emit();return[2]}))}))};e.prototype.emitSecondaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalSecondaryTriggered.emit();this.wmSecondaryTriggered.emit();return[2]}))}))};e.prototype.setElToFocusOnOpen=function(){var e=s(this.el.querySelector("#wm-modal-close-".concat(this.uid)));if(this.elementToFocus){if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){this.setAriaDescribedbyOnModal();this.elementToFocus="wm-".concat(this.elementToFocus,"-").concat(this.uid)}var t=this.el.querySelector("#".concat(this.elementToFocus));if(t){var o=s(t);if(o){this.focusOnOpen=o}else{console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");this.focusOnOpen=e}}else{console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");this.focusOnOpen=e}}else{this.focusOnOpen=e}};e.prototype.setAriaDescribedbyOnModal=function(){var e=document.getElementById("content-".concat(this.uid));if(!e){console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.")}else{this.el.setAttribute("aria-describedby","wm-modal-heading-text-".concat(this.uid," content-").concat(this.uid))}};e.prototype.setElToFocusOnClose=function(){var e=document.activeElement;if(e.tagName==="WM-MENUITEM"){this.focusOnClose=e.parentElement}else{this.focusOnClose=l(e)}};e.prototype.redirectFocusFromBody=function(){if(document.activeElement.tagName==="BODY"){this.setElToFocusOnOpen();this.focusOnOpen.focus()}};e.prototype.render=function(){var e=this;return n(i,{class:"".concat(this.tempOpen?"":"hide ").concat("wm-"+this.tempModalType),role:"dialog","aria-describedby":"wm-modal-heading-text-".concat(this.uid),"aria-modal":"true",tabindex:this.tempOpen?0:null,onFocus:function(){e.focusLastElement.emit()}},n("div",{class:"overlay",ref:function(t){return e.overlayEl=t}}),n("div",{class:"sr-only",tabIndex:0,onFocus:function(){e.focusFirstElement.emit()}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["toggleModal"],isOpen:["toggleModal"]}},enumerable:false,configurable:true});return e}());m.style=d}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,o,n){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;i=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(a[0]===6&&o.label<r[1]){o.label=r[1];r=a;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(a);break}if(r[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-20856a2d.system.js","./p-253a08fe.system.js"],(function(e){"use strict";var t,o,n,i,r,a,s,l;return{setters:[function(e){t=e.r;o=e.c;n=e.h;i=e.H;r=e.g},function(e){a=e.g;s=e.j;l=e.c}],execute:function(){var d="wm-modal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal>*{width:80vw;max-width:750px;background:#fff}wm-modal>*:focus{outline:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem}wm-modal wm-modal-header{z-index:2003}wm-modal wm-modal-footer{z-index:2003}wm-modal>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal.wm-modal wm-modal-header{border-bottom:1px solid #f4f3f6}wm-modal.wm-modal wm-modal-footer{border-top:1px solid #f4f3f6}@media only screen and (max-width: 768px){wm-modal.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal.wm-modal>*{max-width:none;width:100vw}wm-modal.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal.wm-dialog>:not(wm-modal-header):not(wm-modal-footer){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out;z-index:2000}wm-modal.hide{visibility:hidden}wm-modal .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;top:0;left:0}";var m=e("wm_modal",function(){function e(e){var n=this;t(this,e);this.focusLastElement=o(this,"focusLastElement",7);this.focusFirstElement=o(this,"focusFirstElement",7);this.wmModalCloseTriggered=o(this,"wmModalCloseTriggered",3);this.wmCloseTriggered=o(this,"wmCloseTriggered",7);this.wmModalPrimaryTriggered=o(this,"wmModalPrimaryTriggered",7);this.wmPrimaryTriggered=o(this,"wmPrimaryTriggered",7);this.wmModalSecondaryTriggered=o(this,"wmModalSecondaryTriggered",7);this.wmSecondaryTriggered=o(this,"wmSecondaryTriggered",7);this.open=false;this.isOpen=false;this.elementToFocus="";this.modalType=null;this.isTypeDialog=null;this.bodyFocusListener=function(){return n.redirectFocusFromBody()}}Object.defineProperty(e.prototype,"tempOpen",{get:function(){return this.open||this.isOpen},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempModalType",{get:function(){return this.modalType?this.modalType:this.isTypeDialog?"dialog":"modal"},enumerable:false,configurable:true});e.prototype.toggleModal=function(){this.tempOpen?this.showModal():this.hideModal()};e.prototype.handleClick=function(e){this.tempOpen&&e.target===this.overlayEl&&this.focusOnOpen.focus()};e.prototype.closeModalOnEscape=function(e){if(e.key==="Escape"){e.stopPropagation();this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();this.open=false}};e.prototype.showModal=function(){var e=this;this.setElToFocusOnClose();document.body.style.overflow="hidden";document.body.tabIndex=0;document.body.removeEventListener("focus",this.bodyFocusListener,true);document.body.addEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){e.setElToFocusOnOpen();window.requestAnimationFrame((function(){return e.focusOnOpen.focus()}))}))};e.prototype.hideModal=function(){var e=this;document.body.style.overflow="visible";document.body.tabIndex=-1;document.body.removeEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){return e.focusOnClose.focus()}))};e.prototype.componentWillLoad=function(){if(this.isOpen){console.warn("wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead.")}if(this.isTypeDialog){console.warn("wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead.")}if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){if(!this.el.id){console.error("You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes.")}}this.uid=this.el.id?this.el.id:a()};e.prototype.componentDidLoad=function(){if(this.tempOpen){this.showModal()}};e.prototype.emitCloseEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();return[2]}))}))};e.prototype.emitPrimaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalPrimaryTriggered.emit();this.wmPrimaryTriggered.emit();return[2]}))}))};e.prototype.emitSecondaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalSecondaryTriggered.emit();this.wmSecondaryTriggered.emit();return[2]}))}))};e.prototype.setElToFocusOnOpen=function(){var e=s(this.el.querySelector("#wm-modal-close-".concat(this.uid)));if(this.elementToFocus){if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){this.setAriaDescribedbyOnModal();this.elementToFocus="wm-".concat(this.elementToFocus,"-").concat(this.uid)}var t=this.el.querySelector("#".concat(this.elementToFocus));if(t){var o=s(t);if(o){this.focusOnOpen=o}else{console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");this.focusOnOpen=e}}else{console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");this.focusOnOpen=e}}else{this.focusOnOpen=e}};e.prototype.setAriaDescribedbyOnModal=function(){var e=document.getElementById("content-".concat(this.uid));if(!e){console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.")}else{this.el.setAttribute("aria-describedby","wm-modal-heading-text-".concat(this.uid," content-").concat(this.uid))}};e.prototype.setElToFocusOnClose=function(){var e=document.activeElement;if(e.tagName==="WM-MENUITEM"){this.focusOnClose=e.parentElement}else{this.focusOnClose=l(e)}};e.prototype.redirectFocusFromBody=function(){if(document.activeElement.tagName==="BODY"){this.setElToFocusOnOpen();this.focusOnOpen.focus()}};e.prototype.render=function(){var e=this;return n(i,{class:"".concat(this.tempOpen?"":"hide ").concat("wm-"+this.tempModalType),role:"dialog","aria-describedby":"wm-modal-heading-text-".concat(this.uid),"aria-modal":"true",tabindex:this.tempOpen?0:null,onFocus:function(){e.focusLastElement.emit()}},n("div",{class:"overlay",ref:function(t){return e.overlayEl=t}}),n("div",{class:"sr-only",tabIndex:0,onFocus:function(){e.focusFirstElement.emit()}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["toggleModal"],isOpen:["toggleModal"]}},enumerable:false,configurable:true});return e}());m.style=d}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,f as t,h as r,H as n,g as a}from"./p-38062c39.js";import{g as i,d as s,b as o,f as p,i as l,c as h}from"./p-bf63bb07.js";let c=class{constructor(r){e(this,r),this.chartType="doughnut1",this.showLegend=!0,this.notStartedColor=!1,this.labelPosition="top",this.isTabbing=!1,this.uid=i(),this.slicesData=[],this.colors={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca"},this.types={doughnut0:{size:155,colors:[this.colors.forest,"#bfbfbf"],thickness:.73,padding:25,isBar:!1},doughnut1:{size:130,colors:[this.colors.lavender,this.colors.midnight,"#d4d4d4"],thickness:.5,padding:90,isBar:!1},doughnut2:{size:130,colors:[this.colors.cyan,this.colors.salmon,"#d4d4d4"],thickness:.5,padding:90,isBar:!1},doughnut3:{size:130,colors:[this.colors.lavender,this.colors.midnight,"#919834","#c177cf","#c16e00","#029af2","#2a6993"],thickness:.5,padding:90,isBar:!1},bar1:{size:350,colors:[this.colors.forest,"#bfbfbf"],padding:0,isBar:!0},bar2:{size:400,colors:["#d4d4d4",this.colors.sleet,this.colors.cyan,this.colors.salmon],padding:0,isBar:!0},bar3:{size:300,colors:["#0d696e",this.colors.cyan,"#8e4129",this.colors.salmon],padding:0,isBar:!0},bar4:{size:400,colors:["#d4d4d4",this.colors.sleet,"#33a919"],padding:0,isBar:!0},bar5:{size:400,colors:["#d4d4d4",this.colors.lavender,this.colors.midnight,"#919834","#c177cf","#c16e00","#029af2","#2a6993"],padding:0,isBar:!0}},this.debouncedResize=s((async()=>{this.setHybridType(),await this.getData(),t(this.el)}),10),this.debouncedSliceUpdate=s((async()=>{await this.getData(),t(this.el)}),100)}get tempValueFormat(){return this.valueFormat||this.showValues||"none"}get sliceEls(){const e=this.currentChartType.includes("bar"),t=this.currentChartType.includes("doughnut");return e?Array.from(this.barEl.querySelectorAll(".bar-segment")):t?Array.from(this.doughnutEl.querySelectorAll(".doughnut-segment")):void 0}get currentChartType(){return"hybrid"===this.chartType?this.hybridType:this.chartType}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKeydown(e){switch(e.keyCode){case 37:case 38:e.preventDefault(),this.isTabbing=!0,this.focusPrevious();break;case 39:case 40:e.preventDefault(),this.isTabbing=!0,this.focusNext();break;case 9:this.exitChart();break;case 27:this.popoverEl.open=!1}}handleSliceClick(e,t){this.popoverEl&&!this.isTabbing&&(t.coords={x:e.clientX,y:e.clientY},this.openPopover(t))}handleSliceFocus(e,t){this.popoverEl&&this.isTabbing&&(t.coords=o(e.target),this.openPopover(t))}handleSliceKeyDown(e){if(this.popoverEl&&this.popoverEl.open&&"Enter"===e.key){const e=this.popoverEl.querySelector("button");e&&e.click()}}focusNext(){const e=h(document.activeElement),t=(this.sliceEls.indexOf(e)+1)%this.sliceEls.length;this.focusSlice(t)}focusPrevious(){if(this.sliceEls){const e=h(document.activeElement);let t=this.sliceEls.indexOf(e);-1===t?t=0:0===t?t=this.sliceEls.length-1:t-=1,this.focusSlice(t)}}focusSlice(e){this.sliceEls&&this.el&&(this.popoverEl&&(this.popoverEl.open=!1),this.el.tabIndex=-1,this.el.focusable=!1,this.sliceEls.map((e=>{e.tabIndex=-1,e.focusable=!1})),this.sliceEls[e].tabIndex=0,this.sliceEls[e].focusable=!0,this.sliceEls[e].focus(),window.setTimeout((()=>{this.popoverEl&&(this.popoverEl.open=!0)}),10))}exitChart(){this.sliceEls&&this.sliceEls.map((e=>{e.tabIndex=-1,e.focusable=!1})),window.setTimeout((()=>{this.el&&(this.el.tabIndex=0,this.el.focusable=!0,this.popoverEl&&(this.popoverEl.open=!1))}),100)}openPopover(e){if(this.popoverEl&&e.title&&e.text){this.popoverEl.popoverTitle=e.title,this.popoverEl.popoverText=e.text,this.popoverEl.buttonText=e.buttonText,this.popoverEl.coords=e.coords,this.popoverEl.sliceRef=e.sliceRef,window.setTimeout((()=>{this.popoverEl&&(this.popoverEl.open=!0)}),30);const t=s((async()=>{this.popoverEl.open=!1}),10);document.addEventListener("scroll",(()=>{t()}));const r=p(this.el);r&&r.addEventListener("scroll",(()=>{t()}))}}amountToPercent(e,t){return t?Math.round(100*e/this.total):Math.round(1e4*e/this.total)/100}amountToDegree(e){return 360*e/this.total}toFixed(e){return parseFloat((Math.floor(100*e)/100).toFixed(2))}polarToCartesian(e,t,r,n){var a=this.toFixed(e+e*t*Math.cos(Math.PI*r/180)),i=this.toFixed(e+e*t*Math.sin(Math.PI*r/180));return void 0!==n?{x1:a,y1:i,x2:this.toFixed(e+e*t*Math.cos(Math.PI*n/180)),y2:this.toFixed(e+e*t*Math.sin(Math.PI*n/180))}:{x:a,y:i}}getPathData(e,t){var r=this.amountToDegree(t)-90,n=e/this.total*360,a=r+n,i=n>180?"1 1":"0 1",s=n>180?"1 0":"0 0",o=this.chartData.size/2,p=this.chartData.thickness;360===n&&(a-=.01);var l=this.polarToCartesian(o,1,r+1.5,a),h=this.polarToCartesian(o,p,r+3,a);return`M ${l.x1}, ${l.y1} `+this.getArc(1,i,l.x2,l.y2)+` L ${h.x2}, ${h.y2} `+this.getArc(p,s,h.x1,h.y1)+" z"}getArc(e,t,r,n){var a=this.toFixed(this.chartData.size/2*e);return`A ${a}, ${a} 0 ${t} ${this.toFixed(r)}, ${this.toFixed(n)}`}setHybridType(){this.hybridType=window.innerWidth>1340?"doughnut0":"bar1"}async getData(){this.slicesData=[];let e=0;const t=this.el.querySelectorAll("wm-chart-slice");this.total=Array.from(t).reduce(((e,t)=>e+parseInt(t.getAttribute("amount")||"0")),0),t.forEach(((r,n)=>{const a=parseInt(r.getAttribute("amount")||"0"),i=this.amountToPercent(a,!0),s=this.amountToPercent(parseInt(t[0===n?t.length-1:n-1].getAttribute("amount")||"0"),!0),o=this.amountToPercent(parseInt(t[n===t.length-1?0:n+1].getAttribute("amount")||"0"),!0);let p=i<4&&(s<5||o<5);0===i&&a>0&&(o<8||s<8)&&(p=!0);const l=this.types[this.currentChartType].colors["bar5"===this.currentChartType?this.notStartedColor?n:n+1:n],h={amount:a,perc:i,legend:r.getAttribute("legend"),color:l||"#d4d4d4",offset:e,id:`${this.uid}-${n+1}`,title:r.getAttribute("popover-title"),text:r.getAttribute("popover-text"),buttonText:r.getAttribute("popover-button-text"),sliceRef:r,inSmallCluster:p};e+=a,this.slicesData.push(h)})),this.chartData=this.types[this.currentChartType]}handleResize(){"hybrid"===this.chartType&&this.debouncedResize()}async componentWillLoad(){if(!this.label)throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.");this.showValues&&console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead."),"hybrid"===this.chartType&&this.setHybridType(),await this.getData()}handleSliceUpdate(){this.debouncedSliceUpdate()}renderFilter(){return r("defs",null,r("filter",{id:"wmHoverDropShadow"},r("feGaussianBlur",{stdDeviation:"3"}),r("feOffset",{result:"offsetblur"}),r("feFlood",{"flood-color":"#333"}),r("feComposite",{operator:"in",in2:"offsetblur"}),r("feMerge",null,r("feMergeNode",null),r("feMergeNode",{in:"SourceGraphic"}))))}renderDoughnut(){const e=this.chartData.size+this.chartData.padding;return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:e+"px",height:e+"px",ref:e=>this.doughnutEl=e,id:`graphic-${this.uid}`,class:"doughnut-svg"},this.renderFilter(),this.slicesData.map((e=>this.renderPath(e))),"doughnut0"===this.currentChartType?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},this.amountToPercent(this.slicesData[0].amount,!0)+"%"):r("g",{transform:`translate(${this.chartData.padding/2}, ${this.chartData.padding/2})`,"text-anchor":"middle","dominant-baseline":"middle"},this.slicesData.map((e=>e.amount>0?this.renderDoughnutText(e):"")))))}renderPath(e){return r("g",{transform:`translate(${this.chartData.padding/2}, ${this.chartData.padding/2})`},r("path",{id:e.id,class:"doughnut-segment",fill:e.amount?e.color:"transparent",d:this.getPathData(e.amount,e.offset),onClick:t=>this.handleSliceClick(t,e),onFocus:t=>this.handleSliceFocus(t,e),onKeyDown:e=>this.handleSliceKeyDown(e),role:"img","aria-label":e.legend}))}renderDoughnutText(e){if(!e.inSmallCluster){const t=this.amountToDegree(e.offset+e.amount/2);let{x:n,y:a}=this.polarToCartesian(this.chartData.size/2,1.4,t-90);return r("text",{class:"value",x:n+"px",y:a+"px"},`${e.perc>0?e.perc:"<1"}%`)}}renderBar(){return r("div",{class:"chart-wrapper bar-wrapper"},"bar1"===this.currentChartType?r("div",{class:"single-perc"},this.amountToPercent(this.slicesData[0].amount,!0)+"%"):"",this.drawAxis(),r("div",{class:{"inner-bar-wrapper":!0,"show-values":"percentage"===this.tempValueFormat||"amount"===this.tempValueFormat}},"bar1"!==this.currentChartType?r("div",{class:"values"},this.slicesData.map(((e,t)=>e.perc>0?this.renderBarText(e,t):""))):"",r("div",{class:"bar-segments-wrapper",ref:e=>this.barEl=e},this.slicesData.map(((e,t)=>this.renderBarSegment(e,t)))),this.renderCompletionMessage()))}renderBarSegment(e,t){const n=t!==this.slicesData.length-1,a=`calc(${this.amountToPercent(e.amount,!1)}%${n?" - 2px":""})`;return r("div",{class:"bar-segment "+(0===this.amountToPercent(e.amount,!1)?"zero":""),style:{backgroundColor:e.color,width:a},onClick:t=>this.handleSliceClick(t,e),onFocus:t=>this.handleSliceFocus(t,e),onKeyDown:e=>this.handleSliceKeyDown(e)},r("text",{class:"sr-only"},e.legend))}renderBarText(e,t){let n;if("percentage"===this.tempValueFormat)n=e.perc+"%";else{if("amount"!==this.tempValueFormat)return;n=e.amount}return r("span",{class:"value",style:{width:`calc(${this.amountToPercent(e.amount,!1)}%\n ${t!==this.slicesData.length-1?" - 2px":""}`}},n)}drawAxis(){if("bar3"===this.currentChartType)return r("svg",{class:"axis"},r("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),r("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),r("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),r("text",{x:"0.5",y:"-6"},"0%"),r("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}),r("text",{x:"100%",y:"-6"},"100%"))}renderCompletionMessage(){if("hybrid"===this.chartType&&this.completionMessage)return r("div",{class:"completion-message"},this.completionMessage)}renderLegend(){if(this.showLegend){const e=this.slicesData.reduce(((e,t)=>!!t.inSmallCluster||e),!1);return r("div",{class:"legend-wrapper"},r("div",{class:"legend "+(this.chartData.isBar?"--top":"--bottom"),"aria-hidden":"true"},this.total>0?this.slicesData.map((e=>{if(e.amount||e.legend)return r("div",{class:"legend-item"},r("div",{class:"legend-color",style:{"background-color":e.color}}),r("div",{class:"legend-text"},e.legend))})):""),!this.chartData.isBar&&e?r("div",{class:"cluster-warning"},l.formatMessage({id:"chart.hiddenPercentages",defaultMessage:"Percentages smaller than 5% are not shown when too close to each other."}),r("br",null),l.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details."})):"")}}render(){return r(n,{role:"application","aria-label":this.label+", "+l.formatMessage({id:"chart.interactiveChart",defaultMessage:"Interactive chart. Use arrow keys to browse elements, press Tab to exit."}),tabindex:"0"},r("div",{class:`component-wrapper ${this.currentChartType} ${this.isTabbing?"user-is-tabbing":""} ${"left"===this.labelPosition&&"bar4"===this.chartType?"left-label":""}`},r("label",{class:"label",id:`label-${this.uid}`,htmlFor:`graphic-${this.uid}`},r("span",{class:"label-text"},this.label),this.subinfo?r("span",{class:"subinfo"},this.subinfo):""),this.chartData.isBar?this.renderLegend():"",this.total>0&&this.chartData.isBar?this.renderBar():this.renderDoughnut(),this.chartData.isBar?"":this.renderLegend(),r("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",ref:e=>this.popoverEl=e}),"doughnut0"===this.hybridType?this.renderCompletionMessage():""))}get el(){return a(this)}};c.style=".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;}.component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}.component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}.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}.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}.component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}.component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}.component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}.component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}.component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}.component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}.component-wrapper .legend-wrapper .legend .legend-item{position:relative}.component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}.component-wrapper .legend-wrapper .legend .legend-text{padding-left:1rem;line-height:1}.component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}.component-wrapper .legend-wrapper .cluster-warning{font-size:0.75rem;font-style:italic;max-width:100%}.component-wrapper .doughnut-svg,.component-wrapper .inner-bar-wrapper{overflow:visible}.component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}.component-wrapper .bar-wrapper .inner-bar-wrapper{width:100%}.component-wrapper .bar-wrapper .inner-bar-wrapper .values{display:-ms-flexbox;display:flex}.component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper{display:-ms-flexbox;display:flex}.component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment{height:30px;cursor:pointer}.component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type){margin-right:2px}.component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}.component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}.component-wrapper .value{display:inline-block;text-align:center}.component-wrapper .value:not(:last-of-type){margin-right:2px}.component-wrapper path:active,.component-wrapper path:hover,.component-wrapper path:focus,.component-wrapper .bar-segment:active,.component-wrapper .bar-segment:hover,.component-wrapper .bar-segment:focus{outline:none}.component-wrapper path:active.bar-segment,.component-wrapper path:hover.bar-segment,.component-wrapper path:focus.bar-segment,.component-wrapper .bar-segment:active.bar-segment,.component-wrapper .bar-segment:hover.bar-segment,.component-wrapper .bar-segment:focus.bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}.component-wrapper path:active.doughnut-segment,.component-wrapper path:hover.doughnut-segment,.component-wrapper path:focus.doughnut-segment,.component-wrapper .bar-segment:active.doughnut-segment,.component-wrapper .bar-segment:hover.doughnut-segment,.component-wrapper .bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}.component-wrapper path::-moz-focus-inner,.component-wrapper .bar-segment::-moz-focus-inner{border:0;outline:none}.component-wrapper.doughnut1 label,.component-wrapper.doughnut1 .label-text,.component-wrapper.doughnut2 label,.component-wrapper.doughnut2 .label-text,.component-wrapper.doughnut3 label,.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}.component-wrapper.doughnut0{-ms-flex-align:center;align-items:center}.component-wrapper.doughnut0 label{text-align:center;width:100%;padding-bottom:1.5rem}.component-wrapper.doughnut0 label .subinfo{position:absolute}.component-wrapper.doughnut0 .legend{display:-ms-flexbox;display:flex}.component-wrapper.doughnut0 .completion-message{padding-top:0.625rem}.component-wrapper.bar1{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}.component-wrapper.bar1 label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.component-wrapper.bar1 label .subinfo{position:initial}.component-wrapper.bar1 .legend{display:none}.component-wrapper.bar1 .chart-wrapper{display:-ms-flexbox;display:flex}.component-wrapper.bar1 .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}.component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper{-ms-flex:1;flex:1}.component-wrapper.bar1 .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){.component-wrapper.bar1{-ms-flex-direction:row;flex-direction:row}.component-wrapper.bar1 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}.component-wrapper.bar1 .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.component-wrapper.bar1 .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}.component-wrapper.bar2,.component-wrapper.bar3,.component-wrapper.bar4,.component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}.component-wrapper.bar2 .inner-bar-wrapper,.component-wrapper.bar4 .inner-bar-wrapper,.component-wrapper.bar5 .inner-bar-wrapper{height:30px;margin-bottom:0}.component-wrapper.bar2 .inner-bar-wrapper.show-values,.component-wrapper.bar4 .inner-bar-wrapper.show-values,.component-wrapper.bar5 .inner-bar-wrapper.show-values{height:60px;margin-top:0}.component-wrapper.bar3 .legend{padding-bottom:1.25rem}.component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}.component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}.component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text{fill:#4a4a4a}.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)}.component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}.component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}.component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}.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(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";export{c as wm_chart}
|
|
1
|
+
import{r as e,f as t,h as r,H as n,g as a}from"./p-38062c39.js";import{g as i,d as s,b as o,f as p,i as l,c as h}from"./p-a8d66745.js";let c=class{constructor(r){e(this,r),this.chartType="doughnut1",this.showLegend=!0,this.notStartedColor=!1,this.labelPosition="top",this.isTabbing=!1,this.uid=i(),this.slicesData=[],this.colors={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca"},this.types={doughnut0:{size:155,colors:[this.colors.forest,"#bfbfbf"],thickness:.73,padding:25,isBar:!1},doughnut1:{size:130,colors:[this.colors.lavender,this.colors.midnight,"#d4d4d4"],thickness:.5,padding:90,isBar:!1},doughnut2:{size:130,colors:[this.colors.cyan,this.colors.salmon,"#d4d4d4"],thickness:.5,padding:90,isBar:!1},doughnut3:{size:130,colors:[this.colors.lavender,this.colors.midnight,"#919834","#c177cf","#c16e00","#029af2","#2a6993"],thickness:.5,padding:90,isBar:!1},bar1:{size:350,colors:[this.colors.forest,"#bfbfbf"],padding:0,isBar:!0},bar2:{size:400,colors:["#d4d4d4",this.colors.sleet,this.colors.cyan,this.colors.salmon],padding:0,isBar:!0},bar3:{size:300,colors:["#0d696e",this.colors.cyan,"#8e4129",this.colors.salmon],padding:0,isBar:!0},bar4:{size:400,colors:["#d4d4d4",this.colors.sleet,"#33a919"],padding:0,isBar:!0},bar5:{size:400,colors:["#d4d4d4",this.colors.lavender,this.colors.midnight,"#919834","#c177cf","#c16e00","#029af2","#2a6993"],padding:0,isBar:!0}},this.debouncedResize=s((async()=>{this.setHybridType(),await this.getData(),t(this.el)}),10),this.debouncedSliceUpdate=s((async()=>{await this.getData(),t(this.el)}),100)}get tempValueFormat(){return this.valueFormat||this.showValues||"none"}get sliceEls(){const e=this.currentChartType.includes("bar"),t=this.currentChartType.includes("doughnut");return e?Array.from(this.barEl.querySelectorAll(".bar-segment")):t?Array.from(this.doughnutEl.querySelectorAll(".doughnut-segment")):void 0}get currentChartType(){return"hybrid"===this.chartType?this.hybridType:this.chartType}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKeydown(e){switch(e.keyCode){case 37:case 38:e.preventDefault(),this.isTabbing=!0,this.focusPrevious();break;case 39:case 40:e.preventDefault(),this.isTabbing=!0,this.focusNext();break;case 9:this.exitChart();break;case 27:this.popoverEl.open=!1}}handleSliceClick(e,t){this.popoverEl&&!this.isTabbing&&(t.coords={x:e.clientX,y:e.clientY},this.openPopover(t))}handleSliceFocus(e,t){this.popoverEl&&this.isTabbing&&(t.coords=o(e.target),this.openPopover(t))}handleSliceKeyDown(e){if(this.popoverEl&&this.popoverEl.open&&"Enter"===e.key){const e=this.popoverEl.querySelector("button");e&&e.click()}}focusNext(){const e=h(document.activeElement),t=(this.sliceEls.indexOf(e)+1)%this.sliceEls.length;this.focusSlice(t)}focusPrevious(){if(this.sliceEls){const e=h(document.activeElement);let t=this.sliceEls.indexOf(e);-1===t?t=0:0===t?t=this.sliceEls.length-1:t-=1,this.focusSlice(t)}}focusSlice(e){this.sliceEls&&this.el&&(this.popoverEl&&(this.popoverEl.open=!1),this.el.tabIndex=-1,this.el.focusable=!1,this.sliceEls.map((e=>{e.tabIndex=-1,e.focusable=!1})),this.sliceEls[e].tabIndex=0,this.sliceEls[e].focusable=!0,this.sliceEls[e].focus(),window.setTimeout((()=>{this.popoverEl&&(this.popoverEl.open=!0)}),10))}exitChart(){this.sliceEls&&this.sliceEls.map((e=>{e.tabIndex=-1,e.focusable=!1})),window.setTimeout((()=>{this.el&&(this.el.tabIndex=0,this.el.focusable=!0,this.popoverEl&&(this.popoverEl.open=!1))}),100)}openPopover(e){if(this.popoverEl&&e.title&&e.text){this.popoverEl.popoverTitle=e.title,this.popoverEl.popoverText=e.text,this.popoverEl.buttonText=e.buttonText,this.popoverEl.coords=e.coords,this.popoverEl.sliceRef=e.sliceRef,window.setTimeout((()=>{this.popoverEl&&(this.popoverEl.open=!0)}),30);const t=s((async()=>{this.popoverEl.open=!1}),10);document.addEventListener("scroll",(()=>{t()}));const r=p(this.el);r&&r.addEventListener("scroll",(()=>{t()}))}}amountToPercent(e,t){return t?Math.round(100*e/this.total):Math.round(1e4*e/this.total)/100}amountToDegree(e){return 360*e/this.total}toFixed(e){return parseFloat((Math.floor(100*e)/100).toFixed(2))}polarToCartesian(e,t,r,n){var a=this.toFixed(e+e*t*Math.cos(Math.PI*r/180)),i=this.toFixed(e+e*t*Math.sin(Math.PI*r/180));return void 0!==n?{x1:a,y1:i,x2:this.toFixed(e+e*t*Math.cos(Math.PI*n/180)),y2:this.toFixed(e+e*t*Math.sin(Math.PI*n/180))}:{x:a,y:i}}getPathData(e,t){var r=this.amountToDegree(t)-90,n=e/this.total*360,a=r+n,i=n>180?"1 1":"0 1",s=n>180?"1 0":"0 0",o=this.chartData.size/2,p=this.chartData.thickness;360===n&&(a-=.01);var l=this.polarToCartesian(o,1,r+1.5,a),h=this.polarToCartesian(o,p,r+3,a);return`M ${l.x1}, ${l.y1} `+this.getArc(1,i,l.x2,l.y2)+` L ${h.x2}, ${h.y2} `+this.getArc(p,s,h.x1,h.y1)+" z"}getArc(e,t,r,n){var a=this.toFixed(this.chartData.size/2*e);return`A ${a}, ${a} 0 ${t} ${this.toFixed(r)}, ${this.toFixed(n)}`}setHybridType(){this.hybridType=window.innerWidth>1340?"doughnut0":"bar1"}async getData(){this.slicesData=[];let e=0;const t=this.el.querySelectorAll("wm-chart-slice");this.total=Array.from(t).reduce(((e,t)=>e+parseInt(t.getAttribute("amount")||"0")),0),t.forEach(((r,n)=>{const a=parseInt(r.getAttribute("amount")||"0"),i=this.amountToPercent(a,!0),s=this.amountToPercent(parseInt(t[0===n?t.length-1:n-1].getAttribute("amount")||"0"),!0),o=this.amountToPercent(parseInt(t[n===t.length-1?0:n+1].getAttribute("amount")||"0"),!0);let p=i<4&&(s<5||o<5);0===i&&a>0&&(o<8||s<8)&&(p=!0);const l=this.types[this.currentChartType].colors["bar5"===this.currentChartType?this.notStartedColor?n:n+1:n],h={amount:a,perc:i,legend:r.getAttribute("legend"),color:l||"#d4d4d4",offset:e,id:`${this.uid}-${n+1}`,title:r.getAttribute("popover-title"),text:r.getAttribute("popover-text"),buttonText:r.getAttribute("popover-button-text"),sliceRef:r,inSmallCluster:p};e+=a,this.slicesData.push(h)})),this.chartData=this.types[this.currentChartType]}handleResize(){"hybrid"===this.chartType&&this.debouncedResize()}async componentWillLoad(){if(!this.label)throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.");this.showValues&&console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead."),"hybrid"===this.chartType&&this.setHybridType(),await this.getData()}handleSliceUpdate(){this.debouncedSliceUpdate()}renderFilter(){return r("defs",null,r("filter",{id:"wmHoverDropShadow"},r("feGaussianBlur",{stdDeviation:"3"}),r("feOffset",{result:"offsetblur"}),r("feFlood",{"flood-color":"#333"}),r("feComposite",{operator:"in",in2:"offsetblur"}),r("feMerge",null,r("feMergeNode",null),r("feMergeNode",{in:"SourceGraphic"}))))}renderDoughnut(){const e=this.chartData.size+this.chartData.padding;return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:e+"px",height:e+"px",ref:e=>this.doughnutEl=e,id:`graphic-${this.uid}`,class:"doughnut-svg"},this.renderFilter(),this.slicesData.map((e=>this.renderPath(e))),"doughnut0"===this.currentChartType?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},this.amountToPercent(this.slicesData[0].amount,!0)+"%"):r("g",{transform:`translate(${this.chartData.padding/2}, ${this.chartData.padding/2})`,"text-anchor":"middle","dominant-baseline":"middle"},this.slicesData.map((e=>e.amount>0?this.renderDoughnutText(e):"")))))}renderPath(e){return r("g",{transform:`translate(${this.chartData.padding/2}, ${this.chartData.padding/2})`},r("path",{id:e.id,class:"doughnut-segment",fill:e.amount?e.color:"transparent",d:this.getPathData(e.amount,e.offset),onClick:t=>this.handleSliceClick(t,e),onFocus:t=>this.handleSliceFocus(t,e),onKeyDown:e=>this.handleSliceKeyDown(e),role:"img","aria-label":e.legend}))}renderDoughnutText(e){if(!e.inSmallCluster){const t=this.amountToDegree(e.offset+e.amount/2);let{x:n,y:a}=this.polarToCartesian(this.chartData.size/2,1.4,t-90);return r("text",{class:"value",x:n+"px",y:a+"px"},`${e.perc>0?e.perc:"<1"}%`)}}renderBar(){return r("div",{class:"chart-wrapper bar-wrapper"},"bar1"===this.currentChartType?r("div",{class:"single-perc"},this.amountToPercent(this.slicesData[0].amount,!0)+"%"):"",this.drawAxis(),r("div",{class:{"inner-bar-wrapper":!0,"show-values":"percentage"===this.tempValueFormat||"amount"===this.tempValueFormat}},"bar1"!==this.currentChartType?r("div",{class:"values"},this.slicesData.map(((e,t)=>e.perc>0?this.renderBarText(e,t):""))):"",r("div",{class:"bar-segments-wrapper",ref:e=>this.barEl=e},this.slicesData.map(((e,t)=>this.renderBarSegment(e,t)))),this.renderCompletionMessage()))}renderBarSegment(e,t){const n=t!==this.slicesData.length-1,a=`calc(${this.amountToPercent(e.amount,!1)}%${n?" - 2px":""})`;return r("div",{class:"bar-segment "+(0===this.amountToPercent(e.amount,!1)?"zero":""),style:{backgroundColor:e.color,width:a},onClick:t=>this.handleSliceClick(t,e),onFocus:t=>this.handleSliceFocus(t,e),onKeyDown:e=>this.handleSliceKeyDown(e)},r("text",{class:"sr-only"},e.legend))}renderBarText(e,t){let n;if("percentage"===this.tempValueFormat)n=e.perc+"%";else{if("amount"!==this.tempValueFormat)return;n=e.amount}return r("span",{class:"value",style:{width:`calc(${this.amountToPercent(e.amount,!1)}%\n ${t!==this.slicesData.length-1?" - 2px":""}`}},n)}drawAxis(){if("bar3"===this.currentChartType)return r("svg",{class:"axis"},r("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),r("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),r("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),r("text",{x:"0.5",y:"-6"},"0%"),r("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}),r("text",{x:"100%",y:"-6"},"100%"))}renderCompletionMessage(){if("hybrid"===this.chartType&&this.completionMessage)return r("div",{class:"completion-message"},this.completionMessage)}renderLegend(){if(this.showLegend){const e=this.slicesData.reduce(((e,t)=>!!t.inSmallCluster||e),!1);return r("div",{class:"legend-wrapper"},r("div",{class:"legend "+(this.chartData.isBar?"--top":"--bottom"),"aria-hidden":"true"},this.total>0?this.slicesData.map((e=>{if(e.amount||e.legend)return r("div",{class:"legend-item"},r("div",{class:"legend-color",style:{"background-color":e.color}}),r("div",{class:"legend-text"},e.legend))})):""),!this.chartData.isBar&&e?r("div",{class:"cluster-warning"},l.formatMessage({id:"chart.hiddenPercentages",defaultMessage:"Percentages smaller than 5% are not shown when too close to each other."}),r("br",null),l.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details."})):"")}}render(){return r(n,{role:"application","aria-label":this.label+", "+l.formatMessage({id:"chart.interactiveChart",defaultMessage:"Interactive chart. Use arrow keys to browse elements, press Tab to exit."}),tabindex:"0"},r("div",{class:`component-wrapper ${this.currentChartType} ${this.isTabbing?"user-is-tabbing":""} ${"left"===this.labelPosition&&"bar4"===this.chartType?"left-label":""}`},r("label",{class:"label",id:`label-${this.uid}`,htmlFor:`graphic-${this.uid}`},r("span",{class:"label-text"},this.label),this.subinfo?r("span",{class:"subinfo"},this.subinfo):""),this.chartData.isBar?this.renderLegend():"",this.total>0&&this.chartData.isBar?this.renderBar():this.renderDoughnut(),this.chartData.isBar?"":this.renderLegend(),r("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",ref:e=>this.popoverEl=e}),"doughnut0"===this.hybridType?this.renderCompletionMessage():""))}get el(){return a(this)}};c.style=".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;}.component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}.component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}.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}.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}.component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}.component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}.component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}.component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}.component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}.component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}.component-wrapper .legend-wrapper .legend .legend-item{position:relative}.component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}.component-wrapper .legend-wrapper .legend .legend-text{padding-left:1rem;line-height:1}.component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}.component-wrapper .legend-wrapper .cluster-warning{font-size:0.75rem;font-style:italic;max-width:100%}.component-wrapper .doughnut-svg,.component-wrapper .inner-bar-wrapper{overflow:visible}.component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}.component-wrapper .bar-wrapper .inner-bar-wrapper{width:100%}.component-wrapper .bar-wrapper .inner-bar-wrapper .values{display:-ms-flexbox;display:flex}.component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper{display:-ms-flexbox;display:flex}.component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment{height:30px;cursor:pointer}.component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type){margin-right:2px}.component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}.component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}.component-wrapper .value{display:inline-block;text-align:center}.component-wrapper .value:not(:last-of-type){margin-right:2px}.component-wrapper path:active,.component-wrapper path:hover,.component-wrapper path:focus,.component-wrapper .bar-segment:active,.component-wrapper .bar-segment:hover,.component-wrapper .bar-segment:focus{outline:none}.component-wrapper path:active.bar-segment,.component-wrapper path:hover.bar-segment,.component-wrapper path:focus.bar-segment,.component-wrapper .bar-segment:active.bar-segment,.component-wrapper .bar-segment:hover.bar-segment,.component-wrapper .bar-segment:focus.bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}.component-wrapper path:active.doughnut-segment,.component-wrapper path:hover.doughnut-segment,.component-wrapper path:focus.doughnut-segment,.component-wrapper .bar-segment:active.doughnut-segment,.component-wrapper .bar-segment:hover.doughnut-segment,.component-wrapper .bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}.component-wrapper path::-moz-focus-inner,.component-wrapper .bar-segment::-moz-focus-inner{border:0;outline:none}.component-wrapper.doughnut1 label,.component-wrapper.doughnut1 .label-text,.component-wrapper.doughnut2 label,.component-wrapper.doughnut2 .label-text,.component-wrapper.doughnut3 label,.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}.component-wrapper.doughnut0{-ms-flex-align:center;align-items:center}.component-wrapper.doughnut0 label{text-align:center;width:100%;padding-bottom:1.5rem}.component-wrapper.doughnut0 label .subinfo{position:absolute}.component-wrapper.doughnut0 .legend{display:-ms-flexbox;display:flex}.component-wrapper.doughnut0 .completion-message{padding-top:0.625rem}.component-wrapper.bar1{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}.component-wrapper.bar1 label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.component-wrapper.bar1 label .subinfo{position:initial}.component-wrapper.bar1 .legend{display:none}.component-wrapper.bar1 .chart-wrapper{display:-ms-flexbox;display:flex}.component-wrapper.bar1 .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}.component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper{-ms-flex:1;flex:1}.component-wrapper.bar1 .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){.component-wrapper.bar1{-ms-flex-direction:row;flex-direction:row}.component-wrapper.bar1 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}.component-wrapper.bar1 .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.component-wrapper.bar1 .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}.component-wrapper.bar2,.component-wrapper.bar3,.component-wrapper.bar4,.component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}.component-wrapper.bar2 .inner-bar-wrapper,.component-wrapper.bar4 .inner-bar-wrapper,.component-wrapper.bar5 .inner-bar-wrapper{height:30px;margin-bottom:0}.component-wrapper.bar2 .inner-bar-wrapper.show-values,.component-wrapper.bar4 .inner-bar-wrapper.show-values,.component-wrapper.bar5 .inner-bar-wrapper.show-values{height:60px;margin-top:0}.component-wrapper.bar3 .legend{padding-bottom:1.25rem}.component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}.component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}.component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text{fill:#4a4a4a}.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)}.component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}.component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}.component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}.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(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";export{c as wm_chart}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-20856a2d.system.js","./p-4eca954a.system.js"],(function(e){"use strict";var t,i,o,s,r,n,l,a,p,d;return{setters:[function(e){t=e.r;i=e.c;o=e.h;s=e.H;r=e.g;n=e.f},function(e){l=e.i;a=e.g;p=e.l;d=e.q}],execute:function(){var c=':host(:not(:last-child)),wm-option:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host,wm-option{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus,wm-option:focus,wm-option.focus{outline:none;background:#f4f4f4}:host.icon,wm-option.icon{color:#575195}.checkbox:before{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:"\\f131";display:inline;margin-right:0.25rem;color:#575195}:host([aria-selected=true]),wm-option[aria-selected=true]{background:rgba(46, 27, 70, 0.05);font-weight:500}:host([aria-selected=true]) .checkbox:before,wm-option[aria-selected=true] .checkbox:before{content:"\\f132"}:host([aria-disabled=true]),wm-option[aria-disabled=true]{font-style:italic;color:#6b6b6b;cursor:default}:host([aria-disabled=true]) .checkbox:before,wm-option[aria-disabled=true] .checkbox:before{color:#6b6b6b}:host(.multi-option),wm-option.multi-option{background:unset}:host(.hassubinfo),wm-option.hassubinfo{display:-ms-flexbox;display:flex}:host(.hassubinfo) .option-wrapper,wm-option.hassubinfo .option-wrapper{-ms-flex:1;flex:1}:host(.hassubinfo) .subinfo,wm-option.hassubinfo .subinfo{-ms-flex:none;flex:none}.subinfo{font-style:italic}.option-wrapper{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{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;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus),wm-option:focus{outline:none;background:#f4f4f4}:host(:hover){background:#f4f4f4;outline:none}';var h=e("wm_option",function(){function e(e){t(this,e);this.wmOptionSelected=i(this,"wmOptionSelected",7);this.wmKeyUpPressed=i(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=i(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=i(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=i(this,"wmEndKeyPressed",7);this.wmTabKeyPressed=i(this,"wmTabKeyPressed",7);this.wmEnterKeyPressed=i(this,"wmEnterKeyPressed",7);this.wmLetterPressed=i(this,"wmLetterPressed",7);this.wmOptionBlurred=i(this,"wmOptionBlurred",7);this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false}Object.defineProperty(e.prototype,"isMultiChild",{get:function(){var e;return(e=this.el.parentElement)===null||e===void 0?void 0:e.multiple},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.keyCode){case 38:e.preventDefault();this.wmKeyUpPressed.emit();break;case 40:e.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case 13:e.preventDefault();if(!this.disabled){this.el.click();this.wmEnterKeyPressed.emit(this.el)}break;case 32:e.preventDefault();this.el.click();break;case 27:e.preventDefault();e.stopPropagation();this.wmEscKeyPressed.emit();break;case 36:e.preventDefault();this.wmHomeKeyPressed.emit();break;case 35:e.preventDefault();this.wmEndKeyPressed.emit();break;case 9:this.wmTabKeyPressed.emit();break;default:this.wmLetterPressed.emit(e.key)}};e.prototype.handleSelection=function(){if(!this.disabled){this.wmOptionSelected.emit()}};e.prototype.handleBlur=function(e){this.wmOptionBlurred.emit({relatedTarget:e.relatedTarget})};e.prototype.syncAriaSelected=function(){this.selected?this.el.setAttribute("aria-selected","true"):this.el.removeAttribute("aria-selected")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};e.prototype.focusHandler=function(e){if(e)this.el.focus()};e.prototype.updateDisabledOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};e.prototype.componentWillLoad=function(){this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick()};e.prototype.render=function(){return o(s,{role:"option",tabindex:this.focused?0:-1,class:"".concat(this.subinfo?"hassubinfo":""," ").concat(this.isMultiChild?"multi-option":"")},o("div",{class:"option-wrapper ".concat(this.isMultiChild?"checkbox":"")},o("slot",null)),o("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"],focused:["focusHandler"]}},enumerable:false,configurable:true});return e}());h.style=c;var f=':host{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .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}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:#c0392b}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.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}.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}.wrapper.invalid .label{color:#c0392b}.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] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .dropdown{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:#575195;min-width:8.75rem}.wrapper .dropdown .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:transparent;width:100%;border:solid 1px rgba(35, 35, 35, 0.6);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:#575195;font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .dropdown .displayedoption{height:2.75rem}}.wrapper .dropdown .displayedoption:before{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";position:absolute;right:0.5625rem;pointer-events:none}.wrapper .dropdown .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:transparent;text-decoration:none}.wrapper .dropdown .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .dropdown .displayedoption:focus{outline:none}.wrapper .dropdown .displayedoption::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.wrapper .dropdown .displayedoption.user-is-tabbing:focus::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .dropdown .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .dropdown>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .dropdown>.options{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-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;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}.wrapper .dropdown>.options.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .dropdown>.options.hidden{visibility:hidden}.wrapper .dropdown>.options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .dropdown .displayedoption{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}.wrapper .error-message{color:#c0392b;font-size:0.875rem;margin-top:0.25rem;margin-bottom:0.25rem;display:block;top:100%;left:0;font-style:italic}.rtl>.options{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.options .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';var u=e("wm_select",function(){function e(e){t(this,e);this.wmSelectDidLoad=i(this,"wmSelectDidLoad",7);this.wmSelectBlurred=i(this,"wmSelectBlurred",7);this.wmComponentBlurred=i(this,"wmComponentBlurred",7);this.disabled=false;this.invalid=false;this.labelPosition="top";this.requiredField=false;this.errorMessage="";this.multiple=false;this.placeholder=l.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.allSelectedMessage=l.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.requiredMessage=l.formatMessage({id:"global.requiredField",defaultMessage:"required field"});this.isTabbing=false;this.isExpanded=false;this.keysSoFar="";this.searchIndex=0;this.keyClear=null;this.openUp=false;this.overflowCount=0;this.displayedItems=[];this.allSelected=false}Object.defineProperty(e.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleOptionSelection=function(e){if(!this.multiple){this.childItems.filter((function(t){return t!=e.target&&!!t.selected})).map((function(e){return e.selected=false}))}this.focusItem(e.target);this.selectItem(e.target);if(!this.multiple){this.close()}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.target)};e.prototype.handleChildDown=function(e){this.moveDown(e.target)};e.prototype.moveToFirstItem=function(){this.focusItem(this.childItems[0])};e.prototype.moveToLastItem=function(){this.focusItem(this.childItems[this.childItems.length-1])};e.prototype.handleTabKey=function(){this.close(false)};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){var t=e.detail.relatedTarget===this.el||this.el.contains(e.detail.relatedTarget);if(!t){var i=new CustomEvent("blur");i.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(i)}};e.prototype.handleClick=function(e){var t=e.target===this.el||this.el.contains(e.target);if(!t&&this.isExpanded){this.close()}};e.prototype.handleButtonBlur=function(e){var t=e.relatedTarget===this.el||this.el.contains(e.relatedTarget);if(t){e.stopPropagation()}};e.prototype.handleKey=function(e){switch(e.keyCode){case 40:if(this.isExpanded===false){e.preventDefault();this.open("next")}break;case 38:if(this.isExpanded===false){e.preventDefault();this.open("previous")}break}};e.prototype.componentWillLoad=function(){if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("button").focus()}};this.uid=this.el.id?this.el.id:a();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.componentDidLoad=function(){var e=this;this.wmSelectDidLoad.emit();if(!this.childItems.length){throw new Error("wm-select should have wm-option elements as children.")}if(this.multiple&&this.childItems.filter((function(e){return e.subinfo})).length>0){throw new Error("wm-select with the multiple prop cannot have subinfo options")}if(this.multiple&&!this.placeholder){throw new Error("wm-select with the multiple prop needs to also use the placeholder prop.")}if(this.selectedItems.length>0){this.selectedItems.forEach((function(t){return e.displayedItems.push(t)}));this.setButtonText()}else if(!this.multiple){this.selectItem(this.childItems[0])}this.optionsEl.classList.add("hidden");n(this.el);if(this.maxHeight){this.optionsEl.style.maxHeight=this.maxHeight}};e.prototype.moveUp=function(e){var t=e.previousElementSibling;if(t){if(t.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top){this.optionsEl.scrollTop=t.getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop}this.focusItem(t)}else{this.focusItem(this.childItems[this.childItems.length-1])}};e.prototype.moveDown=function(e){var t=e.nextElementSibling;if(t&&t.tagName!=="INPUT"){if(t.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom){this.optionsEl.scrollTop=t.getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight}this.focusItem(t)}else{this.focusItem(this.childItems[0])}};e.prototype.open=function(e){var t=this;if(!this.disabled){var i=this.el.clientHeight;var o=this.buttonEl.clientHeight;this.openUp=p(this.el,this.optionsEl,i,o);this.isExpanded=true;this.optionsEl.classList.remove("hidden");window.requestAnimationFrame((function(){if(t.selectedItems.length>0){if(e==="next"){t.moveDown(t.selectedItems[t.selectedItems.length-1])}else if(e==="previous"){t.moveUp(t.selectedItems[0])}else{t.focusItem(t.selectedItems[0])}}else{t.focusItem(t.childItems[0])}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;this.childItems.map((function(e){return e.focused=false}));window.setTimeout((function(){t.optionsEl.classList.add("hidden");if(e){t.el.focus()}}),150)};e.prototype.focusItem=function(e){this.childItems.forEach((function(t){return t.focused=t===e}))};e.prototype.selectItem=function(e){if(this.multiple){e.selected=!e.selected}else{this.childItems.forEach((function(t){return t.selected=t===e}))}this.setButtonText()};e.prototype.findAndFocusItem=function(e){var t=e.detail.toUpperCase();if(!this.keysSoFar){for(var i=0;i<this.childItems.length;i++){if(this.childItems[i].focused){this.searchIndex=i}}}this.keysSoFar+=t;this.clearKeysSoFarAfterDelay();var o=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!o){o=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(o){this.focusItem(o)}};e.prototype.clearKeysSoFarAfterDelay=function(){if(this.keyClear){window.clearTimeout(this.keyClear);this.keyClear=null}this.keyClear=window.setTimeout(function(){this.keysSoFar="";this.keyClear=null}.bind(this),500)};e.prototype.findMatchInRange=function(e,t,i){for(var o=t;o<i;o++){var s=e[o].textContent;if(s&&s.toUpperCase().indexOf(this.keysSoFar)===0){return e[o]}}return null};e.prototype.exposeErrors=function(){var e=a();this.errorContainer.id="wm-errors-".concat(e);this.buttonEl.setAttribute("aria-describedby","wm-errors-".concat(e))};e.prototype.renderErrorContainer=function(){var e=this;return o("div",{id:"wm-errors",class:this.errorMessage?"error-message":"",ref:function(t){return e.errorContainer=t},"aria-live":"assertive","aria-atomic":"true"},this.errorMessage)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit();this.wmComponentBlurred.emit()}};e.prototype.setButtonText=function(){this.displayedItems=this.childItems.filter((function(e){return e.selected}));this.allSelected=this.displayedItems.length===this.childItems.length;if(this.multiple){var e=38;var t=window.getComputedStyle(this.buttonEl);var i=parseInt(t.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(t.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-i-o-e;var r=this.displayedItems.map((function(e){return e.shadowRoot.querySelector(".option-wrapper").clientWidth}));var n=r.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(n>s&&this.displayedItems.length>1){this.overflowCount++;n-=r[r.length-1];r.pop();this.displayedItems.pop()}}};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedItems.length<1){return o("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedItems.map((function(e,t){return o("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderSubinfo=function(){if(!this.multiple&&this.selectedItems.length>0&&this.selectedItems[0].subinfo){return o("span",{class:"subinfo"},this.selectedItems[0].subinfo)}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return o("span",null,o("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.render=function(){var e;var t=this;var i=(e={id:"selectbtn-".concat(this.uid)},e["disabled"]=this.disabled,e["aria-controls"]="list-".concat(this.uid),e["aria-labelledby"]="label-".concat(this.uid," selectbtn-").concat(this.uid),e["aria-describedby"]="wm-errors",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return o(s,{onBlur:function(e){return t.handleComponentBlur(e)}},o("div",{class:"wrapper ".concat(d()," label-").concat(this.labelPosition," ").concat(this.invalid||this.errorMessage?"invalid":"")},o("div",{class:"label-wrapper"},o("label",{class:"label",id:"label-".concat(this.uid),htmlFor:"selectbtn-".concat(this.uid)},this.label,this.requiredField?o("span",{class:"required"},o("span",{class:"sr-only"},this.requiredMessage),o("span",{"aria-hidden":"true"},"*")):"")),o("div",{class:"dropdown"},o("button",Object.assign({},i,{class:"displayedoption ".concat(this.isTabbing?"user-is-tabbing":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)}}),o("span",{class:this.selectedItems.length>0&&this.selectedItems.filter((function(e){return e.subinfo})).length>0?"overflowcontrol hassubinfo":"overflowcontrol"},o("span",{class:"button-text"},this.renderButtonText()),this.renderSubinfo()),this.renderOverflowCount()),o("div",{class:"options ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),id:"list-".concat(this.uid),tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label-".concat(this.uid),ref:function(e){return t.optionsEl=e}},o("slot",null)),this.renderErrorContainer())))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["exposeErrors"]}},enumerable:false,configurable:true});return e}());u.style=f}}}));
|
|
1
|
+
System.register(["./p-20856a2d.system.js","./p-253a08fe.system.js"],(function(e){"use strict";var t,i,o,s,r,n,l,a,p,d;return{setters:[function(e){t=e.r;i=e.c;o=e.h;s=e.H;r=e.g;n=e.f},function(e){l=e.i;a=e.g;p=e.l;d=e.q}],execute:function(){var c=':host(:not(:last-child)),wm-option:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host,wm-option{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus,wm-option:focus,wm-option.focus{outline:none;background:#f4f4f4}:host.icon,wm-option.icon{color:#575195}.checkbox:before{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:"\\f131";display:inline;margin-right:0.25rem;color:#575195}:host([aria-selected=true]),wm-option[aria-selected=true]{background:rgba(46, 27, 70, 0.05);font-weight:500}:host([aria-selected=true]) .checkbox:before,wm-option[aria-selected=true] .checkbox:before{content:"\\f132"}:host([aria-disabled=true]),wm-option[aria-disabled=true]{font-style:italic;color:#6b6b6b;cursor:default}:host([aria-disabled=true]) .checkbox:before,wm-option[aria-disabled=true] .checkbox:before{color:#6b6b6b}:host(.multi-option),wm-option.multi-option{background:unset}:host(.hassubinfo),wm-option.hassubinfo{display:-ms-flexbox;display:flex}:host(.hassubinfo) .option-wrapper,wm-option.hassubinfo .option-wrapper{-ms-flex:1;flex:1}:host(.hassubinfo) .subinfo,wm-option.hassubinfo .subinfo{-ms-flex:none;flex:none}.subinfo{font-style:italic}.option-wrapper{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{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;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus),wm-option:focus{outline:none;background:#f4f4f4}:host(:hover){background:#f4f4f4;outline:none}';var h=e("wm_option",function(){function e(e){t(this,e);this.wmOptionSelected=i(this,"wmOptionSelected",7);this.wmKeyUpPressed=i(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=i(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=i(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=i(this,"wmEndKeyPressed",7);this.wmTabKeyPressed=i(this,"wmTabKeyPressed",7);this.wmEnterKeyPressed=i(this,"wmEnterKeyPressed",7);this.wmLetterPressed=i(this,"wmLetterPressed",7);this.wmOptionBlurred=i(this,"wmOptionBlurred",7);this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false}Object.defineProperty(e.prototype,"isMultiChild",{get:function(){var e;return(e=this.el.parentElement)===null||e===void 0?void 0:e.multiple},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.keyCode){case 38:e.preventDefault();this.wmKeyUpPressed.emit();break;case 40:e.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case 13:e.preventDefault();if(!this.disabled){this.el.click();this.wmEnterKeyPressed.emit(this.el)}break;case 32:e.preventDefault();this.el.click();break;case 27:e.preventDefault();e.stopPropagation();this.wmEscKeyPressed.emit();break;case 36:e.preventDefault();this.wmHomeKeyPressed.emit();break;case 35:e.preventDefault();this.wmEndKeyPressed.emit();break;case 9:this.wmTabKeyPressed.emit();break;default:this.wmLetterPressed.emit(e.key)}};e.prototype.handleSelection=function(){if(!this.disabled){this.wmOptionSelected.emit()}};e.prototype.handleBlur=function(e){this.wmOptionBlurred.emit({relatedTarget:e.relatedTarget})};e.prototype.syncAriaSelected=function(){this.selected?this.el.setAttribute("aria-selected","true"):this.el.removeAttribute("aria-selected")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};e.prototype.focusHandler=function(e){if(e)this.el.focus()};e.prototype.updateDisabledOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};e.prototype.componentWillLoad=function(){this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick()};e.prototype.render=function(){return o(s,{role:"option",tabindex:this.focused?0:-1,class:"".concat(this.subinfo?"hassubinfo":""," ").concat(this.isMultiChild?"multi-option":"")},o("div",{class:"option-wrapper ".concat(this.isMultiChild?"checkbox":"")},o("slot",null)),o("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"],focused:["focusHandler"]}},enumerable:false,configurable:true});return e}());h.style=c;var f=':host{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .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}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:#c0392b}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.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}.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}.wrapper.invalid .label{color:#c0392b}.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] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .dropdown{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:#575195;min-width:8.75rem}.wrapper .dropdown .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:transparent;width:100%;border:solid 1px rgba(35, 35, 35, 0.6);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:#575195;font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .dropdown .displayedoption{height:2.75rem}}.wrapper .dropdown .displayedoption:before{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";position:absolute;right:0.5625rem;pointer-events:none}.wrapper .dropdown .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:transparent;text-decoration:none}.wrapper .dropdown .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .dropdown .displayedoption:focus{outline:none}.wrapper .dropdown .displayedoption::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.wrapper .dropdown .displayedoption.user-is-tabbing:focus::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .dropdown .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .dropdown>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .dropdown>.options{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-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;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}.wrapper .dropdown>.options.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .dropdown>.options.hidden{visibility:hidden}.wrapper .dropdown>.options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .dropdown .displayedoption{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}.wrapper .error-message{color:#c0392b;font-size:0.875rem;margin-top:0.25rem;margin-bottom:0.25rem;display:block;top:100%;left:0;font-style:italic}.rtl>.options{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.options .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';var u=e("wm_select",function(){function e(e){t(this,e);this.wmSelectDidLoad=i(this,"wmSelectDidLoad",7);this.wmSelectBlurred=i(this,"wmSelectBlurred",7);this.wmComponentBlurred=i(this,"wmComponentBlurred",7);this.disabled=false;this.invalid=false;this.labelPosition="top";this.requiredField=false;this.errorMessage="";this.multiple=false;this.placeholder=l.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.allSelectedMessage=l.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.requiredMessage=l.formatMessage({id:"global.requiredField",defaultMessage:"required field"});this.isTabbing=false;this.isExpanded=false;this.keysSoFar="";this.searchIndex=0;this.keyClear=null;this.openUp=false;this.overflowCount=0;this.displayedItems=[];this.allSelected=false}Object.defineProperty(e.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleOptionSelection=function(e){if(!this.multiple){this.childItems.filter((function(t){return t!=e.target&&!!t.selected})).map((function(e){return e.selected=false}))}this.focusItem(e.target);this.selectItem(e.target);if(!this.multiple){this.close()}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.target)};e.prototype.handleChildDown=function(e){this.moveDown(e.target)};e.prototype.moveToFirstItem=function(){this.focusItem(this.childItems[0])};e.prototype.moveToLastItem=function(){this.focusItem(this.childItems[this.childItems.length-1])};e.prototype.handleTabKey=function(){this.close(false)};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){var t=e.detail.relatedTarget===this.el||this.el.contains(e.detail.relatedTarget);if(!t){var i=new CustomEvent("blur");i.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(i)}};e.prototype.handleClick=function(e){var t=e.target===this.el||this.el.contains(e.target);if(!t&&this.isExpanded){this.close()}};e.prototype.handleButtonBlur=function(e){var t=e.relatedTarget===this.el||this.el.contains(e.relatedTarget);if(t){e.stopPropagation()}};e.prototype.handleKey=function(e){switch(e.keyCode){case 40:if(this.isExpanded===false){e.preventDefault();this.open("next")}break;case 38:if(this.isExpanded===false){e.preventDefault();this.open("previous")}break}};e.prototype.componentWillLoad=function(){if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("button").focus()}};this.uid=this.el.id?this.el.id:a();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.componentDidLoad=function(){var e=this;this.wmSelectDidLoad.emit();if(!this.childItems.length){throw new Error("wm-select should have wm-option elements as children.")}if(this.multiple&&this.childItems.filter((function(e){return e.subinfo})).length>0){throw new Error("wm-select with the multiple prop cannot have subinfo options")}if(this.multiple&&!this.placeholder){throw new Error("wm-select with the multiple prop needs to also use the placeholder prop.")}if(this.selectedItems.length>0){this.selectedItems.forEach((function(t){return e.displayedItems.push(t)}));this.setButtonText()}else if(!this.multiple){this.selectItem(this.childItems[0])}this.optionsEl.classList.add("hidden");n(this.el);if(this.maxHeight){this.optionsEl.style.maxHeight=this.maxHeight}};e.prototype.moveUp=function(e){var t=e.previousElementSibling;if(t){if(t.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top){this.optionsEl.scrollTop=t.getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop}this.focusItem(t)}else{this.focusItem(this.childItems[this.childItems.length-1])}};e.prototype.moveDown=function(e){var t=e.nextElementSibling;if(t&&t.tagName!=="INPUT"){if(t.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom){this.optionsEl.scrollTop=t.getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight}this.focusItem(t)}else{this.focusItem(this.childItems[0])}};e.prototype.open=function(e){var t=this;if(!this.disabled){var i=this.el.clientHeight;var o=this.buttonEl.clientHeight;this.openUp=p(this.el,this.optionsEl,i,o);this.isExpanded=true;this.optionsEl.classList.remove("hidden");window.requestAnimationFrame((function(){if(t.selectedItems.length>0){if(e==="next"){t.moveDown(t.selectedItems[t.selectedItems.length-1])}else if(e==="previous"){t.moveUp(t.selectedItems[0])}else{t.focusItem(t.selectedItems[0])}}else{t.focusItem(t.childItems[0])}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;this.childItems.map((function(e){return e.focused=false}));window.setTimeout((function(){t.optionsEl.classList.add("hidden");if(e){t.el.focus()}}),150)};e.prototype.focusItem=function(e){this.childItems.forEach((function(t){return t.focused=t===e}))};e.prototype.selectItem=function(e){if(this.multiple){e.selected=!e.selected}else{this.childItems.forEach((function(t){return t.selected=t===e}))}this.setButtonText()};e.prototype.findAndFocusItem=function(e){var t=e.detail.toUpperCase();if(!this.keysSoFar){for(var i=0;i<this.childItems.length;i++){if(this.childItems[i].focused){this.searchIndex=i}}}this.keysSoFar+=t;this.clearKeysSoFarAfterDelay();var o=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!o){o=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(o){this.focusItem(o)}};e.prototype.clearKeysSoFarAfterDelay=function(){if(this.keyClear){window.clearTimeout(this.keyClear);this.keyClear=null}this.keyClear=window.setTimeout(function(){this.keysSoFar="";this.keyClear=null}.bind(this),500)};e.prototype.findMatchInRange=function(e,t,i){for(var o=t;o<i;o++){var s=e[o].textContent;if(s&&s.toUpperCase().indexOf(this.keysSoFar)===0){return e[o]}}return null};e.prototype.exposeErrors=function(){var e=a();this.errorContainer.id="wm-errors-".concat(e);this.buttonEl.setAttribute("aria-describedby","wm-errors-".concat(e))};e.prototype.renderErrorContainer=function(){var e=this;return o("div",{id:"wm-errors",class:this.errorMessage?"error-message":"",ref:function(t){return e.errorContainer=t},"aria-live":"assertive","aria-atomic":"true"},this.errorMessage)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit();this.wmComponentBlurred.emit()}};e.prototype.setButtonText=function(){this.displayedItems=this.childItems.filter((function(e){return e.selected}));this.allSelected=this.displayedItems.length===this.childItems.length;if(this.multiple){var e=38;var t=window.getComputedStyle(this.buttonEl);var i=parseInt(t.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(t.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-i-o-e;var r=this.displayedItems.map((function(e){return e.shadowRoot.querySelector(".option-wrapper").clientWidth}));var n=r.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(n>s&&this.displayedItems.length>1){this.overflowCount++;n-=r[r.length-1];r.pop();this.displayedItems.pop()}}};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedItems.length<1){return o("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedItems.map((function(e,t){return o("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderSubinfo=function(){if(!this.multiple&&this.selectedItems.length>0&&this.selectedItems[0].subinfo){return o("span",{class:"subinfo"},this.selectedItems[0].subinfo)}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return o("span",null,o("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.render=function(){var e;var t=this;var i=(e={id:"selectbtn-".concat(this.uid)},e["disabled"]=this.disabled,e["aria-controls"]="list-".concat(this.uid),e["aria-labelledby"]="label-".concat(this.uid," selectbtn-").concat(this.uid),e["aria-describedby"]="wm-errors",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return o(s,{onBlur:function(e){return t.handleComponentBlur(e)}},o("div",{class:"wrapper ".concat(d()," label-").concat(this.labelPosition," ").concat(this.invalid||this.errorMessage?"invalid":"")},o("div",{class:"label-wrapper"},o("label",{class:"label",id:"label-".concat(this.uid),htmlFor:"selectbtn-".concat(this.uid)},this.label,this.requiredField?o("span",{class:"required"},o("span",{class:"sr-only"},this.requiredMessage),o("span",{"aria-hidden":"true"},"*")):"")),o("div",{class:"dropdown"},o("button",Object.assign({},i,{class:"displayedoption ".concat(this.isTabbing?"user-is-tabbing":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)}}),o("span",{class:this.selectedItems.length>0&&this.selectedItems.filter((function(e){return e.subinfo})).length>0?"overflowcontrol hassubinfo":"overflowcontrol"},o("span",{class:"button-text"},this.renderButtonText()),this.renderSubinfo()),this.renderOverflowCount()),o("div",{class:"options ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),id:"list-".concat(this.uid),tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label-".concat(this.uid),ref:function(e){return t.optionsEl=e}},o("slot",null)),this.renderErrorContainer())))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["exposeErrors"]}},enumerable:false,configurable:true});return e}());u.style=f}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-38062c39.js";import"./p-35fe1e16.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t(JSON.parse('[["p-2e5c991e",[[1,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"],"controllerEnabled":[4,"controller-enabled"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"wmTabSelected","handleTabSelected"],[0,"keydownOnTabItem","handleKeydown"],[9,"resize","setLayout"]]],[1,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]]]],["p-937ad4f8",[[1,"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],"isTabbing":[32],"itemIndexToFocus":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]]]]],["p-eaa9cebd",[[1,"wm-network-uploader",{"getPath":[1,"get-path"],"requestUploadPath":[1,"request-upload-path"],"uploadPath":[1,"upload-path"],"requestDownloadPath":[1,"request-download-path"],"deletePath":[1,"delete-path"],"associatedData":[1,"associated-data"],"buttonText":[1,"button-text"],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[2,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"isTabbing":[32],"fileList":[32],"inProgressList":[32],"errorList":[32],"notif":[32],"snackbar":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"],[0,"userFinishedSnack","handleFinishedSnack"]]]]],["p-bae0a8a9",[[1,"wm-navigation",{"open":[1540],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"]]],[1,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"tooltipVisible":[1028,"tooltip-visible"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[1,"wm-navigation-item",{"href":[1],"text":[1],"active":[4],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["p-cc4fa5ac",[[1,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonType":[1,"button-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[4,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"focused":[4],"icon":[1025],"description":[1],"isKeying":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]]]]],["p-27e06d30",[[1,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"valueFormat":[1,"value-format"],"showValues":[1,"show-values"],"showLegend":[4,"show-legend"],"notStartedColor":[4,"not-started-color"],"labelPosition":[1,"label-position"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[9,"resize","handleResize"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-d0478903",[[1,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1025,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1025,"label-position"],"label":[1025],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"displayError":[32]},[[0,"keydown","handleTabbingOn"],[0,"click","handleTabbingOff"],[0,"popupClosed","handlePopupClosed"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"]]]]],["p-8a0450fd",[[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"]},[[4,"focusLastElement","focusLastEl"]]]]],["p-4209831e",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]},[[4,"focusFirstElement","focusFirstEl"]]]]],["p-9ebb877f",[[1,"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],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["p-bbaab9b6",[[1,"wm-uploader",{"uploaderType":[1025,"uploader-type"],"type":[1],"buttonText":[1,"button-text"],"info":[1],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[2,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"files":[1],"filesToUpload":[16],"rejectedFiles":[1,"rejected-files"],"isTabbing":[32],"errorList":[32],"notif":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"]]]]],["p-244877c8",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-abbfcf28",[[1,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1537],"disabled":[516],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"preventValidation":[1,"prevent-validation"],"type":[1],"step":[2],"min":[2],"max":[2],"announcement":[32],"displayedErrorMessage":[32]}]]],["p-9cda12ea",[[0,"wm-modal",{"open":[1540],"isOpen":[1540,"is-open"],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"isTypeDialog":[516,"is-type-dialog"],"uid":[1537],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},[[0,"click","handleClick"],[0,"keydown","closeModalOnEscape"]]]]],["p-1cf84785",[[1,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeViewport":[4,"is-large-viewport"],"isTabbing":[32],"srAnnouncement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"resize","handleResize"]]]]],["p-6ae89155",[[1,"wm-tag-input",{"label":[1],"labelPosition":[1,"label-position"],"options":[1025],"selectedTags":[1537,"selected-tags"],"info":[1],"addNew":[4,"add-new"],"placeholder":[1025],"characterLimit":[2,"character-limit"],"maxTags":[2,"max-tags"],"focusedListItem":[32],"focusedTag":[32],"isExpanded":[32],"tagsList":[32],"optionsList":[32],"charCount":[32],"liveRegionMessage":[32]},[[4,"click","closeIfNotElOrChild"],[9,"resize","handleResize"]]]]],["p-4027ec1c",[[1,"wm-timepicker",{"disabled":[4],"value":[1537],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"selectedOption":[32],"isExpanded":[32],"isTabbing":[32],"displayedErrorMessage":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKey"]]]]],["p-0e69fab1",[[1,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipText":[1,"tooltip-text"],"tooltipPosition":[1537,"tooltip-position"],"isOpen":[32],"isTabbing":[32]},[[0,"keydown","handleKeydown"],[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"click","handleClick"]]]]],["p-3ba3afca",[[0,"wm-wrapper"]]],["p-4fdd9f45",[[0,"priv-chart-popover",{"sliceRef":[16],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"buttonText":[1,"button-text"],"open":[1028],"coords":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]]]]],["p-806d1f78",[[0,"priv-datepicker",{"disabled":[4],"isExpanded":[1540,"is-expanded"],"view":[1537],"date":[1040],"selectedYear":[1026,"selected-year"],"selectedMonth":[1026,"selected-month"],"selectedDay":[1026,"selected-day"],"monthInFocus":[1026,"month-in-focus"],"yearInFocus":[1026,"year-in-focus"],"dayInFocus":[1026,"day-in-focus"],"parentId":[1537,"parent-id"],"monthNumInFocus":[32],"isTabbing":[32]},[[0,"keydown","handleKey"],[0,"keydown","toggleTabbingOn"],[9,"mousedown","toggleTabbingOff"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"]]]]],["p-764fa608",[[1,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"],"isTabbing":[1028,"is-tabbing"]}]]],["p-ef344252",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-8f536b53",[[1,"wm-snackbar",{"notifications":[1537]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]]]]],["p-96c4dc9e",[[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]]],[1,"wm-select",{"disabled":[516],"invalid":[1028],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"placeholder":[1],"allSelectedMessage":[1,"all-selected-message"],"isTabbing":[32],"isExpanded":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstItem"],[0,"wmEndKeyPressed","moveToLastItem"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusItem"]]]]],["p-1bdaf8f4",[[1,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"buttonStyle":[1025,"button-style"],"icon":[1537],"iconSize":[1,"icon-size"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"tooltipVisible":[1028,"tooltip-visible"],"adjustedTooltipPosition":[32],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"scroll","handleScroll"],[0,"keydown","handleKeydown"]]]]]]'),e)));
|
|
1
|
+
import{p as e,b as t}from"./p-38062c39.js";import"./p-d59b3b74.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t(JSON.parse('[["p-67f74636",[[1,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"],"controllerEnabled":[4,"controller-enabled"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"wmTabSelected","handleTabSelected"],[0,"keydownOnTabItem","handleKeydown"],[9,"resize","setLayout"]]],[1,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]]]],["p-09508c2d",[[1,"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],"isTabbing":[32],"itemIndexToFocus":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]]]]],["p-bd449bb6",[[1,"wm-network-uploader",{"getPath":[1,"get-path"],"requestUploadPath":[1,"request-upload-path"],"uploadPath":[1,"upload-path"],"requestDownloadPath":[1,"request-download-path"],"deletePath":[1,"delete-path"],"associatedData":[1,"associated-data"],"buttonText":[1,"button-text"],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[2,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"isTabbing":[32],"fileList":[32],"inProgressList":[32],"errorList":[32],"notif":[32],"snackbar":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"],[0,"userFinishedSnack","handleFinishedSnack"]]]]],["p-2041fb68",[[1,"wm-navigation",{"open":[1540],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"]]],[1,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"tooltipVisible":[1028,"tooltip-visible"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[1,"wm-navigation-item",{"href":[1],"text":[1],"active":[4],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["p-cdd5ce00",[[1,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonType":[1,"button-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[4,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"focused":[4],"icon":[1025],"description":[1],"isKeying":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]]]]],["p-dd6b9aee",[[1,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"valueFormat":[1,"value-format"],"showValues":[1,"show-values"],"showLegend":[4,"show-legend"],"notStartedColor":[4,"not-started-color"],"labelPosition":[1,"label-position"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[9,"resize","handleResize"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-8af7c223",[[1,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1025,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1025,"label-position"],"label":[1025],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"displayError":[32]},[[0,"keydown","handleTabbingOn"],[0,"click","handleTabbingOff"],[0,"popupClosed","handlePopupClosed"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"]]]]],["p-8a0450fd",[[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"]},[[4,"focusLastElement","focusLastEl"]]]]],["p-99d610f9",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]},[[4,"focusFirstElement","focusFirstEl"]]]]],["p-597985b9",[[1,"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],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["p-adde97b9",[[1,"wm-uploader",{"uploaderType":[1025,"uploader-type"],"type":[1],"buttonText":[1,"button-text"],"info":[1],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[2,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"files":[1],"filesToUpload":[16],"rejectedFiles":[1,"rejected-files"],"isTabbing":[32],"errorList":[32],"notif":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"]]]]],["p-244877c8",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-d680d98f",[[1,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1537],"disabled":[516],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"preventValidation":[1,"prevent-validation"],"type":[1],"step":[2],"min":[2],"max":[2],"announcement":[32],"displayedErrorMessage":[32]}]]],["p-3b6b7618",[[0,"wm-modal",{"open":[1540],"isOpen":[1540,"is-open"],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"isTypeDialog":[516,"is-type-dialog"],"uid":[1537],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},[[0,"click","handleClick"],[0,"keydown","closeModalOnEscape"]]]]],["p-27f0d9be",[[1,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeViewport":[4,"is-large-viewport"],"isTabbing":[32],"srAnnouncement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"resize","handleResize"]]]]],["p-c9284e6b",[[1,"wm-tag-input",{"label":[1],"labelPosition":[1,"label-position"],"options":[1025],"selectedTags":[1537,"selected-tags"],"info":[1],"addNew":[4,"add-new"],"placeholder":[1025],"characterLimit":[2,"character-limit"],"maxTags":[2,"max-tags"],"focusedListItem":[32],"focusedTag":[32],"isExpanded":[32],"tagsList":[32],"optionsList":[32],"charCount":[32],"liveRegionMessage":[32]},[[4,"click","closeIfNotElOrChild"],[9,"resize","handleResize"]]]]],["p-cd75be7a",[[1,"wm-timepicker",{"disabled":[4],"value":[1537],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"selectedOption":[32],"isExpanded":[32],"isTabbing":[32],"displayedErrorMessage":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKey"]]]]],["p-bf3c22d9",[[1,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipText":[1,"tooltip-text"],"tooltipPosition":[1537,"tooltip-position"],"isOpen":[32],"isTabbing":[32]},[[0,"keydown","handleKeydown"],[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"click","handleClick"]]]]],["p-3ba3afca",[[0,"wm-wrapper"]]],["p-5adc422a",[[0,"priv-chart-popover",{"sliceRef":[16],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"buttonText":[1,"button-text"],"open":[1028],"coords":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]]]]],["p-71a400fd",[[0,"priv-datepicker",{"disabled":[4],"isExpanded":[1540,"is-expanded"],"view":[1537],"date":[1040],"selectedYear":[1026,"selected-year"],"selectedMonth":[1026,"selected-month"],"selectedDay":[1026,"selected-day"],"monthInFocus":[1026,"month-in-focus"],"yearInFocus":[1026,"year-in-focus"],"dayInFocus":[1026,"day-in-focus"],"parentId":[1537,"parent-id"],"monthNumInFocus":[32],"isTabbing":[32]},[[0,"keydown","handleKey"],[0,"keydown","toggleTabbingOn"],[9,"mousedown","toggleTabbingOff"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"]]]]],["p-764fa608",[[1,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"],"isTabbing":[1028,"is-tabbing"]}]]],["p-ef344252",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-0019a53b",[[1,"wm-snackbar",{"notifications":[1537]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]]]]],["p-bdd8caf1",[[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]]],[1,"wm-select",{"disabled":[516],"invalid":[1028],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"placeholder":[1],"allSelectedMessage":[1,"all-selected-message"],"isTabbing":[32],"isExpanded":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstItem"],[0,"wmEndKeyPressed","moveToLastItem"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusItem"]]]]],["p-1ef19ec1",[[1,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"buttonStyle":[1025,"button-style"],"icon":[1537],"iconSize":[1,"icon-size"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"tooltipVisible":[1028,"tooltip-visible"],"adjustedTooltipPosition":[32],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"scroll","handleScroll"],[0,"keydown","handleKeydown"]]]]]]'),e)));
|
package/dist/ripple/ripple.js
CHANGED
|
@@ -114,7 +114,7 @@ DOMTokenList
|
|
|
114
114
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
|
-
var url = new URL('./p-
|
|
117
|
+
var url = new URL('./p-453dcff5.system.js', new URL(resourcesUrl, window.location.origin));
|
|
118
118
|
System.import(url.href);
|
|
119
119
|
};
|
|
120
120
|
|