q2-tecton-elements 1.41.0 → 1.41.1

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.
Files changed (36) hide show
  1. package/dist/cjs/{index-c385e32f.js → index-174843b4.js} +1 -1
  2. package/dist/cjs/{index-c385e32f.js.map → index-174843b4.js.map} +1 -1
  3. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  4. package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
  5. package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
  6. package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
  7. package/dist/collection/components/q2-checkbox/q2-checkbox.css +27 -18
  8. package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
  9. package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
  10. package/dist/collection/components/q2-data-table/q2-data-table.js +6 -6
  11. package/dist/collection/components/q2-input/q2-input.js +1 -1
  12. package/dist/collection/components/q2-option-list/q2-option-list.js +2 -2
  13. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +2 -2
  14. package/dist/components/q2-checkbox2.js +2 -2
  15. package/dist/components/q2-checkbox2.js.map +1 -1
  16. package/dist/esm/{index-f0dfb099.js → index-6e45a543.js} +1 -1
  17. package/dist/esm/{index-f0dfb099.js.map → index-6e45a543.js.map} +1 -1
  18. package/dist/esm/q2-calendar.entry.js +1 -1
  19. package/dist/esm/q2-checkbox.entry.js +2 -2
  20. package/dist/esm/q2-checkbox.entry.js.map +1 -1
  21. package/dist/esm/q2-relative-time.entry.js +1 -1
  22. package/dist/q2-tecton-elements/{p-3c42c90f.js → p-04978763.js} +1 -1
  23. package/dist/q2-tecton-elements/p-7990796e.entry.js +2 -0
  24. package/dist/q2-tecton-elements/p-7990796e.entry.js.map +1 -0
  25. package/dist/q2-tecton-elements/{p-e834679c.entry.js → p-adda0544.entry.js} +2 -2
  26. package/dist/q2-tecton-elements/{p-9889cdb8.entry.js → p-dd552b4d.entry.js} +2 -2
  27. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  28. package/dist/test/elements/q2-checkbox-test.e2e.js +117 -9
  29. package/dist/test/elements/q2-checkbox-test.e2e.js.map +1 -1
  30. package/package.json +3 -3
  31. package/dist/q2-tecton-elements/p-47a65dbe.entry.js +0 -2
  32. package/dist/q2-tecton-elements/p-47a65dbe.entry.js.map +0 -1
  33. /package/dist/q2-tecton-elements/{p-3c42c90f.js.map → p-04978763.js.map} +0 -0
  34. /package/dist/q2-tecton-elements/{p-e834679c.entry.js.map → p-adda0544.entry.js.map} +0 -0
  35. /package/dist/q2-tecton-elements/{p-9889cdb8.entry.js.map → p-dd552b4d.entry.js.map} +0 -0
  36. /package/dist/types/workspace/workspace/{_Gitlab_tecton-production_master → tecton-production_release_1.41.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as i,g as n}from"./p-8013d83b.js";import{d as a}from"./p-3c42c90f.js";import{l as s,h as r,o as d,i as o,w as l,a as c}from"./p-38dda948.js";function h(e){const t=new Date(e);if(!a.isValid(t))return;return a.formatISO(t,{representation:"date"})}let u;function f(e){const t=new Date(e);if(!a.isValid(t))return;const i=t.toISOString();if(!u){u=new Intl.DateTimeFormat("en-US",{month:"2-digit",day:"2-digit",year:"numeric",timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}return u.format(new Date(i))}let v;function p(e){const t=new Date(e);if(!a.isValid(t))return;if(!v){v=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"})}return v.format(t)}let b;function m(e){if(!e)return;const t=new Date(e);if(!a.isValid(t))return;if(!b){b=new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric",weekday:"long",timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}return b.format(t)}function y(e){return e.replace(/[d]/g,"E").replace(/[D]/g,"d").replace(/[Y]/g,"y").replace(/[l]/g,"P").replace(/[W]/g,"I")}function g(e){const t=typeof e==="string";if(!t&&e&&a.isValid(new Date(e||undefined))){e=h(e)}else if(!e||!a.isValid(new Date(e))){return undefined}let i;const n=e.split(/[\/\-]/).map((e=>e.padStart(2,"0")));const s=t&&e.length>=24&&e[10]==="T";const r=n.length===3;const d=n.length<3;if(s){e=e.split("T")[0];i=new Date(e)}else if(r){const t=e.includes("/")&&n[2].length===4;if(t)n.unshift(n.pop());i=new Date(n.join("-"))}else if(d){const e=new Date;let t;let a;let s;switch(n.length){case 1:t=e.getFullYear();a=n[0];s="01";break;case 2:t=e.getFullYear();a=n[0];s=n[1];break}i=new Date(`${t}-${a}-${s}`)}if(!a.isValid(i))return undefined;i=w(i);return a.isValid(i)?i:undefined}function w(e){const t=e.getTimezoneOffset();return a.setMinutes(e,t+Math.abs(t%60))}function D(e){if(!Array.isArray(e)||e.length===0){return[]}return e.map((e=>g(e)))}function x(e=new Date){return{monthIndex:e.getMonth(),selectedYear:e.getFullYear()}}function k(e="",t=[],i=[],n=[],r,d,o="mm/dd/yyyy",l){let c=true;let u=false;let f="info";let v=`${s("tecton.element.calendar.hint.format")}: ${o}`;if(!e){return{isValid:c,inputDate:new Date(""),isAvailable:u,messageType:f,message:v}}const b=$(e,l);const m=b.getMonth()+1;const y=b.getDate();const g=b.getFullYear();const w=[m,y,g];if(a.isValid(b)){const a=C()[b.getMonth()];if(e.length===10){c=true;f=null;v=null}u=t.includes(b.getDay());const l=h(b);if(u){const e=i.length&&!i.includes(l);const t=n.length&&n.includes(l);const a=r&&r>l;const s=d&&d<l;if(e||t||a||s){u=false}}if(e.length>=5&&!u){c=false;f="error";const e=!a||!y||!g;v=e?`${s("tecton.element.calendar.hint.invalidDate")}: ${o}`:s("tecton.element.calendar.hint.notAvailableDate",[p(b)])}}else{c=false;f="error";v=`${s("tecton.element.calendar.hint.invalidDate")}: ${o}`}return{isValid:c,messageType:f,message:v,inputDate:b,isAvailable:u,calendarPosition:w}}function $(e,t){const i=new Date;let[n,a,s]=e.split("/");if(n==="0")n="01";if(a==="0")a="01";if(e.length===10){return new Date(e)}else if(n&&a&&Number(a)>0){const e=Number(a)<10?`0${Number(a)}`:a;const i=!s||s.length<4?T(n,a,t):s;return new Date(`${n}/${e}/${i}`)}else if(n){return new Date(`${n}/01/${i.getFullYear()}`)}}function T(e,t,i){const n=`${e}/${t}`;const a=new Date;const s=a.getMonth()<9?`0${a.getMonth()+1}`:`${a.getMonth()+1}`;const r=a.getDate()<10?`0${a.getDate()}`:`${a.getDate()}`;const d=`${s}/${r}/${a.getFullYear()}`;let o=a.getFullYear();if(i==="future"&&d.slice(0,5)>n){o=a.getFullYear()+1}else if(i==="past"&&d.slice(0,5)<n){o=a.getFullYear()-1}return o.toString()}function I(e){if(!e){return""}if(e.match(/^[1-9]\/$/)){return`0${e}/`}else if(e.match(/^[0-9]{2}\/[1-9]{1}\/$/)){const t=e.split("/");return`${t[0]}/0${t[1]}/`}return e}function A(e){const t=(e||"").split("-");if(t.length!==3)return"";return`${t[1]}/${t[2]}/${t[0]}`}function O(e,t){return new Date(t,e,1,1,1,1,1).getDay()}function V(){return[s("tecton.element.calendar.days.short.Sunday"),s("tecton.element.calendar.days.short.Monday"),s("tecton.element.calendar.days.short.Tuesday"),s("tecton.element.calendar.days.short.Wednesday"),s("tecton.element.calendar.days.short.Thursday"),s("tecton.element.calendar.days.short.Friday"),s("tecton.element.calendar.days.short.Saturday")]}function z(){return[s("tecton.element.calendar.days.Sunday"),s("tecton.element.calendar.days.Monday"),s("tecton.element.calendar.days.Tuesday"),s("tecton.element.calendar.days.Wednesday"),s("tecton.element.calendar.days.Thursday"),s("tecton.element.calendar.days.Friday"),s("tecton.element.calendar.days.Saturday")]}function C(){return[s("tecton.element.calendar.months.January"),s("tecton.element.calendar.months.February"),s("tecton.element.calendar.months.March"),s("tecton.element.calendar.months.April"),s("tecton.element.calendar.months.May"),s("tecton.element.calendar.months.June"),s("tecton.element.calendar.months.July"),s("tecton.element.calendar.months.August"),s("tecton.element.calendar.months.September"),s("tecton.element.calendar.months.October"),s("tecton.element.calendar.months.November"),s("tecton.element.calendar.months.December")]}function E(e,t){const i=a.getDaysInMonth(new Date(t,e));return[...Array(i).keys()].reduce(((i,n)=>{i.push(new Date(t,e,n+1));return i}),[])}function q(e=127){const t=e&1;const i=e&2;const n=e&4;const a=e&8;const s=e&16;const r=e&32;const d=e&64;const o=[];if(e<=0)return o;if(t)o.push(0);if(i)o.push(1);if(n)o.push(2);if(a)o.push(3);if(s)o.push(4);if(r)o.push(5);if(d)o.push(6);return o}function M(e,t){return e.includes(t.getDay())}function S(e,t){return!Y(e,t)}function Y(e,t){return e.some((e=>a.isSameDay(e,t)))}function F(e,t,i,n,a,s,r){const d=[H.bind(null,s,new Date)];if(t===null||t===void 0?void 0:t.length){d.push(Y.bind(null,t))}else{d.push(M.bind(null,e))}d.push(S.bind(null,i));return L(n,a,s,d,r)}function L({monthIndex:e,selectedYear:t},i,n,s,r){const d=!a.isValid(new Date(r));const o=E(e,t).map(((e,t)=>{const a=s.some((t=>!t(e)));const r=P(e,n,i);const o=j(Object.assign(Object.assign({},r),{isInvalid:a,isIncompleteDate:d}));return Object.assign(Object.assign({},r),{isValid:!a,date:e,integer:t+1,isEmpty:false,isActivity:false,classList:o})}));const l=B(O(e,t));const c=U((l.length+o.length)%7);return[...l,...o,...c]}function H(e,t,i){const n=a.isAfter(e===null||e===void 0?void 0:e.startDate,i);const s=a.isBefore(e===null||e===void 0?void 0:e.endDate,i);const r=a.isSameDay(t,i)&&a.isAfter(t,e===null||e===void 0?void 0:e.cutOffTime);return!(n||r||s)}function P(e,t,i){if(!i)i=new Date;const n=i&&a.isSameDay(i,e);const s=a.isSameDay(e,new Date);const r=a.isSameDay(e,t===null||t===void 0?void 0:t.startDate);const d=a.isSameDay(e,t===null||t===void 0?void 0:t.endDate);return{isSelected:n,isToday:s,isStartDate:r,isEndDate:d}}function j({isInvalid:e,isSelected:t,isEndDate:i,isStartDate:n,isToday:a,isIncompleteDate:s}){const r=[];if(!e)r.push("is-valid");if(t)r.push("is-selected");if(i)r.push("is-end-date");if(n)r.push("is-start-date");if(a)r.push("is-today");if(t&&e&&!s)r.push("is-unavailable");return r.join(" ")}function B(e){return K(0,e)}function U(e){if(e===0)return[];return K(e,7)}const W={date:null,integer:null,isActivity:false,isEmpty:true,isValid:false,isToday:false,isSelected:false,isStartDate:false,isEndDate:false,classList:""};function K(e,t){if(e===7)e=0;return[...Array(t-e).keys()].map((()=>Object.assign({},W)))}const N="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}:host[hidden]{display:none}click-elsewhere{position:relative;display:block}q2-input{margin:0;cursor:pointer}q2-popover{--comp-min-tappable-size:44px;--comp-table-border-spacing:2px;--comp-min-tappable-size-and-spacing:calc(var(--comp-min-tappable-size) + var(--comp-table-border-spacing));--comp-popover-padding:var(--tct-calendar-popover-padding, var(--t-calendar-popover-padding, var(--app-scale-1x, 5px)));--comp-min-table-width:calc(var(--comp-min-tappable-size-and-spacing) * 7);--comp-table-container-border-spacing:calc(var(--comp-table-border-spacing) * 2);--comp-popover-total-padding:calc(var(--comp-popover-padding) * 2);--tct-popover-min-width:calc(\n var(--comp-min-table-width) + var(--comp-table-container-border-spacing) + var(--comp-popover-total-padding)\n )}.calendar-field-popup{padding:var(--comp-popover-padding)}.calendar-label{--comp-label-padding:var(--tct-calendar-label-padding, var(--tct-calendar-label-vertical-padding, var(--t-calendar-label-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0);font-size:var(--tct-calendar-label-font-size, var(--t-calendar-label-font-size, 16px));flex:1 1;flex-basis:calc(100% - var(--tct-btn-icon-width, 44px));margin:0;padding:var(--comp-label-padding)}.cal-month-heading{padding:0 0 0.75rem;display:flex;justify-content:center;align-items:center;font-size:var(--tct-calendar-month-font-size, var(--t-calendar-month-font-size, 16px));font-weight:var(--tct-calendar-month-font-weight, var(--t-calendar-month-font-weight, 600));text-align:center}.cal-month-text{min-width:82px;display:inline-block}.cal-year-text{min-width:50px;display:inline-block}table{width:100%;margin-bottom:2px;text-align:center;border-spacing:var(--comp-table-border-spacing)}th{font-size:var(--tct-calendar-day-heading-font-size, var(--t-calendar-day-heading-font-size, inherit));font-weight:var(--tct-calendar-day-heading-font-weight, var(--t-calendar-day-heading-font-weight, 600));width:14.285714%}td{height:var(--comp-min-tappable-size);cursor:pointer;border:var(--tct-calendar-day-border, var(--t-calendar-day-border, 0));border-radius:var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))}td.is-unavailable{border:1px solid var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a))}td.is-valid:hover{border:var(--tct-calendar-day-hover-border, var(--t-calendar-day-hover-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-hover-border-radius, var(--t-calendar-day-hover-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background:var(--tct-calendar-day-hover-background, var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--app-gray14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2)))))));color:var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))}td[aria-hidden],td[aria-disabled]{pointer-events:none;cursor:not-allowed}td[aria-disabled]{opacity:var(--tct-calendar-day-disabled-opacity, var(--t-calendar-day-disabled-opacity, var(--app-disabled-opacity, 0.4)))}td[aria-selected]{border:var(--tct-calendar-day-selected-border, var(--t-calendar-day-selected-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-selected-border-radius, var(--t-calendar-day-selected-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background:var(--tct-calendar-day-selected-background, var(--tct-calendar-day-selected-bg, var(--t-calendar-day-selected-bg, var(--tct-calendar-day-hover-background, var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2))))))))));color:var(--tct-calendar-day-selected-font-color, var(--t-calendar-day-selected-font-color, var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))));box-shadow:0 0 0 2px var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))))}.today-decorator{text-transform:uppercase;font-weight:700;font-size:10px;height:12px}.calendar-disclaimer{font-size:var(--tct-calendar-disclaimer-font-size, var(--t-calendar-disclaimer-font-size, var(--tct-font-size-small, var(--app-font-size-small, 12px))));border-style:solid;border-width:var(--tct-calendar-disclaimer-border-width, var(--t-calendar-disclaimer-border-width, 1px 0 0 0));border-color:var(--tct-calendar-disclaimer-border-color, var(--t-calendar-disclaimer-border-color, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l3, var(--app-gray-l3, #e6e6e6))))));padding:var(--tct-calendar-disclaimer-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)));text-align:left}";const J=N;const Z=class{constructor(i){e(this,i);this.change=t(this,"change",7);this.error=t(this,"error",7);this.success=t(this,"success",7);this.formatModifier="M/D/YYYY";this.defaultFormatString="mm/dd/yyyy";this.scheduledAfterRender=[];this.dayAbbrStrings=V();this.dayStrings=z();this.monthStrings=C();this.closeCalendar=()=>{if(!this.open)return;this.open=false;this.focusInput()};this.openCalendar=()=>{if(this.readonly||this.open)return;this.selectedMonthYear=x(this.dateValue);this.dateList=this.buildDateList(this.selectedMonthYear);this.open=true};this.toggleCalendar=()=>{if(this.readonly)return;if(this.open){this.closeCalendar()}else{this.openCalendar()}};this.onClickElsewhere=e=>{const t=e.target;if(t.localName==="click-elsewhere"){e.stopPropagation();this.closeCalendar()}};this.onPopupKeyup=e=>{if(e.key==="Escape"||e.key==="Esc"){this.onInputBlur();this.closeCalendar()}};this.onInputInput=({detail:{value:e}})=>{this.typedValue=e};this.onInputKeydown=e=>{const{dateValue:t}=this;switch(e.key){case"ArrowDown":e.preventDefault();this.openCalendar();this.activateDay(t||new Date);break}};this.onInputKeyup=e=>{if(this.disabled){return}switch(e.key){case"Escape":this.onInputBlur();this.closeCalendar();break}if(!this.isTypeable)return;this.typedValue=I(this.typedValue);const{typedValue:t}=this;const i=q(this.daysOfWeekChecksum);const{isValid:n,message:s,messageType:r,inputDate:d,isAvailable:o,calendarPosition:l}=k(t,i,this.validDates,this.invalidDates,this.startDate,this.endDate,this.defaultFormatString,this.assume);if(l){const[e,t,i]=l;const n=new Date(`${i}-${e}-${t}`);if(a.isValid(n)){this.selectedMonthYear=x(n);this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}}if(e.key==="Enter"){if(n||t&&t.length>4&&d&&a.isValid(d)&&o){this.setCompleteInput(d)}else if(this.value){this.value=null;this.change.emit({value:null});this.typedValue=t}if(this.keyboardSelection){this.keyboardSelection=false;this.closeCalendar()}else{this.toggleCalendar()}}else{this.setHints({isValid:n,message:s,messageType:r})}};this.onInputChange=e=>{e.stopPropagation()};this.onInputBlur=()=>{if(!this.isTypeable)return;const e=q(this.daysOfWeekChecksum);const{typedValue:t}=this;const{isValid:i,inputDate:n,isAvailable:s}=k(this.typedValue,e,this.validDates,this.invalidDates,this.startDate,this.endDate,this.defaultFormatString,this.assume);if(!t&&(n===null||n===void 0?void 0:n.toString())==="Invalid Date"){this.setHints({isValid:true,message:this.defaultHintMessage,messageType:"info"})}else if(i||t&&t.length>4&&n&&a.isValid(n)&&s){this.setCompleteInput(n)}else if(this.value){this.value=null;this.change.emit({value:null});this.typedValue=t}};this.onInputFocus=e=>{if(!this.isTypeable)return;if(e.target===this.controlElement)this.closeCalendar()};this.onInputClick=()=>{if(this.disabled)return;this.toggleCalendar()};this.onRefocus=()=>{var e;(e=this.btnPrevMonth)===null||e===void 0?void 0:e.dispatchEvent(new FocusEvent("focus"))};this.goToMonthYear=(e,t)=>{if(e<0){e=11;t--}else if(e>11){e=0;t++}this.selectedMonthYear={monthIndex:e,selectedYear:t};this.dateList=this.buildDateList(this.selectedMonthYear);this.scheduledAfterRender.push((()=>this.checkActiveCellForBlankness()))};this.selectDate=e=>{const{isValid:t}=this.dateList.find((({date:t})=>a.isSameDay(t,e)));if(!t)return;this.change.emit({value:h(e)});this.typedValue=f(e);this.invalid=false};this.onDateSelection=e=>{const t=e.target.closest("td:not([aria-hidden])");if(!t)return;const i=w(new Date(t.dataset.date));this.selectDate(i);this.closeCalendar()};this.onHeaderControlKeydown=e=>{var t;const i=this.generateDateFromDay(1);const n=(t=this.calendarBody)===null||t===void 0?void 0:t.querySelector('[aria-selected="true"]');if(e.key==="Tab"&&!n){e.preventDefault();this.activateDay(i)}};this.onDateKeydown=e=>{const{monthIndex:t,selectedYear:i}=this.selectedMonthYear;const n=parseInt(e.target.dataset.day);const s=this.generateDateFromDay(n);switch(e.key){case"ArrowUp":e.preventDefault();this.activateDay(a.addDays(s,-7));break;case"ArrowDown":e.preventDefault();this.activateDay(a.addDays(s,7));break;case"ArrowRight":e.preventDefault();this.activateDay(a.addDays(s,1));break;case"ArrowLeft":e.preventDefault();this.activateDay(a.addDays(s,-1));break;case"PageUp":e.preventDefault();if(e.shiftKey)this.goToMonthYear(t,i-1);else this.goToMonthYear(t-1,i);break;case"PageDown":e.preventDefault();if(e.shiftKey)this.goToMonthYear(t,i+1);else this.goToMonthYear(t+1,i);break;case"Home":e.preventDefault();this.activateDay(a.addDays(s,-s.getDay()));break;case"End":e.preventDefault();this.activateDay(a.addDays(s,6-s.getDay()));break;case"Escape":e.preventDefault();this.closeCalendar();this.focusInput();break;case"Enter":e.preventDefault();if(!this.dateList.find((({date:e})=>a.isSameDay(e,s))).isValid)return;this.selectDate(s);this.closeCalendar();this.focusInput();break;case" ":e.preventDefault();if(!this.dateList.find((({date:e})=>a.isSameDay(e,s))).isValid)return;this.selectDate(s);this.focusInput();break}};this.assume="current";this.calendarLabel=undefined;this.clearable=undefined;this.cutoffTime=undefined;this.daysOfWeekChecksum=undefined;this.disabled=undefined;this.disabledMsg=undefined;this.disclaimer=undefined;this.displayFormat=undefined;this.endDate=undefined;this.errors=undefined;this.hideLabel=undefined;this.hints=undefined;this.invalid=undefined;this.invalidDates=undefined;this.label=undefined;this.open=undefined;this.optional=undefined;this.placeholder=undefined;this.popoverAlignment=undefined;this.popoverDirection=undefined;this.popoverMinHeight=355;this.readonly=undefined;this.startDate=undefined;this.typeable=undefined;this.validDates=undefined;this.value=undefined;this.popDirection=undefined;this.onsuccess=undefined;this.buttonLabel=undefined;this.ariaLabel=undefined;this.keyboardSelection=false;this.typedValue="";this.dateList=undefined;this.hintMessage=this.defaultHintMessage;this.hintMessageType="info"}connectedCallback(){this.selectedMonthYear=x(this.dateValue);this.dateList=this.buildDateList(this.selectedMonthYear);if(this.value&&this.isTypeable&&!this.typedValue){this.typedValue=A(this.value)}this.validateDate()}componentWillLoad(){this.popDirectionHandler();r(this)}componentDidRender(){setTimeout((()=>{this.scheduledAfterRender.forEach((e=>e()));this.scheduledAfterRender=[]}),25)}componentDidLoad(){d(this.hostElement)}get selectedDate(){var e;const t=(e=this.calendarBody)===null||e===void 0?void 0:e.querySelector('[aria-selected="true"]');return t?w(new Date(t.dataset.date)):null}get innerInputField(){var e,t;return(t=(e=this.controlElement)===null||e===void 0?void 0:e.shadowRoot)===null||t===void 0?void 0:t.querySelector(".input-field")}get innerInputContainer(){var e,t;return(t=(e=this.controlElement)===null||e===void 0?void 0:e.shadowRoot)===null||t===void 0?void 0:t.querySelector(".input-container")}get defaultHintMessage(){return this.typeable?s("tecton.element.calendar.hint.format")+": "+this.defaultFormatString:s("tecton.element.calendar.hint.select")}get canClear(){if(this.isTypeable){return this.clearable&&!!this.typedValue}else{return this.clearable&&!!this.value}}get currentWeeks(){const e=this.dateList.reduce(((e,t,i)=>{const n=Math.floor(i/7);if(!e[n]){e[n]=[]}e[n].push(t);return e}),[]);return e}get formattedValue(){const{typedValue:e,dateValue:t,displayFormat:i,isTypeable:n}=this;if(n)return e;if(t===undefined)return"";if(i)return a.format(t,y(i));return new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}).format(t)}get computedPlaceholder(){if(this.disabled&&this.disabledMsg){return s(this.disabledMsg)}if(this.buttonLabel&&(this.disabled||this.placeholder)){return s(this.buttonLabel)}return this.placeholder&&s(this.placeholder)||""}get dateValue(){if(this.isTypeable){return g(this.typedValue)}else{let{value:e}=this;const t=e&&typeof e!=="string"&&"toDate"in e;if(t)return e.toDate();const i=typeof e==="string"&&e.split(" ").length===6&&/GMT-\d{4}/g.test(e);if(i){e=h(e)}return g(e)}}get dateValidators(){const e=new Date(this.cutoffTime||"");return{startDate:g(this.startDate),endDate:g(this.endDate),cutOffTime:a.isValid(e)?e:undefined}}get isTypeable(){return this.typeable}get errorList(){const{errors:e,hintMessageType:t,hintMessage:i,invalid:n}=this;if(Array.isArray(e)&&e.length)return e.filter((e=>!!e)).map((e=>s(e)));if(t==="error"&&i)return[i];if(n)return["tecton.element.calendar.invalid"];return[]}get hintList(){const{hints:e,hintMessageType:t,hintMessage:i}=this;if(Array.isArray(e)&&e.length)return e.filter((e=>!!e)).map((e=>s(e)));if(t==="info"&&i)return[i];return[]}defaultChangeHandler(e){if(e.target===this.hostElement&&!this.hostElement.onchange&&!!e.detail){this.value=e.detail.value}}defaultErrorHandler(e){if(e.target===this.hostElement&&!this.hostElement.onerror){const{errors:e}=this;if(Array.isArray(e)&&e.includes("tecton.element.calendar.hint.invalidDate")){return}this.errors=(e||[]).concat(["tecton.element.calendar.hint.invalidDate"])}}defaultSuccessHandler(e){if(e.target!==this.hostElement){return}if(typeof this.onsuccess==="function"){this.onsuccess(e)}else{const{errors:e}=this;if(Array.isArray(e)&&e.includes("tecton.element.calendar.hint.invalidDate")){this.errors=e.filter((e=>e!=="tecton.element.calendar.hint.invalidDate"))}}}delegateFocus(e){if(!o(e,this.hostElement))return;this.controlElement.shadowRoot.querySelector(".input-field").focus()}handleClear(){this.change.emit({value:null});this.value=null;this.typedValue=""}popoverStateHandler({detail:{open:e}}){if(this.open!==e)this.open=e}_togglePopover(){const e=this.typeable?this.btnCalendarToggle:this.innerInputField;e===null||e===void 0?void 0:e.click();e===null||e===void 0?void 0:e.focus();e.dispatchEvent(new FocusEvent("focus"))}openPopover(){if(this.open)return;this._togglePopover()}closePopover(){if(!this.open)return;this._togglePopover()}async setValue(e){var t;const i=typeof e==="string"?g(e):e;if(!a.isValid(i))return;await this.openPopover();await l();this.goToMonthYear(i.getMonth(),i.getFullYear());await l();const n=(t=this.calendarTable)===null||t===void 0?void 0:t.querySelector(`td[data-date="${h(i)}"]`);n===null||n===void 0?void 0:n.click()}async typeValue(e){if(!this.typeable)return;const t=typeof e==="string"?g(e):e;const i=f(t);if(!a.isValid(t))return;const{innerInputField:n,controlElement:s}=this;n.focus();n.dispatchEvent(new FocusEvent("focus"));n.value=i;n.dispatchEvent(new InputEvent("input"));s.dispatchEvent(new KeyboardEvent("keyup"))}popDirectionHandler(){c(this,"popDirection","popoverDirection")}ariaLabelObserver(){r(this)}typeableChanged(){this.valueObserver(this.value)}valueObserver(e){if(e===""){this.value=undefined;this.setHints({isValid:true,message:this.defaultHintMessage,messageType:"info"});return}const t=e&&typeof e!=="string"&&"toDate"in e;const i=t?e.toDate():g(e);const n=f(i);if(this.isTypeable){this.typedValue=n}else{this.controlElement.value=n;this.selectedMonthYear=x(i);this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}if(this.invalid)return;if(n){this.setHints({isValid:true,message:null,messageType:null})}else{this.setHints({isValid:true,message:this.defaultHintMessage,messageType:"info"})}}daysOfWeekChecksumObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}validDatesObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}invalidDatesObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}startDateObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}endDateObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}cutoffTimeObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}buildDateList(e){const t=D(this.invalidDates);const i=q(this.daysOfWeekChecksum);const n=D(this.validDates);return F(i,n,t,e,this.dateValue,this.dateValidators,this.typedValue)}validateDate(){var e,t,i;try{if(!!this.value){const{dateValue:n}=this;const a=(e=n===null||n===void 0?void 0:n.getMonth())!==null&&e!==void 0?e:undefined;const s=(t=n===null||n===void 0?void 0:n.getFullYear())!==null&&t!==void 0?t:undefined;const{monthIndex:r,selectedYear:d}=this.selectedMonthYear;const o=a===r&&s===d;let l=[];if(!n){l=[]}else if(o){l=this.dateList}else{l=this.buildDateList({monthIndex:a,selectedYear:s})}const c=(i=n===null||n===void 0?void 0:n.getDate())!==null&&i!==void 0?i:undefined;const u=c?!l.find((({integer:e})=>e===c)).isValid:true;if(u){this.error.emit({errors:[{message:`Value passed is invalid: The date ${this.value} is not valid`,errorCode:"generalInvalid"}]})}else{this.success.emit({value:h(n)})}}}catch(e){console.warn("Invalid moment value ",this.dateValue)}}focusInput(){var e;(e=this.controlElement)===null||e===void 0?void 0:e.focus()}checkActiveCellForBlankness(){const e=this.hostElement.shadowRoot.activeElement;if(!e||e.tagName!=="TD"||!e.hasAttribute("aria-hidden"))return;const{calendarBody:t}=this;const i=Array.from(t.querySelectorAll("td"));const n=Array.from(i).indexOf(e);const a=n<15?1:i.filter((e=>!e.hasAttribute("aria-hidden"))).length;this.focusDay(this.generateDateFromDay(a))}generateDateFromDay(e){const{monthIndex:t,selectedYear:i}=this.selectedMonthYear;return new Date(i,t,e)}activateDay(e){this.goToMonthYear(e.getMonth(),e.getFullYear());this.scheduledAfterRender.push((()=>this.focusDay(e)))}async focusDay(e){var t;if(!e)return;await l();(t=this.calendarBody.querySelector(`td[data-day="${e.getDate()}"]`))===null||t===void 0?void 0:t.focus()}render(){return i("click-elsewhere",{key:"3ca2257bb2303adcff179f3c2371e65a0eb94bee",class:this.open?"dropdown-open":undefined,onChange:this.onClickElsewhere},this.inputField(),i("q2-popover",{key:"cd24cef9cdc295c5de9a82d29eff09f2b40b9ab0",ref:e=>this.popoverElement=e,controlElement:this.innerInputContainer,open:this.open,direction:this.popoverDirection,minHeight:this.popoverMinHeight,align:this.popoverAlignment,block:true},this.hintField(),this.calendarPopover()))}hintField(){if(!this.hintMessage)return;return i("q2-message",{class:"calendar-hint sr",ref:e=>this.hintMessageElement=e,type:this.hintMessageType},this.hintMessage)}setHints({isValid:e,message:t,messageType:i}){var n;if(t===this.hintMessage)return(n=this.hintMessageElement)===null||n===void 0?void 0:n.present();this.invalid=!e;this.hintMessage=t;this.hintMessageType=i}setCompleteInput(e){const t=f(e);this.change.emit({value:h(e)});this.typedValue=t;this.setHints({isValid:true,message:null,messageType:null})}inputField(){const{isTypeable:e}=this;return i("q2-input",{ref:e=>this.controlElement=e,class:"calendar-input-field",value:this.formattedValue,label:s(this.label),hideLabel:this.hideLabel,disabled:!!this.disabled,readonly:!!this.readonly,clearable:this.canClear,placeholder:this.computedPlaceholder,optional:!!this.optional,ariaExpanded:`${!!this.open}`,hints:this.hintList,errors:this.errorList,onClick:e?undefined:this.onInputClick,onChange:this.onInputChange,onInput:this.onInputInput,onKeyDown:this.onInputKeydown,onKeyUp:this.onInputKeyup,onBlur:this.onInputBlur,onFocus:this.onInputFocus,"icon-right":e?undefined:"calendar","format-modifier":e?this.formatModifier:this.displayFormat||this.formatModifier,pseudo:!e,type:"date","hide-messages":!e,"test-id":"inputAndCalendarToggle"},e&&i("q2-btn",{ref:e=>this.btnCalendarToggle=e,slot:"input-right",onClick:this.onInputClick,"test-id":"calendarToggle",label:"tecton.element.calendar.toggleAriaLabel","hide-label":true},i("q2-icon",{type:"calendar"})))}calendarPopover(){const{monthIndex:e,selectedYear:t}=this.selectedMonthYear;return i("div",{class:"calendar-field-popup",onKeyUp:this.onPopupKeyup},this.calendarLabel&&i("p",{class:"calendar-label"},s(this.calendarLabel)),i("div",{class:"cal-month-heading"},i("q2-btn",{label:s("tecton.element.calendar.previousMonth"),"hide-label":true,ref:e=>this.btnPrevMonth=e,class:"cal-nav-btn prev-month","test-id":"previousMonthButton",onClick:()=>this.goToMonthYear(e-1,t)},i("q2-icon",{type:"chevron-left"})),i("span",{class:"cal-month-text"},this.monthStrings[e]),i("q2-btn",{label:s("tecton.element.calendar.nextMonth"),"hide-label":true,class:"cal-nav-btn next-month",ref:e=>this.btnNextMonth=e,"test-id":"nextMonthButton",onClick:()=>this.goToMonthYear(e+1,t)},i("q2-icon",{type:"chevron-right"})),i("q2-btn",{label:s("tecton.element.calendar.previousYear"),"hide-label":true,class:"cal-nav-btn prev-year",ref:e=>this.btnPrevYear=e,"test-id":"previousYearButton",onClick:()=>this.goToMonthYear(e,t-1)},i("q2-icon",{type:"chevron-left"})),i("span",{class:"cal-year-text"},this.selectedMonthYear.selectedYear),i("q2-btn",{label:s("tecton.element.calendar.nextYear"),"hide-label":true,class:"cal-nav-btn next-year",ref:e=>this.btnNextYear=e,"test-id":"nextYearButton",onClick:()=>this.goToMonthYear(e,t+1),onKeyDown:this.onHeaderControlKeydown},i("q2-icon",{type:"chevron-right"}))),i("div",{class:"sr","aria-live":"polite",id:"table-label"},`${this.monthStrings[e]} ${t}`),this.calendarDays(),this.disclaimer&&i("div",{class:"calendar-disclaimer"},s(this.disclaimer)),i("q2-btn",{class:"sr refocus-popup",onFocus:this.onRefocus}))}calendarDays(){return i("table",{role:"grid","aria-labelledby":"table-label",ref:e=>this.calendarTable=e},i("thead",null,i("tr",null,[...Array(7).keys()].map((e=>i("th",{scope:"col","aria-label":this.dayStrings[e]},this.dayAbbrStrings[e]))))),i("tbody",{onClick:this.onDateSelection,onKeyDown:this.onDateKeydown,ref:e=>this.calendarBody=e,"test-id":"calendarTableBody"},this.currentWeeks.map((e=>i("tr",null,e.map((e=>{var t;let n="";if(e.isToday)n=`${s("tecton.element.calendar.today")}, `;n+=m(e.date);if(e.isSelected)n+=` (${s("tecton.element.calendar.selected")})`;return i("td",{class:e.classList,"aria-hidden":e.isEmpty?"true":undefined,tabindex:e.isSelected?0:-1,role:e.isSelected?"gridcell":undefined,"aria-selected":e.isSelected?"true":undefined,"aria-disabled":e.isValid?undefined:"true","data-day":e.integer||undefined,"data-date":e.date?h(e.date):undefined},(e===null||e===void 0?void 0:e.isToday)&&i("div",{class:"today-decorator","aria-hidden":"true"},s("tecton.element.calendar.today")),i("div",{"aria-label":n},(t=e===null||e===void 0?void 0:e.integer)!==null&&t!==void 0?t:""))})))))))}get hostElement(){return n(this)}static get watchers(){return{popDirection:["popDirectionHandler"],ariaLabel:["ariaLabelObserver"],typeable:["typeableChanged"],value:["valueObserver"],daysOfWeekChecksum:["daysOfWeekChecksumObserver"],validDates:["validDatesObserver"],invalidDates:["invalidDatesObserver"],startDate:["startDateObserver"],endDate:["endDateObserver"],cutoffTime:["cutoffTimeObserver"]}}};Z.style=J;export{Z as q2_calendar};
2
- //# sourceMappingURL=p-9889cdb8.entry.js.map
1
+ import{r as e,c as t,h as i,g as n}from"./p-8013d83b.js";import{d as a}from"./p-04978763.js";import{l as s,h as r,o as d,i as o,w as l,a as c}from"./p-38dda948.js";function h(e){const t=new Date(e);if(!a.isValid(t))return;return a.formatISO(t,{representation:"date"})}let u;function f(e){const t=new Date(e);if(!a.isValid(t))return;const i=t.toISOString();if(!u){u=new Intl.DateTimeFormat("en-US",{month:"2-digit",day:"2-digit",year:"numeric",timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}return u.format(new Date(i))}let v;function p(e){const t=new Date(e);if(!a.isValid(t))return;if(!v){v=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"})}return v.format(t)}let b;function m(e){if(!e)return;const t=new Date(e);if(!a.isValid(t))return;if(!b){b=new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric",weekday:"long",timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}return b.format(t)}function y(e){return e.replace(/[d]/g,"E").replace(/[D]/g,"d").replace(/[Y]/g,"y").replace(/[l]/g,"P").replace(/[W]/g,"I")}function g(e){const t=typeof e==="string";if(!t&&e&&a.isValid(new Date(e||undefined))){e=h(e)}else if(!e||!a.isValid(new Date(e))){return undefined}let i;const n=e.split(/[\/\-]/).map((e=>e.padStart(2,"0")));const s=t&&e.length>=24&&e[10]==="T";const r=n.length===3;const d=n.length<3;if(s){e=e.split("T")[0];i=new Date(e)}else if(r){const t=e.includes("/")&&n[2].length===4;if(t)n.unshift(n.pop());i=new Date(n.join("-"))}else if(d){const e=new Date;let t;let a;let s;switch(n.length){case 1:t=e.getFullYear();a=n[0];s="01";break;case 2:t=e.getFullYear();a=n[0];s=n[1];break}i=new Date(`${t}-${a}-${s}`)}if(!a.isValid(i))return undefined;i=w(i);return a.isValid(i)?i:undefined}function w(e){const t=e.getTimezoneOffset();return a.setMinutes(e,t+Math.abs(t%60))}function D(e){if(!Array.isArray(e)||e.length===0){return[]}return e.map((e=>g(e)))}function x(e=new Date){return{monthIndex:e.getMonth(),selectedYear:e.getFullYear()}}function k(e="",t=[],i=[],n=[],r,d,o="mm/dd/yyyy",l){let c=true;let u=false;let f="info";let v=`${s("tecton.element.calendar.hint.format")}: ${o}`;if(!e){return{isValid:c,inputDate:new Date(""),isAvailable:u,messageType:f,message:v}}const b=$(e,l);const m=b.getMonth()+1;const y=b.getDate();const g=b.getFullYear();const w=[m,y,g];if(a.isValid(b)){const a=C()[b.getMonth()];if(e.length===10){c=true;f=null;v=null}u=t.includes(b.getDay());const l=h(b);if(u){const e=i.length&&!i.includes(l);const t=n.length&&n.includes(l);const a=r&&r>l;const s=d&&d<l;if(e||t||a||s){u=false}}if(e.length>=5&&!u){c=false;f="error";const e=!a||!y||!g;v=e?`${s("tecton.element.calendar.hint.invalidDate")}: ${o}`:s("tecton.element.calendar.hint.notAvailableDate",[p(b)])}}else{c=false;f="error";v=`${s("tecton.element.calendar.hint.invalidDate")}: ${o}`}return{isValid:c,messageType:f,message:v,inputDate:b,isAvailable:u,calendarPosition:w}}function $(e,t){const i=new Date;let[n,a,s]=e.split("/");if(n==="0")n="01";if(a==="0")a="01";if(e.length===10){return new Date(e)}else if(n&&a&&Number(a)>0){const e=Number(a)<10?`0${Number(a)}`:a;const i=!s||s.length<4?T(n,a,t):s;return new Date(`${n}/${e}/${i}`)}else if(n){return new Date(`${n}/01/${i.getFullYear()}`)}}function T(e,t,i){const n=`${e}/${t}`;const a=new Date;const s=a.getMonth()<9?`0${a.getMonth()+1}`:`${a.getMonth()+1}`;const r=a.getDate()<10?`0${a.getDate()}`:`${a.getDate()}`;const d=`${s}/${r}/${a.getFullYear()}`;let o=a.getFullYear();if(i==="future"&&d.slice(0,5)>n){o=a.getFullYear()+1}else if(i==="past"&&d.slice(0,5)<n){o=a.getFullYear()-1}return o.toString()}function I(e){if(!e){return""}if(e.match(/^[1-9]\/$/)){return`0${e}/`}else if(e.match(/^[0-9]{2}\/[1-9]{1}\/$/)){const t=e.split("/");return`${t[0]}/0${t[1]}/`}return e}function A(e){const t=(e||"").split("-");if(t.length!==3)return"";return`${t[1]}/${t[2]}/${t[0]}`}function O(e,t){return new Date(t,e,1,1,1,1,1).getDay()}function V(){return[s("tecton.element.calendar.days.short.Sunday"),s("tecton.element.calendar.days.short.Monday"),s("tecton.element.calendar.days.short.Tuesday"),s("tecton.element.calendar.days.short.Wednesday"),s("tecton.element.calendar.days.short.Thursday"),s("tecton.element.calendar.days.short.Friday"),s("tecton.element.calendar.days.short.Saturday")]}function z(){return[s("tecton.element.calendar.days.Sunday"),s("tecton.element.calendar.days.Monday"),s("tecton.element.calendar.days.Tuesday"),s("tecton.element.calendar.days.Wednesday"),s("tecton.element.calendar.days.Thursday"),s("tecton.element.calendar.days.Friday"),s("tecton.element.calendar.days.Saturday")]}function C(){return[s("tecton.element.calendar.months.January"),s("tecton.element.calendar.months.February"),s("tecton.element.calendar.months.March"),s("tecton.element.calendar.months.April"),s("tecton.element.calendar.months.May"),s("tecton.element.calendar.months.June"),s("tecton.element.calendar.months.July"),s("tecton.element.calendar.months.August"),s("tecton.element.calendar.months.September"),s("tecton.element.calendar.months.October"),s("tecton.element.calendar.months.November"),s("tecton.element.calendar.months.December")]}function E(e,t){const i=a.getDaysInMonth(new Date(t,e));return[...Array(i).keys()].reduce(((i,n)=>{i.push(new Date(t,e,n+1));return i}),[])}function q(e=127){const t=e&1;const i=e&2;const n=e&4;const a=e&8;const s=e&16;const r=e&32;const d=e&64;const o=[];if(e<=0)return o;if(t)o.push(0);if(i)o.push(1);if(n)o.push(2);if(a)o.push(3);if(s)o.push(4);if(r)o.push(5);if(d)o.push(6);return o}function M(e,t){return e.includes(t.getDay())}function S(e,t){return!Y(e,t)}function Y(e,t){return e.some((e=>a.isSameDay(e,t)))}function F(e,t,i,n,a,s,r){const d=[H.bind(null,s,new Date)];if(t===null||t===void 0?void 0:t.length){d.push(Y.bind(null,t))}else{d.push(M.bind(null,e))}d.push(S.bind(null,i));return L(n,a,s,d,r)}function L({monthIndex:e,selectedYear:t},i,n,s,r){const d=!a.isValid(new Date(r));const o=E(e,t).map(((e,t)=>{const a=s.some((t=>!t(e)));const r=P(e,n,i);const o=j(Object.assign(Object.assign({},r),{isInvalid:a,isIncompleteDate:d}));return Object.assign(Object.assign({},r),{isValid:!a,date:e,integer:t+1,isEmpty:false,isActivity:false,classList:o})}));const l=B(O(e,t));const c=U((l.length+o.length)%7);return[...l,...o,...c]}function H(e,t,i){const n=a.isAfter(e===null||e===void 0?void 0:e.startDate,i);const s=a.isBefore(e===null||e===void 0?void 0:e.endDate,i);const r=a.isSameDay(t,i)&&a.isAfter(t,e===null||e===void 0?void 0:e.cutOffTime);return!(n||r||s)}function P(e,t,i){if(!i)i=new Date;const n=i&&a.isSameDay(i,e);const s=a.isSameDay(e,new Date);const r=a.isSameDay(e,t===null||t===void 0?void 0:t.startDate);const d=a.isSameDay(e,t===null||t===void 0?void 0:t.endDate);return{isSelected:n,isToday:s,isStartDate:r,isEndDate:d}}function j({isInvalid:e,isSelected:t,isEndDate:i,isStartDate:n,isToday:a,isIncompleteDate:s}){const r=[];if(!e)r.push("is-valid");if(t)r.push("is-selected");if(i)r.push("is-end-date");if(n)r.push("is-start-date");if(a)r.push("is-today");if(t&&e&&!s)r.push("is-unavailable");return r.join(" ")}function B(e){return K(0,e)}function U(e){if(e===0)return[];return K(e,7)}const W={date:null,integer:null,isActivity:false,isEmpty:true,isValid:false,isToday:false,isSelected:false,isStartDate:false,isEndDate:false,classList:""};function K(e,t){if(e===7)e=0;return[...Array(t-e).keys()].map((()=>Object.assign({},W)))}const N="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}:host[hidden]{display:none}click-elsewhere{position:relative;display:block}q2-input{margin:0;cursor:pointer}q2-popover{--comp-min-tappable-size:44px;--comp-table-border-spacing:2px;--comp-min-tappable-size-and-spacing:calc(var(--comp-min-tappable-size) + var(--comp-table-border-spacing));--comp-popover-padding:var(--tct-calendar-popover-padding, var(--t-calendar-popover-padding, var(--app-scale-1x, 5px)));--comp-min-table-width:calc(var(--comp-min-tappable-size-and-spacing) * 7);--comp-table-container-border-spacing:calc(var(--comp-table-border-spacing) * 2);--comp-popover-total-padding:calc(var(--comp-popover-padding) * 2);--tct-popover-min-width:calc(\n var(--comp-min-table-width) + var(--comp-table-container-border-spacing) + var(--comp-popover-total-padding)\n )}.calendar-field-popup{padding:var(--comp-popover-padding)}.calendar-label{--comp-label-padding:var(--tct-calendar-label-padding, var(--tct-calendar-label-vertical-padding, var(--t-calendar-label-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0);font-size:var(--tct-calendar-label-font-size, var(--t-calendar-label-font-size, 16px));flex:1 1;flex-basis:calc(100% - var(--tct-btn-icon-width, 44px));margin:0;padding:var(--comp-label-padding)}.cal-month-heading{padding:0 0 0.75rem;display:flex;justify-content:center;align-items:center;font-size:var(--tct-calendar-month-font-size, var(--t-calendar-month-font-size, 16px));font-weight:var(--tct-calendar-month-font-weight, var(--t-calendar-month-font-weight, 600));text-align:center}.cal-month-text{min-width:82px;display:inline-block}.cal-year-text{min-width:50px;display:inline-block}table{width:100%;margin-bottom:2px;text-align:center;border-spacing:var(--comp-table-border-spacing)}th{font-size:var(--tct-calendar-day-heading-font-size, var(--t-calendar-day-heading-font-size, inherit));font-weight:var(--tct-calendar-day-heading-font-weight, var(--t-calendar-day-heading-font-weight, 600));width:14.285714%}td{height:var(--comp-min-tappable-size);cursor:pointer;border:var(--tct-calendar-day-border, var(--t-calendar-day-border, 0));border-radius:var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))}td.is-unavailable{border:1px solid var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a))}td.is-valid:hover{border:var(--tct-calendar-day-hover-border, var(--t-calendar-day-hover-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-hover-border-radius, var(--t-calendar-day-hover-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background:var(--tct-calendar-day-hover-background, var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--app-gray14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2)))))));color:var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))}td[aria-hidden],td[aria-disabled]{pointer-events:none;cursor:not-allowed}td[aria-disabled]{opacity:var(--tct-calendar-day-disabled-opacity, var(--t-calendar-day-disabled-opacity, var(--app-disabled-opacity, 0.4)))}td[aria-selected]{border:var(--tct-calendar-day-selected-border, var(--t-calendar-day-selected-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-selected-border-radius, var(--t-calendar-day-selected-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background:var(--tct-calendar-day-selected-background, var(--tct-calendar-day-selected-bg, var(--t-calendar-day-selected-bg, var(--tct-calendar-day-hover-background, var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2))))))))));color:var(--tct-calendar-day-selected-font-color, var(--t-calendar-day-selected-font-color, var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))));box-shadow:0 0 0 2px var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))))}.today-decorator{text-transform:uppercase;font-weight:700;font-size:10px;height:12px}.calendar-disclaimer{font-size:var(--tct-calendar-disclaimer-font-size, var(--t-calendar-disclaimer-font-size, var(--tct-font-size-small, var(--app-font-size-small, 12px))));border-style:solid;border-width:var(--tct-calendar-disclaimer-border-width, var(--t-calendar-disclaimer-border-width, 1px 0 0 0));border-color:var(--tct-calendar-disclaimer-border-color, var(--t-calendar-disclaimer-border-color, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l3, var(--app-gray-l3, #e6e6e6))))));padding:var(--tct-calendar-disclaimer-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)));text-align:left}";const J=N;const Z=class{constructor(i){e(this,i);this.change=t(this,"change",7);this.error=t(this,"error",7);this.success=t(this,"success",7);this.formatModifier="M/D/YYYY";this.defaultFormatString="mm/dd/yyyy";this.scheduledAfterRender=[];this.dayAbbrStrings=V();this.dayStrings=z();this.monthStrings=C();this.closeCalendar=()=>{if(!this.open)return;this.open=false;this.focusInput()};this.openCalendar=()=>{if(this.readonly||this.open)return;this.selectedMonthYear=x(this.dateValue);this.dateList=this.buildDateList(this.selectedMonthYear);this.open=true};this.toggleCalendar=()=>{if(this.readonly)return;if(this.open){this.closeCalendar()}else{this.openCalendar()}};this.onClickElsewhere=e=>{const t=e.target;if(t.localName==="click-elsewhere"){e.stopPropagation();this.closeCalendar()}};this.onPopupKeyup=e=>{if(e.key==="Escape"||e.key==="Esc"){this.onInputBlur();this.closeCalendar()}};this.onInputInput=({detail:{value:e}})=>{this.typedValue=e};this.onInputKeydown=e=>{const{dateValue:t}=this;switch(e.key){case"ArrowDown":e.preventDefault();this.openCalendar();this.activateDay(t||new Date);break}};this.onInputKeyup=e=>{if(this.disabled){return}switch(e.key){case"Escape":this.onInputBlur();this.closeCalendar();break}if(!this.isTypeable)return;this.typedValue=I(this.typedValue);const{typedValue:t}=this;const i=q(this.daysOfWeekChecksum);const{isValid:n,message:s,messageType:r,inputDate:d,isAvailable:o,calendarPosition:l}=k(t,i,this.validDates,this.invalidDates,this.startDate,this.endDate,this.defaultFormatString,this.assume);if(l){const[e,t,i]=l;const n=new Date(`${i}-${e}-${t}`);if(a.isValid(n)){this.selectedMonthYear=x(n);this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}}if(e.key==="Enter"){if(n||t&&t.length>4&&d&&a.isValid(d)&&o){this.setCompleteInput(d)}else if(this.value){this.value=null;this.change.emit({value:null});this.typedValue=t}if(this.keyboardSelection){this.keyboardSelection=false;this.closeCalendar()}else{this.toggleCalendar()}}else{this.setHints({isValid:n,message:s,messageType:r})}};this.onInputChange=e=>{e.stopPropagation()};this.onInputBlur=()=>{if(!this.isTypeable)return;const e=q(this.daysOfWeekChecksum);const{typedValue:t}=this;const{isValid:i,inputDate:n,isAvailable:s}=k(this.typedValue,e,this.validDates,this.invalidDates,this.startDate,this.endDate,this.defaultFormatString,this.assume);if(!t&&(n===null||n===void 0?void 0:n.toString())==="Invalid Date"){this.setHints({isValid:true,message:this.defaultHintMessage,messageType:"info"})}else if(i||t&&t.length>4&&n&&a.isValid(n)&&s){this.setCompleteInput(n)}else if(this.value){this.value=null;this.change.emit({value:null});this.typedValue=t}};this.onInputFocus=e=>{if(!this.isTypeable)return;if(e.target===this.controlElement)this.closeCalendar()};this.onInputClick=()=>{if(this.disabled)return;this.toggleCalendar()};this.onRefocus=()=>{var e;(e=this.btnPrevMonth)===null||e===void 0?void 0:e.dispatchEvent(new FocusEvent("focus"))};this.goToMonthYear=(e,t)=>{if(e<0){e=11;t--}else if(e>11){e=0;t++}this.selectedMonthYear={monthIndex:e,selectedYear:t};this.dateList=this.buildDateList(this.selectedMonthYear);this.scheduledAfterRender.push((()=>this.checkActiveCellForBlankness()))};this.selectDate=e=>{const{isValid:t}=this.dateList.find((({date:t})=>a.isSameDay(t,e)));if(!t)return;this.change.emit({value:h(e)});this.typedValue=f(e);this.invalid=false};this.onDateSelection=e=>{const t=e.target.closest("td:not([aria-hidden])");if(!t)return;const i=w(new Date(t.dataset.date));this.selectDate(i);this.closeCalendar()};this.onHeaderControlKeydown=e=>{var t;const i=this.generateDateFromDay(1);const n=(t=this.calendarBody)===null||t===void 0?void 0:t.querySelector('[aria-selected="true"]');if(e.key==="Tab"&&!n){e.preventDefault();this.activateDay(i)}};this.onDateKeydown=e=>{const{monthIndex:t,selectedYear:i}=this.selectedMonthYear;const n=parseInt(e.target.dataset.day);const s=this.generateDateFromDay(n);switch(e.key){case"ArrowUp":e.preventDefault();this.activateDay(a.addDays(s,-7));break;case"ArrowDown":e.preventDefault();this.activateDay(a.addDays(s,7));break;case"ArrowRight":e.preventDefault();this.activateDay(a.addDays(s,1));break;case"ArrowLeft":e.preventDefault();this.activateDay(a.addDays(s,-1));break;case"PageUp":e.preventDefault();if(e.shiftKey)this.goToMonthYear(t,i-1);else this.goToMonthYear(t-1,i);break;case"PageDown":e.preventDefault();if(e.shiftKey)this.goToMonthYear(t,i+1);else this.goToMonthYear(t+1,i);break;case"Home":e.preventDefault();this.activateDay(a.addDays(s,-s.getDay()));break;case"End":e.preventDefault();this.activateDay(a.addDays(s,6-s.getDay()));break;case"Escape":e.preventDefault();this.closeCalendar();this.focusInput();break;case"Enter":e.preventDefault();if(!this.dateList.find((({date:e})=>a.isSameDay(e,s))).isValid)return;this.selectDate(s);this.closeCalendar();this.focusInput();break;case" ":e.preventDefault();if(!this.dateList.find((({date:e})=>a.isSameDay(e,s))).isValid)return;this.selectDate(s);this.focusInput();break}};this.assume="current";this.calendarLabel=undefined;this.clearable=undefined;this.cutoffTime=undefined;this.daysOfWeekChecksum=undefined;this.disabled=undefined;this.disabledMsg=undefined;this.disclaimer=undefined;this.displayFormat=undefined;this.endDate=undefined;this.errors=undefined;this.hideLabel=undefined;this.hints=undefined;this.invalid=undefined;this.invalidDates=undefined;this.label=undefined;this.open=undefined;this.optional=undefined;this.placeholder=undefined;this.popoverAlignment=undefined;this.popoverDirection=undefined;this.popoverMinHeight=355;this.readonly=undefined;this.startDate=undefined;this.typeable=undefined;this.validDates=undefined;this.value=undefined;this.popDirection=undefined;this.onsuccess=undefined;this.buttonLabel=undefined;this.ariaLabel=undefined;this.keyboardSelection=false;this.typedValue="";this.dateList=undefined;this.hintMessage=this.defaultHintMessage;this.hintMessageType="info"}connectedCallback(){this.selectedMonthYear=x(this.dateValue);this.dateList=this.buildDateList(this.selectedMonthYear);if(this.value&&this.isTypeable&&!this.typedValue){this.typedValue=A(this.value)}this.validateDate()}componentWillLoad(){this.popDirectionHandler();r(this)}componentDidRender(){setTimeout((()=>{this.scheduledAfterRender.forEach((e=>e()));this.scheduledAfterRender=[]}),25)}componentDidLoad(){d(this.hostElement)}get selectedDate(){var e;const t=(e=this.calendarBody)===null||e===void 0?void 0:e.querySelector('[aria-selected="true"]');return t?w(new Date(t.dataset.date)):null}get innerInputField(){var e,t;return(t=(e=this.controlElement)===null||e===void 0?void 0:e.shadowRoot)===null||t===void 0?void 0:t.querySelector(".input-field")}get innerInputContainer(){var e,t;return(t=(e=this.controlElement)===null||e===void 0?void 0:e.shadowRoot)===null||t===void 0?void 0:t.querySelector(".input-container")}get defaultHintMessage(){return this.typeable?s("tecton.element.calendar.hint.format")+": "+this.defaultFormatString:s("tecton.element.calendar.hint.select")}get canClear(){if(this.isTypeable){return this.clearable&&!!this.typedValue}else{return this.clearable&&!!this.value}}get currentWeeks(){const e=this.dateList.reduce(((e,t,i)=>{const n=Math.floor(i/7);if(!e[n]){e[n]=[]}e[n].push(t);return e}),[]);return e}get formattedValue(){const{typedValue:e,dateValue:t,displayFormat:i,isTypeable:n}=this;if(n)return e;if(t===undefined)return"";if(i)return a.format(t,y(i));return new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}).format(t)}get computedPlaceholder(){if(this.disabled&&this.disabledMsg){return s(this.disabledMsg)}if(this.buttonLabel&&(this.disabled||this.placeholder)){return s(this.buttonLabel)}return this.placeholder&&s(this.placeholder)||""}get dateValue(){if(this.isTypeable){return g(this.typedValue)}else{let{value:e}=this;const t=e&&typeof e!=="string"&&"toDate"in e;if(t)return e.toDate();const i=typeof e==="string"&&e.split(" ").length===6&&/GMT-\d{4}/g.test(e);if(i){e=h(e)}return g(e)}}get dateValidators(){const e=new Date(this.cutoffTime||"");return{startDate:g(this.startDate),endDate:g(this.endDate),cutOffTime:a.isValid(e)?e:undefined}}get isTypeable(){return this.typeable}get errorList(){const{errors:e,hintMessageType:t,hintMessage:i,invalid:n}=this;if(Array.isArray(e)&&e.length)return e.filter((e=>!!e)).map((e=>s(e)));if(t==="error"&&i)return[i];if(n)return["tecton.element.calendar.invalid"];return[]}get hintList(){const{hints:e,hintMessageType:t,hintMessage:i}=this;if(Array.isArray(e)&&e.length)return e.filter((e=>!!e)).map((e=>s(e)));if(t==="info"&&i)return[i];return[]}defaultChangeHandler(e){if(e.target===this.hostElement&&!this.hostElement.onchange&&!!e.detail){this.value=e.detail.value}}defaultErrorHandler(e){if(e.target===this.hostElement&&!this.hostElement.onerror){const{errors:e}=this;if(Array.isArray(e)&&e.includes("tecton.element.calendar.hint.invalidDate")){return}this.errors=(e||[]).concat(["tecton.element.calendar.hint.invalidDate"])}}defaultSuccessHandler(e){if(e.target!==this.hostElement){return}if(typeof this.onsuccess==="function"){this.onsuccess(e)}else{const{errors:e}=this;if(Array.isArray(e)&&e.includes("tecton.element.calendar.hint.invalidDate")){this.errors=e.filter((e=>e!=="tecton.element.calendar.hint.invalidDate"))}}}delegateFocus(e){if(!o(e,this.hostElement))return;this.controlElement.shadowRoot.querySelector(".input-field").focus()}handleClear(){this.change.emit({value:null});this.value=null;this.typedValue=""}popoverStateHandler({detail:{open:e}}){if(this.open!==e)this.open=e}_togglePopover(){const e=this.typeable?this.btnCalendarToggle:this.innerInputField;e===null||e===void 0?void 0:e.click();e===null||e===void 0?void 0:e.focus();e.dispatchEvent(new FocusEvent("focus"))}openPopover(){if(this.open)return;this._togglePopover()}closePopover(){if(!this.open)return;this._togglePopover()}async setValue(e){var t;const i=typeof e==="string"?g(e):e;if(!a.isValid(i))return;await this.openPopover();await l();this.goToMonthYear(i.getMonth(),i.getFullYear());await l();const n=(t=this.calendarTable)===null||t===void 0?void 0:t.querySelector(`td[data-date="${h(i)}"]`);n===null||n===void 0?void 0:n.click()}async typeValue(e){if(!this.typeable)return;const t=typeof e==="string"?g(e):e;const i=f(t);if(!a.isValid(t))return;const{innerInputField:n,controlElement:s}=this;n.focus();n.dispatchEvent(new FocusEvent("focus"));n.value=i;n.dispatchEvent(new InputEvent("input"));s.dispatchEvent(new KeyboardEvent("keyup"))}popDirectionHandler(){c(this,"popDirection","popoverDirection")}ariaLabelObserver(){r(this)}typeableChanged(){this.valueObserver(this.value)}valueObserver(e){if(e===""){this.value=undefined;this.setHints({isValid:true,message:this.defaultHintMessage,messageType:"info"});return}const t=e&&typeof e!=="string"&&"toDate"in e;const i=t?e.toDate():g(e);const n=f(i);if(this.isTypeable){this.typedValue=n}else{this.controlElement.value=n;this.selectedMonthYear=x(i);this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}if(this.invalid)return;if(n){this.setHints({isValid:true,message:null,messageType:null})}else{this.setHints({isValid:true,message:this.defaultHintMessage,messageType:"info"})}}daysOfWeekChecksumObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}validDatesObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}invalidDatesObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}startDateObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}endDateObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}cutoffTimeObserver(){this.dateList=this.buildDateList(this.selectedMonthYear);this.validateDate()}buildDateList(e){const t=D(this.invalidDates);const i=q(this.daysOfWeekChecksum);const n=D(this.validDates);return F(i,n,t,e,this.dateValue,this.dateValidators,this.typedValue)}validateDate(){var e,t,i;try{if(!!this.value){const{dateValue:n}=this;const a=(e=n===null||n===void 0?void 0:n.getMonth())!==null&&e!==void 0?e:undefined;const s=(t=n===null||n===void 0?void 0:n.getFullYear())!==null&&t!==void 0?t:undefined;const{monthIndex:r,selectedYear:d}=this.selectedMonthYear;const o=a===r&&s===d;let l=[];if(!n){l=[]}else if(o){l=this.dateList}else{l=this.buildDateList({monthIndex:a,selectedYear:s})}const c=(i=n===null||n===void 0?void 0:n.getDate())!==null&&i!==void 0?i:undefined;const u=c?!l.find((({integer:e})=>e===c)).isValid:true;if(u){this.error.emit({errors:[{message:`Value passed is invalid: The date ${this.value} is not valid`,errorCode:"generalInvalid"}]})}else{this.success.emit({value:h(n)})}}}catch(e){console.warn("Invalid moment value ",this.dateValue)}}focusInput(){var e;(e=this.controlElement)===null||e===void 0?void 0:e.focus()}checkActiveCellForBlankness(){const e=this.hostElement.shadowRoot.activeElement;if(!e||e.tagName!=="TD"||!e.hasAttribute("aria-hidden"))return;const{calendarBody:t}=this;const i=Array.from(t.querySelectorAll("td"));const n=Array.from(i).indexOf(e);const a=n<15?1:i.filter((e=>!e.hasAttribute("aria-hidden"))).length;this.focusDay(this.generateDateFromDay(a))}generateDateFromDay(e){const{monthIndex:t,selectedYear:i}=this.selectedMonthYear;return new Date(i,t,e)}activateDay(e){this.goToMonthYear(e.getMonth(),e.getFullYear());this.scheduledAfterRender.push((()=>this.focusDay(e)))}async focusDay(e){var t;if(!e)return;await l();(t=this.calendarBody.querySelector(`td[data-day="${e.getDate()}"]`))===null||t===void 0?void 0:t.focus()}render(){return i("click-elsewhere",{key:"3ca2257bb2303adcff179f3c2371e65a0eb94bee",class:this.open?"dropdown-open":undefined,onChange:this.onClickElsewhere},this.inputField(),i("q2-popover",{key:"cd24cef9cdc295c5de9a82d29eff09f2b40b9ab0",ref:e=>this.popoverElement=e,controlElement:this.innerInputContainer,open:this.open,direction:this.popoverDirection,minHeight:this.popoverMinHeight,align:this.popoverAlignment,block:true},this.hintField(),this.calendarPopover()))}hintField(){if(!this.hintMessage)return;return i("q2-message",{class:"calendar-hint sr",ref:e=>this.hintMessageElement=e,type:this.hintMessageType},this.hintMessage)}setHints({isValid:e,message:t,messageType:i}){var n;if(t===this.hintMessage)return(n=this.hintMessageElement)===null||n===void 0?void 0:n.present();this.invalid=!e;this.hintMessage=t;this.hintMessageType=i}setCompleteInput(e){const t=f(e);this.change.emit({value:h(e)});this.typedValue=t;this.setHints({isValid:true,message:null,messageType:null})}inputField(){const{isTypeable:e}=this;return i("q2-input",{ref:e=>this.controlElement=e,class:"calendar-input-field",value:this.formattedValue,label:s(this.label),hideLabel:this.hideLabel,disabled:!!this.disabled,readonly:!!this.readonly,clearable:this.canClear,placeholder:this.computedPlaceholder,optional:!!this.optional,ariaExpanded:`${!!this.open}`,hints:this.hintList,errors:this.errorList,onClick:e?undefined:this.onInputClick,onChange:this.onInputChange,onInput:this.onInputInput,onKeyDown:this.onInputKeydown,onKeyUp:this.onInputKeyup,onBlur:this.onInputBlur,onFocus:this.onInputFocus,"icon-right":e?undefined:"calendar","format-modifier":e?this.formatModifier:this.displayFormat||this.formatModifier,pseudo:!e,type:"date","hide-messages":!e,"test-id":"inputAndCalendarToggle"},e&&i("q2-btn",{ref:e=>this.btnCalendarToggle=e,slot:"input-right",onClick:this.onInputClick,"test-id":"calendarToggle",label:"tecton.element.calendar.toggleAriaLabel","hide-label":true},i("q2-icon",{type:"calendar"})))}calendarPopover(){const{monthIndex:e,selectedYear:t}=this.selectedMonthYear;return i("div",{class:"calendar-field-popup",onKeyUp:this.onPopupKeyup},this.calendarLabel&&i("p",{class:"calendar-label"},s(this.calendarLabel)),i("div",{class:"cal-month-heading"},i("q2-btn",{label:s("tecton.element.calendar.previousMonth"),"hide-label":true,ref:e=>this.btnPrevMonth=e,class:"cal-nav-btn prev-month","test-id":"previousMonthButton",onClick:()=>this.goToMonthYear(e-1,t)},i("q2-icon",{type:"chevron-left"})),i("span",{class:"cal-month-text"},this.monthStrings[e]),i("q2-btn",{label:s("tecton.element.calendar.nextMonth"),"hide-label":true,class:"cal-nav-btn next-month",ref:e=>this.btnNextMonth=e,"test-id":"nextMonthButton",onClick:()=>this.goToMonthYear(e+1,t)},i("q2-icon",{type:"chevron-right"})),i("q2-btn",{label:s("tecton.element.calendar.previousYear"),"hide-label":true,class:"cal-nav-btn prev-year",ref:e=>this.btnPrevYear=e,"test-id":"previousYearButton",onClick:()=>this.goToMonthYear(e,t-1)},i("q2-icon",{type:"chevron-left"})),i("span",{class:"cal-year-text"},this.selectedMonthYear.selectedYear),i("q2-btn",{label:s("tecton.element.calendar.nextYear"),"hide-label":true,class:"cal-nav-btn next-year",ref:e=>this.btnNextYear=e,"test-id":"nextYearButton",onClick:()=>this.goToMonthYear(e,t+1),onKeyDown:this.onHeaderControlKeydown},i("q2-icon",{type:"chevron-right"}))),i("div",{class:"sr","aria-live":"polite",id:"table-label"},`${this.monthStrings[e]} ${t}`),this.calendarDays(),this.disclaimer&&i("div",{class:"calendar-disclaimer"},s(this.disclaimer)),i("q2-btn",{class:"sr refocus-popup",onFocus:this.onRefocus}))}calendarDays(){return i("table",{role:"grid","aria-labelledby":"table-label",ref:e=>this.calendarTable=e},i("thead",null,i("tr",null,[...Array(7).keys()].map((e=>i("th",{scope:"col","aria-label":this.dayStrings[e]},this.dayAbbrStrings[e]))))),i("tbody",{onClick:this.onDateSelection,onKeyDown:this.onDateKeydown,ref:e=>this.calendarBody=e,"test-id":"calendarTableBody"},this.currentWeeks.map((e=>i("tr",null,e.map((e=>{var t;let n="";if(e.isToday)n=`${s("tecton.element.calendar.today")}, `;n+=m(e.date);if(e.isSelected)n+=` (${s("tecton.element.calendar.selected")})`;return i("td",{class:e.classList,"aria-hidden":e.isEmpty?"true":undefined,tabindex:e.isSelected?0:-1,role:e.isSelected?"gridcell":undefined,"aria-selected":e.isSelected?"true":undefined,"aria-disabled":e.isValid?undefined:"true","data-day":e.integer||undefined,"data-date":e.date?h(e.date):undefined},(e===null||e===void 0?void 0:e.isToday)&&i("div",{class:"today-decorator","aria-hidden":"true"},s("tecton.element.calendar.today")),i("div",{"aria-label":n},(t=e===null||e===void 0?void 0:e.integer)!==null&&t!==void 0?t:""))})))))))}get hostElement(){return n(this)}static get watchers(){return{popDirection:["popDirectionHandler"],ariaLabel:["ariaLabelObserver"],typeable:["typeableChanged"],value:["valueObserver"],daysOfWeekChecksum:["daysOfWeekChecksumObserver"],validDates:["validDatesObserver"],invalidDates:["invalidDatesObserver"],startDate:["startDateObserver"],endDate:["endDateObserver"],cutoffTime:["cutoffTimeObserver"]}}};Z.style=J;export{Z as q2_calendar};
2
+ //# sourceMappingURL=p-dd552b4d.entry.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-8013d83b.js";export{s as setNonce}from"./p-8013d83b.js";import{g as t}from"./p-e1255160.js";var l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((async e=>{await t();return a(JSON.parse('[["p-9889cdb8",[[1,"q2-calendar",{"assume":[513],"calendarLabel":[513,"calendar-label"],"clearable":[516],"cutoffTime":[513,"cutoff-time"],"daysOfWeekChecksum":[514,"days-of-week-checksum"],"disabled":[516],"disabledMsg":[513,"disabled-msg"],"disclaimer":[513],"displayFormat":[513,"display-format"],"endDate":[513,"end-date"],"errors":[1040],"hideLabel":[1540,"hide-label"],"hints":[1040],"invalid":[1540],"invalidDates":[16],"label":[1537],"open":[1540],"optional":[516],"placeholder":[513],"popoverAlignment":[1,"popover-alignment"],"popoverDirection":[1025,"popover-direction"],"popoverMinHeight":[2,"popover-min-height"],"readonly":[516],"startDate":[513,"start-date"],"typeable":[516],"validDates":[16],"value":[1537],"popDirection":[513,"pop-direction"],"onsuccess":[16],"buttonLabel":[513,"button-label"],"ariaLabel":[1537,"aria-label"],"keyboardSelection":[32],"typedValue":[32],"dateList":[32],"hintMessage":[32],"hintMessageType":[32],"openPopover":[64],"closePopover":[64],"setValue":[64],"typeValue":[64]},[[0,"change","defaultChangeHandler"],[0,"error","defaultErrorHandler"],[0,"success","defaultSuccessHandler"],[0,"focus","delegateFocus"],[0,"clear","handleClear"],[0,"popoverStateChanged","popoverStateHandler"]],{"popDirection":["popDirectionHandler"],"ariaLabel":["ariaLabelObserver"],"typeable":["typeableChanged"],"value":["valueObserver"],"daysOfWeekChecksum":["daysOfWeekChecksumObserver"],"validDates":["validDatesObserver"],"invalidDates":["invalidDatesObserver"],"startDate":["startDateObserver"],"endDate":["endDateObserver"],"cutoffTime":["cutoffTimeObserver"]}]]],["p-292535d1",[[1,"q2-select",{"disabled":[516],"errors":[16],"hideLabel":[1540,"hide-label"],"hoist":[4],"invalid":[516],"label":[1537],"listLabel":[1,"list-label"],"minRows":[2,"min-rows"],"multilineOptions":[516,"multiline-options"],"multiple":[516],"optional":[516],"placeholder":[513],"popDirection":[513,"pop-direction"],"readonly":[516],"searchable":[516],"selectedOptions":[1040],"value":[1025],"ariaLabel":[1537,"aria-label"],"open":[32],"showSelected":[32],"searchText":[32],"hasCustomDisplay":[32],"hasPopoverTop":[32],"hasPopoverBottom":[32],"inputFocused":[32],"statusMessage":[32],"prioritizeSearch":[32],"structuredSelectedOptions":[32],"openPopover":[64],"closePopover":[64],"setValue":[64],"searchOptions":[64]},[[0,"keydown","keydownHandler"],[0,"change","onHostElementChange"],[0,"input","onHostElementInput"],[0,"focus","delegateFocus"],[0,"focusout","handleFocusout"],[0,"displayChanged","handleSelectedDisplay"]],{"value":["buildStructuredSelectedOptions","valueUpdated"],"selectedOptions":["buildStructuredSelectedOptions"],"ariaLabel":["ariaLabelObserver"],"multilineOptions":["handleMultilineOptionsUpdate"],"open":["openChanged"]}]]],["p-c1eef9d9",[[1,"q2-action-sheet",{"data":[1040],"title":[1],"hideClose":[4,"hide-close"],"isScrollable":[32],"renderStatus":[32],"hide":[64],"show":[64]}]]],["p-15ee9779",[[1,"q2-dropdown",{"additionalContext":[513,"additional-context"],"block":[516],"context":[513],"contextValue":[513,"context-value"],"disabled":[516],"hideLabel":[1540,"hide-label"],"icon":[513],"label":[1537],"name":[513],"open":[1540],"popoverDirection":[1025,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"resolvedType":[513,"resolved-type"],"type":[513],"alignment":[513],"popDirection":[513,"pop-direction"],"ariaLabel":[1537,"aria-label"]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"]],{"popDirection":["popDirectionHandler"],"alignment":["alignmentHandler"],"ariaLabel":["ariaLabelHandler"],"name":["nameHandler"],"context":["contextHandler"],"contextValue":["contextValueHandler"],"resolvedType":["resolvedTypeHandler"],"additionalContext":["additionalContextHandler"]}]]],["p-c72747dd",[[1,"q2-data-table",{"bordered":[1540],"clickable":[1540],"caption":[1025],"density":[1537],"headers":[1040],"hideCaption":[1540,"hide-caption"],"hideClickable":[1028,"hide-clickable"],"loading":[1540],"rows":[1040],"selectable":[1540],"selectMode":[1025,"select-mode"],"shadowed":[1540],"serializedHeaders":[32],"serializedRows":[32],"hasExpandableRows":[32],"hasDropdowns":[32],"allRowsSelected":[32],"someRowsSelected":[32],"checkSlotCount":[32]},[[0,"click","onClickListener"],[0,"selectAllRows","onSelectAllRows"]],{"headers":["headersHandler"],"rows":["rowsHandler"],"selectable":["selectableHandler"]}]]],["p-1c2cdfa0",[[1,"q2-editable-field",{"block":[516],"disabled":[516],"editing":[1540],"errors":[16],"formatModifier":[513,"format-modifier"],"hideLabel":[1540,"hide-label"],"hints":[16],"label":[1537],"maxlength":[514],"persistentLabel":[516,"persistent-label"],"truncated":[516],"type":[513],"value":[1537],"ariaLabel":[1537,"aria-label"],"formattedValue":[32],"clickEdit":[64],"clickCancel":[64],"clickSave":[64],"setValue":[64]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"]],{"errors":["errorsObserver"],"ariaLabel":["ariaLabelObserver"],"editing":["observesEditing"]}]]],["p-5f97da6c",[[1,"q2-pagination",{"autoSize":[1540,"auto-size"],"total":[514],"page":[1538],"pages":[1538],"pagesOnly":[1540,"pages-only"],"perPage":[2,"per-page"],"recordsOnly":[1540,"records-only"],"recordType":[1,"record-type"],"isSmall":[32]},[[0,"focus","onHostElementFocus"]],{"recordsOnly":["manageResizeObserver"],"pagesOnly":["manageResizeObserver"],"autoSize":["manageResizeObserver"]}]]],["p-83c5c885",[[1,"q2-pill",{"active":[1540],"disabled":[516],"hoist":[4],"label":[513],"maxLength":[514,"max-length"],"multiple":[516],"open":[1540],"optionListLabel":[1,"option-list-label"],"popoverDirection":[1,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"selectedOptions":[1040],"theme":[513],"value":[1537],"optionCount":[32],"selectedOptionElements":[32]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"],[0,"displayChanged","handleSelectedDisplay"]],{"value":["valueChanged"],"selectedOptions":["selectedOptionsChanged"]}]]],["p-fc728a2d",[[1,"q2-tab-container",{"color":[513],"name":[513],"noPrint":[516,"no-print"],"type":[513],"value":[1537],"hasLeft":[32],"hasRight":[32],"scrollEnabled":[32],"showScrollLeft":[32],"showScrollRight":[32],"tabs":[32]},[[0,"change","defaultChangeHandler"],[9,"resize","onResize"],[0,"focus","onFocus"],[0,"badge","onBadge"]],{"value":["valueObserver"],"name":["nameObserver"]}]]],["p-32b4930a",[[1,"q2-tag",{"hoist":[4],"label":[513],"open":[1540],"optionListLabel":[1,"option-list-label"],"popoverDirection":[1,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"theme":[513],"optionCount":[32]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"]]]]],["p-88ee6e1e",[[4,"q2-carousel",{"autoPlay":[516,"auto-play"],"fullWidthPanes":[516,"full-width-panes"],"hidePagination":[516,"hide-pagination"],"label":[513],"showNavigationArrows":[516,"show-navigation-arrows"],"index":[1538],"ariaLabel":[513,"aria-label"],"universalCarouselOptions":[32],"fullWidthDisplayOptions":[32],"activePaneIndex":[32],"applyFocus":[32],"applyPaginationFocus":[32],"autoPlayInProgress":[32],"compactMode":[32],"carouselWrapperWidth":[32],"ariaLiveValue":[32],"currentPaneCount":[32]},[[0,"change","onHostElementChange"],[0,"clickCarouselPane","carouselPaneClicked"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"carouselWrapperWidth":["carouselWrapperWidthChanged"],"index":["indexChanged"],"fullWidthPanes":["revampCarousel"],"compactMode":["revampCarousel"],"autoPlay":["revampCarousel"]}]]],["p-ce453e6f",[[1,"q2-month-picker",{"year":[1538],"disabledMonths":[16],"today":[1],"selectedIndex":[32],"focusedIndex":[32],"showYearLayer":[32]}]]],["p-13642096",[[1,"q2-section",{"collapsible":[516],"expanded":[1540],"label":[513],"noCollapseIcon":[516,"no-collapse-icon"],"contentHeight":[32],"hideContent":[32],"hasYieldedHeader":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]],{"expanded":["expandedObserver"],"collapsible":["collapsibleObserver"]}]]],["p-cd5d3a66",[[1,"q2-stepper",{"currentStep":[1538,"current-step"],"stepCount":[1026,"step-count"],"lastEnabledStep":[1026,"last-enabled-step"],"contentChangeTriggerCount":[32],"scrollEnabled":[32],"showScrollLeft":[32],"showScrollRight":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"],[0,"statusChange","statusChangeHandler"],[0,"contentChange","contentChangeHandler"]],{"currentStep":["currentStepChanged"]}]]],["p-f6ecac88",[[1,"q2-card",{"avatarIcon":[513,"avatar-icon"],"avatarInitials":[513,"avatar-initials"],"avatarName":[513,"avatar-name"],"avatarSrc":[513,"avatar-src"],"bar":[513],"description":[513],"isSmall":[516,"is-small"],"isStatic":[516,"is-static"],"isTouch":[516,"is-touch"],"target":[513],"title":[513],"type":[513],"url":[513],"isAutoTouch":[32],"isAutoSmall":[32]},[[0,"focus","onHostElementFocus"]]]]],["p-4f389d8b",[[1,"q2-chart-donut",{"data":[16],"chartName":[513,"chart-name"],"format":[513],"hoverScaleSize":[2,"hover-scale-size"],"isClickable":[516,"is-clickable"],"innerRadius":[1025,"inner-radius"],"minSliceSize":[1,"min-slice-size"],"outerRadius":[1025,"outer-radius"],"selectedId":[1025,"selected-id"],"selectedOffset":[2,"selected-offset"],"summaryIcon":[513,"summary-icon"],"summaryName":[513,"summary-name"],"hoveredId":[32],"selectById":[64],"selectByIndex":[64],"clearSelection":[64],"getChartOptions":[64]},[[0,"focus","delegateFocus"]],{"chartName":["propsUpdates"],"innerRadius":["propsUpdates","innerRadiusUpdated"],"outerRadius":["propsUpdates","outerRadiusUpdated"],"minSliceSize":["propsUpdates"],"hoverScaleSize":["propsUpdates"],"selectedOffset":["propsUpdates"],"data":["propsUpdates","dataUpdated"],"selectedId":["checkSelectedId"]}]]],["p-56ff02fb",[[1,"q2-checkbox-group",{"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"label":[513],"optional":[516],"readonly":[516],"value":[1040],"setValue":[64]},[[0,"change","onHostElementChange"]],{"value":["valueObserver"],"disabled":["disabledObserver"],"readonly":["readonlyObserver"]}]]],["p-23b685f5",[[1,"q2-radio-group",{"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"label":[513],"name":[513],"optional":[516],"readonly":[516],"tileAlignment":[513,"tile-alignment"],"tileLayout":[1540,"tile-layout"],"value":[1025],"tilelayout":[1540],"setValue":[64]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"],[0,"keydown","keydownHandler"]],{"value":["valueUpdated"],"name":["nameUpdated"],"disabled":["disabledUpdated"],"readonly":["readonlyUpdated"],"tilelayout":["handleDeprecatedTilelayout"],"tileLayout":["tileLayoutUpdated"]}]]],["p-a43c372f",[[1,"q2-stepper-vertical",{"currentStepId":[1537,"current-step-id"],"structuredPanes":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"],[0,"statusChange","statusChangeHandler"]],{"currentStepId":["currentStepChanged"]}]]],["p-df622e9d",[[1,"q2-textarea",{"cols":[514],"disabled":[516],"errors":[16],"hints":[16],"hideLabel":[516,"hide-label"],"hideMessages":[516,"hide-messages"],"label":[513],"maxlength":[1538],"optional":[516],"placeholder":[513],"readonly":[516],"resize":[513],"rows":[514],"spellcheck":[516],"value":[1025],"hasFocus":[32],"downParams":[32],"setValue":[64]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"],[0,"input","onHostElementInput"]],{"value":["valueObserver"],"rows":["rowsObserver"],"cols":["colsObserver"],"hints":["hintsObserver"],"errors":["errorsObserver"]}]]],["p-8c9d0966",[[4,"q2-carousel-pane",{"index":[2],"siblingCount":[2,"sibling-count"],"isActivePane":[516,"is-active-pane"],"label":[513]},null,{"isActivePane":["determineDisabledContent"]}]]],["p-e796e5a8",[[1,"q2-chart-area",{"data":[16],"alignChartName":[513,"align-chart-name"],"areaColor":[513,"area-color"],"chartName":[513,"chart-name"],"chartSubTitle":[513,"chart-sub-title"],"dataNamesOverflow":[513,"data-names-overflow"],"dataNamesWidth":[514,"data-names-width"],"format":[513],"formatModifier":[513,"format-modifier"],"gridLines":[513,"grid-lines"],"hideNameAxisLabels":[516,"hide-name-axis-labels"],"hideValueAxisLabels":[516,"hide-value-axis-labels"],"lineColor":[513,"line-color"],"offsetDataNames":[516,"offset-data-names"],"offsetDataValues":[516,"offset-data-values"],"pointerLineColor":[513,"pointer-line-color"],"pointerLineStyle":[513,"pointer-line-style"],"showChartName":[516,"show-chart-name"],"showDatapointLabels":[516,"show-datapoint-labels"],"showGradient":[516,"show-gradient"]},null,{"data":["propsUpdates"],"alignChartName":["propsUpdates"],"chartName":["propsUpdates"],"chartSubTitle":["propsUpdates"],"lineColor":["propsUpdates"],"pointerLineColor":["propsUpdates"],"pointerLineStyle":["propsUpdates"],"areaColor":["propsUpdates"],"dataNamesOverflow":["propsUpdates"],"dataNamesWidth":["propsUpdates"],"format":["propsUpdates"],"formatModifier":["propsUpdates"],"hideNameAxisLabels":["propsUpdates"],"hideValueAxisLabels":["propsUpdates"],"offsetDataNames":["propsUpdates"],"offsetDataValues":["propsUpdates"],"showChartName":["propsUpdates"],"showDatapointLabels":["propsUpdates"],"showGradient":["propsUpdates"],"gridLines":["propsUpdates"]}]]],["p-871d387c",[[1,"q2-chart-bar",{"data":[16],"alignChartName":[513,"align-chart-name"],"chartName":[513,"chart-name"],"chartSubTitle":[513,"chart-sub-title"],"color":[513],"dataNamesOverflow":[513,"data-names-overflow"],"dataNamesWidth":[514,"data-names-width"],"format":[513],"formatModifier":[513,"format-modifier"],"hideBarLabels":[516,"hide-bar-labels"],"hideValueAxisLabels":[516,"hide-value-axis-labels"],"offsetDataNames":[516,"offset-data-names"],"offsetDataValues":[516,"offset-data-values"],"orientation":[513],"showChartName":[516,"show-chart-name"],"sort":[516]},null,{"chartName":["propsUpdates"],"chartSubTitle":["propsUpdates"],"color":["propsUpdates"],"hideBarLabels":["propsUpdates"],"showChartName":["propsUpdates"],"alignChartName":["propsUpdates"],"orientation":["propsUpdates"],"format":["propsUpdates"],"sort":["propsUpdates"],"data":["propsUpdates"],"offsetDataNames":["propsUpdates"],"hideValueAxisLabels":["propsUpdates"],"formatModifier":["propsUpdates"],"dataNamesOverflow":["propsUpdates"]}]]],["p-56f1c39b",[[0,"q2-loading-element",{"shape":[513],"width":[513],"height":[513],"borderRadius":[513,"border-radius"]}]]],["p-ce7868a2",[[1,"q2-loc",{"substitutions":[16],"value":[513]}]]],["p-5e53dd08",[[1,"q2-radio",{"checked":[1540],"disabled":[516],"hideLabel":[1540,"hide-label"],"label":[1537],"readonly":[516],"value":[513],"tabIndex":[2,"tab-index"],"name":[513],"groupDisabled":[4,"group-disabled"],"groupReadonly":[4,"group-readonly"],"groupTileLayout":[4,"group-tile-layout"],"ariaLabel":[1537,"aria-label"]},[[0,"click","onHostClick"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"checked":["checkedObserver"]}]]],["p-e834679c",[[1,"q2-relative-time",{"baseDate":[513,"base-date"],"locale":[513],"messageFormat":[513,"message-format"],"numericOnly":[516,"numeric-only"],"sync":[1540],"date":[513],"unit":[513],"displayedMessage":[32],"displayedMessageValue":[64]},null,{"sync":["syncUpdated"],"messageFormat":["updateMessage"],"locale":["updateMessage"],"date":["updateMessage"],"baseDate":["updateMessage"],"numericOnly":["updateMessage"],"unit":["updateMessage"]}]]],["p-95edb04b",[[1,"q2-stepper-pane",{"description":[513],"isActive":[516,"is-active"],"label":[513],"showWithChildren":[516,"show-with-children"],"status":[513],"isChildActive":[32]},[[0,"activeChange","checkForActiveChildren"]],{"label":["labelOrDescriptionChanged"],"description":["labelOrDescriptionChanged"],"status":["statusChanged"],"isActive":["isActiveChanged"],"showWithChildren":["checkForActiveChildren"]}]]],["p-db29fd63",[[1,"q2-tab-pane",{"badgeCount":[514,"badge-count"],"badgeDescription":[513,"badge-description"],"badgeStatus":[513,"badge-status"],"badgeTheme":[513,"badge-theme"],"label":[513],"value":[513],"name":[513],"selected":[516],"index":[2],"guid":[2]},null,{"badgeCount":["badgeObserver"],"badgeDescription":["badgeObserver"],"badgeTheme":["badgeObserver"],"badgeStatus":["badgeObserver"]}]]],["p-a2c34e90",[[1,"q2-tooltip",{"block":[516],"focusable":[516],"immediate":[516],"label":[513],"multiline":[516],"persistent":[516],"position":[513],"focusClass":[32]},[[0,"keyup","keyUpHandler"],[2,"focus","focusCaptureHandler"],[0,"focus","focusHandler"],[0,"focusout","focusOutHandler"]]]]],["p-e11fe671",[[1,"tecton-tab-pane",{"value":[513],"label":[513],"name":[513],"selected":[516],"index":[2],"guid":[2],"provided":[516],"url":[513],"moduleId":[513,"module-id"],"minHeight":[513,"min-height"],"badgeCount":[514,"badge-count"],"badgeDescription":[513,"badge-description"],"badgeTheme":[513,"badge-theme"],"badgeStatus":[513,"badge-status"],"authPayload":[16],"showForm":[4,"show-form"],"_showForm":[32]},null,{"badgeCount":["badgeObserver"],"badgeDescription":["badgeObserver"],"badgeTheme":["badgeObserver"],"badgeStatus":["badgeObserver"],"selected":["selectedObserver"]}]]],["p-cc2901ae",[[1,"q2-icon",{"inline":[516],"label":[513],"type":[513]},null,{"type":["customIconHandler"]}]]],["p-b159ec91",[[1,"q2-dropdown-item",{"disabled":[516],"label":[1537],"removable":[516],"separator":[516],"value":[513],"ariaLabel":[1537,"aria-label"]},[[0,"focus","onHostElementFocus"]],{"ariaLabel":["ariaLabelObserver"]}]]],["p-c929f062",[[1,"q2-avatar",{"icon":[1],"initials":[513],"name":[513],"src":[513],"badSrc":[32],"isLoaded":[32]},null,{"src":["srcDidUpdate"]}]]],["p-47a65dbe",[[1,"q2-checkbox",{"alignment":[513],"checked":[1540],"description":[513],"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"indeterminate":[516],"label":[1537],"name":[513],"readonly":[516],"type":[513],"value":[513],"groupDisabled":[516,"group-disabled"],"ariaLabel":[1537,"aria-label"]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"]}]]],["p-53265e50",[[1,"q2-option",{"role":[513],"disabled":[516],"display":[1025],"value":[513],"disabledGroup":[516,"disabled-group"],"selected":[516],"multiline":[516],"active":[516],"_multiSelectHidden":[516,"_multiselecthidden"]}],[1,"q2-optgroup",{"disabled":[516],"label":[513],"hidden":[32]},null,{"disabled":["disabledWatcher"]}]]],["p-08981e14",[[1,"q2-message",{"appearance":[513],"description":[516],"type":[513],"presentToggle":[32],"present":[64]},[[0,"focus","delegateFocus"]]]]],["p-9289eb68",[[1,"q2-input",{"autocapitalize":[513],"autocomplete":[513],"autocorrect":[513],"autofocus":[516],"badgeTheme":[513,"badge-theme"],"badgeValue":[513,"badge-value"],"clearable":[516],"current":[1],"disabled":[516],"errors":[16],"formatModifier":[513,"format-modifier"],"hideLabel":[1540,"hide-label"],"hideMessages":[516,"hide-messages"],"hints":[16],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"label":[1537],"max":[514],"maxlength":[1538],"min":[514],"optional":[516],"placeholder":[513],"pseudo":[516],"readonly":[516],"role":[1],"showCount":[516,"show-count"],"showVisibilityToggle":[516,"show-visibility-toggle"],"step":[514],"textHidden":[1540,"text-hidden"],"type":[513],"value":[1025],"ariaControls":[1,"aria-controls"],"ariaOwns":[1,"aria-owns"],"ariaHaspopup":[1,"aria-haspopup"],"ariaExpanded":[1,"aria-expanded"],"ariaActivedescendant":[1,"aria-activedescendant"],"ariaLabel":[1537,"aria-label"],"formattedValueObject":[32],"hasFocus":[32],"isSmall":[32],"checkSlotCount":[32],"setValue":[64],"clearValue":[64]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"]],{"clearable":["manageClearableResizeObserver"],"ariaLabel":["ariaLabelObserver"],"value":["valueObserver"],"formattedValueObject":["formattedValueObjectObserver"],"type":["typeObserver"],"formatModifier":["formatModifierObserver"],"hints":["hintsObserver"],"errors":["errorsObserver"]}]]],["p-324946ce",[[1,"q2-option-list",{"align":[513],"customSearch":[516,"custom-search"],"disabled":[516],"label":[1],"multiple":[516],"noSelect":[516,"no-select"],"selectedOptions":[1040],"showSelected":[1540,"show-selected"],"type":[1],"hasOptions":[32],"setDefaultActiveElement":[64],"setActiveElement":[64],"handleExternalKeydown":[64],"getContents":[64],"getOptions":[64]},[[0,"focus","delegateFocus"],[0,"click","handleClick"]],{"showSelected":["showSelectedUpdated"],"selectedOptions":["selectedOptionsUpdated"]}]]],["p-e6022136",[[1,"q2-badge",{"maxLength":[514,"max-length"],"size":[513],"status":[513],"theme":[513],"value":[514]}]]],["p-3729ab9c",[[1,"q2-popover",{"direction":[513],"align":[513],"open":[1540],"block":[516],"controlElement":[16],"minHeight":[2,"min-height"],"currentDirection":[32],"toggle":[64],"scrollContainerTo":[64]},[[0,"popoverState","popoverStateHandler"]],{"open":["openChanged"],"minHeight":["minHeightProvided"]}],[0,"click-elsewhere"]]],["p-f10593d8",[[1,"q2-btn",{"ariaExpanded":[1,"aria-expanded"],"ariaHasPopup":[1,"aria-has-popup"],"ariaControls":[1,"aria-controls"],"ariaSelected":[1,"aria-selected"],"ariaPressed":[1,"aria-pressed"],"description":[1],"tabIndex":[2,"tab-index"],"active":[516],"badge":[516],"block":[516],"disabled":[516],"hideLabel":[1540,"hide-label"],"intent":[1537],"label":[1537],"loading":[516],"type":[513],"size":[513],"color":[1537],"fab":[516],"ariaLabel":[1537,"aria-label"],"iconPosition":[32]},[[2,"click","disable"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"size":["sizeObserver"]}],[1,"q2-loading",{"counts":[513],"inline":[516],"label":[1537],"modifiers":[513],"shape":[513],"type":[513],"ariaLabel":[1537,"aria-label"]},null,{"ariaLabel":["ariaLabelObserver"]}]]]]'),e)}));
1
+ import{p as e,b as a}from"./p-8013d83b.js";export{s as setNonce}from"./p-8013d83b.js";import{g as t}from"./p-e1255160.js";var l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((async e=>{await t();return a(JSON.parse('[["p-dd552b4d",[[1,"q2-calendar",{"assume":[513],"calendarLabel":[513,"calendar-label"],"clearable":[516],"cutoffTime":[513,"cutoff-time"],"daysOfWeekChecksum":[514,"days-of-week-checksum"],"disabled":[516],"disabledMsg":[513,"disabled-msg"],"disclaimer":[513],"displayFormat":[513,"display-format"],"endDate":[513,"end-date"],"errors":[1040],"hideLabel":[1540,"hide-label"],"hints":[1040],"invalid":[1540],"invalidDates":[16],"label":[1537],"open":[1540],"optional":[516],"placeholder":[513],"popoverAlignment":[1,"popover-alignment"],"popoverDirection":[1025,"popover-direction"],"popoverMinHeight":[2,"popover-min-height"],"readonly":[516],"startDate":[513,"start-date"],"typeable":[516],"validDates":[16],"value":[1537],"popDirection":[513,"pop-direction"],"onsuccess":[16],"buttonLabel":[513,"button-label"],"ariaLabel":[1537,"aria-label"],"keyboardSelection":[32],"typedValue":[32],"dateList":[32],"hintMessage":[32],"hintMessageType":[32],"openPopover":[64],"closePopover":[64],"setValue":[64],"typeValue":[64]},[[0,"change","defaultChangeHandler"],[0,"error","defaultErrorHandler"],[0,"success","defaultSuccessHandler"],[0,"focus","delegateFocus"],[0,"clear","handleClear"],[0,"popoverStateChanged","popoverStateHandler"]],{"popDirection":["popDirectionHandler"],"ariaLabel":["ariaLabelObserver"],"typeable":["typeableChanged"],"value":["valueObserver"],"daysOfWeekChecksum":["daysOfWeekChecksumObserver"],"validDates":["validDatesObserver"],"invalidDates":["invalidDatesObserver"],"startDate":["startDateObserver"],"endDate":["endDateObserver"],"cutoffTime":["cutoffTimeObserver"]}]]],["p-292535d1",[[1,"q2-select",{"disabled":[516],"errors":[16],"hideLabel":[1540,"hide-label"],"hoist":[4],"invalid":[516],"label":[1537],"listLabel":[1,"list-label"],"minRows":[2,"min-rows"],"multilineOptions":[516,"multiline-options"],"multiple":[516],"optional":[516],"placeholder":[513],"popDirection":[513,"pop-direction"],"readonly":[516],"searchable":[516],"selectedOptions":[1040],"value":[1025],"ariaLabel":[1537,"aria-label"],"open":[32],"showSelected":[32],"searchText":[32],"hasCustomDisplay":[32],"hasPopoverTop":[32],"hasPopoverBottom":[32],"inputFocused":[32],"statusMessage":[32],"prioritizeSearch":[32],"structuredSelectedOptions":[32],"openPopover":[64],"closePopover":[64],"setValue":[64],"searchOptions":[64]},[[0,"keydown","keydownHandler"],[0,"change","onHostElementChange"],[0,"input","onHostElementInput"],[0,"focus","delegateFocus"],[0,"focusout","handleFocusout"],[0,"displayChanged","handleSelectedDisplay"]],{"value":["buildStructuredSelectedOptions","valueUpdated"],"selectedOptions":["buildStructuredSelectedOptions"],"ariaLabel":["ariaLabelObserver"],"multilineOptions":["handleMultilineOptionsUpdate"],"open":["openChanged"]}]]],["p-c1eef9d9",[[1,"q2-action-sheet",{"data":[1040],"title":[1],"hideClose":[4,"hide-close"],"isScrollable":[32],"renderStatus":[32],"hide":[64],"show":[64]}]]],["p-15ee9779",[[1,"q2-dropdown",{"additionalContext":[513,"additional-context"],"block":[516],"context":[513],"contextValue":[513,"context-value"],"disabled":[516],"hideLabel":[1540,"hide-label"],"icon":[513],"label":[1537],"name":[513],"open":[1540],"popoverDirection":[1025,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"resolvedType":[513,"resolved-type"],"type":[513],"alignment":[513],"popDirection":[513,"pop-direction"],"ariaLabel":[1537,"aria-label"]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"]],{"popDirection":["popDirectionHandler"],"alignment":["alignmentHandler"],"ariaLabel":["ariaLabelHandler"],"name":["nameHandler"],"context":["contextHandler"],"contextValue":["contextValueHandler"],"resolvedType":["resolvedTypeHandler"],"additionalContext":["additionalContextHandler"]}]]],["p-c72747dd",[[1,"q2-data-table",{"bordered":[1540],"clickable":[1540],"caption":[1025],"density":[1537],"headers":[1040],"hideCaption":[1540,"hide-caption"],"hideClickable":[1028,"hide-clickable"],"loading":[1540],"rows":[1040],"selectable":[1540],"selectMode":[1025,"select-mode"],"shadowed":[1540],"serializedHeaders":[32],"serializedRows":[32],"hasExpandableRows":[32],"hasDropdowns":[32],"allRowsSelected":[32],"someRowsSelected":[32],"checkSlotCount":[32]},[[0,"click","onClickListener"],[0,"selectAllRows","onSelectAllRows"]],{"headers":["headersHandler"],"rows":["rowsHandler"],"selectable":["selectableHandler"]}]]],["p-1c2cdfa0",[[1,"q2-editable-field",{"block":[516],"disabled":[516],"editing":[1540],"errors":[16],"formatModifier":[513,"format-modifier"],"hideLabel":[1540,"hide-label"],"hints":[16],"label":[1537],"maxlength":[514],"persistentLabel":[516,"persistent-label"],"truncated":[516],"type":[513],"value":[1537],"ariaLabel":[1537,"aria-label"],"formattedValue":[32],"clickEdit":[64],"clickCancel":[64],"clickSave":[64],"setValue":[64]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"]],{"errors":["errorsObserver"],"ariaLabel":["ariaLabelObserver"],"editing":["observesEditing"]}]]],["p-5f97da6c",[[1,"q2-pagination",{"autoSize":[1540,"auto-size"],"total":[514],"page":[1538],"pages":[1538],"pagesOnly":[1540,"pages-only"],"perPage":[2,"per-page"],"recordsOnly":[1540,"records-only"],"recordType":[1,"record-type"],"isSmall":[32]},[[0,"focus","onHostElementFocus"]],{"recordsOnly":["manageResizeObserver"],"pagesOnly":["manageResizeObserver"],"autoSize":["manageResizeObserver"]}]]],["p-83c5c885",[[1,"q2-pill",{"active":[1540],"disabled":[516],"hoist":[4],"label":[513],"maxLength":[514,"max-length"],"multiple":[516],"open":[1540],"optionListLabel":[1,"option-list-label"],"popoverDirection":[1,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"selectedOptions":[1040],"theme":[513],"value":[1537],"optionCount":[32],"selectedOptionElements":[32]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"],[0,"displayChanged","handleSelectedDisplay"]],{"value":["valueChanged"],"selectedOptions":["selectedOptionsChanged"]}]]],["p-fc728a2d",[[1,"q2-tab-container",{"color":[513],"name":[513],"noPrint":[516,"no-print"],"type":[513],"value":[1537],"hasLeft":[32],"hasRight":[32],"scrollEnabled":[32],"showScrollLeft":[32],"showScrollRight":[32],"tabs":[32]},[[0,"change","defaultChangeHandler"],[9,"resize","onResize"],[0,"focus","onFocus"],[0,"badge","onBadge"]],{"value":["valueObserver"],"name":["nameObserver"]}]]],["p-32b4930a",[[1,"q2-tag",{"hoist":[4],"label":[513],"open":[1540],"optionListLabel":[1,"option-list-label"],"popoverDirection":[1,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"theme":[513],"optionCount":[32]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"]]]]],["p-88ee6e1e",[[4,"q2-carousel",{"autoPlay":[516,"auto-play"],"fullWidthPanes":[516,"full-width-panes"],"hidePagination":[516,"hide-pagination"],"label":[513],"showNavigationArrows":[516,"show-navigation-arrows"],"index":[1538],"ariaLabel":[513,"aria-label"],"universalCarouselOptions":[32],"fullWidthDisplayOptions":[32],"activePaneIndex":[32],"applyFocus":[32],"applyPaginationFocus":[32],"autoPlayInProgress":[32],"compactMode":[32],"carouselWrapperWidth":[32],"ariaLiveValue":[32],"currentPaneCount":[32]},[[0,"change","onHostElementChange"],[0,"clickCarouselPane","carouselPaneClicked"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"carouselWrapperWidth":["carouselWrapperWidthChanged"],"index":["indexChanged"],"fullWidthPanes":["revampCarousel"],"compactMode":["revampCarousel"],"autoPlay":["revampCarousel"]}]]],["p-ce453e6f",[[1,"q2-month-picker",{"year":[1538],"disabledMonths":[16],"today":[1],"selectedIndex":[32],"focusedIndex":[32],"showYearLayer":[32]}]]],["p-13642096",[[1,"q2-section",{"collapsible":[516],"expanded":[1540],"label":[513],"noCollapseIcon":[516,"no-collapse-icon"],"contentHeight":[32],"hideContent":[32],"hasYieldedHeader":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]],{"expanded":["expandedObserver"],"collapsible":["collapsibleObserver"]}]]],["p-cd5d3a66",[[1,"q2-stepper",{"currentStep":[1538,"current-step"],"stepCount":[1026,"step-count"],"lastEnabledStep":[1026,"last-enabled-step"],"contentChangeTriggerCount":[32],"scrollEnabled":[32],"showScrollLeft":[32],"showScrollRight":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"],[0,"statusChange","statusChangeHandler"],[0,"contentChange","contentChangeHandler"]],{"currentStep":["currentStepChanged"]}]]],["p-f6ecac88",[[1,"q2-card",{"avatarIcon":[513,"avatar-icon"],"avatarInitials":[513,"avatar-initials"],"avatarName":[513,"avatar-name"],"avatarSrc":[513,"avatar-src"],"bar":[513],"description":[513],"isSmall":[516,"is-small"],"isStatic":[516,"is-static"],"isTouch":[516,"is-touch"],"target":[513],"title":[513],"type":[513],"url":[513],"isAutoTouch":[32],"isAutoSmall":[32]},[[0,"focus","onHostElementFocus"]]]]],["p-4f389d8b",[[1,"q2-chart-donut",{"data":[16],"chartName":[513,"chart-name"],"format":[513],"hoverScaleSize":[2,"hover-scale-size"],"isClickable":[516,"is-clickable"],"innerRadius":[1025,"inner-radius"],"minSliceSize":[1,"min-slice-size"],"outerRadius":[1025,"outer-radius"],"selectedId":[1025,"selected-id"],"selectedOffset":[2,"selected-offset"],"summaryIcon":[513,"summary-icon"],"summaryName":[513,"summary-name"],"hoveredId":[32],"selectById":[64],"selectByIndex":[64],"clearSelection":[64],"getChartOptions":[64]},[[0,"focus","delegateFocus"]],{"chartName":["propsUpdates"],"innerRadius":["propsUpdates","innerRadiusUpdated"],"outerRadius":["propsUpdates","outerRadiusUpdated"],"minSliceSize":["propsUpdates"],"hoverScaleSize":["propsUpdates"],"selectedOffset":["propsUpdates"],"data":["propsUpdates","dataUpdated"],"selectedId":["checkSelectedId"]}]]],["p-56ff02fb",[[1,"q2-checkbox-group",{"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"label":[513],"optional":[516],"readonly":[516],"value":[1040],"setValue":[64]},[[0,"change","onHostElementChange"]],{"value":["valueObserver"],"disabled":["disabledObserver"],"readonly":["readonlyObserver"]}]]],["p-23b685f5",[[1,"q2-radio-group",{"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"label":[513],"name":[513],"optional":[516],"readonly":[516],"tileAlignment":[513,"tile-alignment"],"tileLayout":[1540,"tile-layout"],"value":[1025],"tilelayout":[1540],"setValue":[64]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"],[0,"keydown","keydownHandler"]],{"value":["valueUpdated"],"name":["nameUpdated"],"disabled":["disabledUpdated"],"readonly":["readonlyUpdated"],"tilelayout":["handleDeprecatedTilelayout"],"tileLayout":["tileLayoutUpdated"]}]]],["p-a43c372f",[[1,"q2-stepper-vertical",{"currentStepId":[1537,"current-step-id"],"structuredPanes":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"],[0,"statusChange","statusChangeHandler"]],{"currentStepId":["currentStepChanged"]}]]],["p-df622e9d",[[1,"q2-textarea",{"cols":[514],"disabled":[516],"errors":[16],"hints":[16],"hideLabel":[516,"hide-label"],"hideMessages":[516,"hide-messages"],"label":[513],"maxlength":[1538],"optional":[516],"placeholder":[513],"readonly":[516],"resize":[513],"rows":[514],"spellcheck":[516],"value":[1025],"hasFocus":[32],"downParams":[32],"setValue":[64]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"],[0,"input","onHostElementInput"]],{"value":["valueObserver"],"rows":["rowsObserver"],"cols":["colsObserver"],"hints":["hintsObserver"],"errors":["errorsObserver"]}]]],["p-8c9d0966",[[4,"q2-carousel-pane",{"index":[2],"siblingCount":[2,"sibling-count"],"isActivePane":[516,"is-active-pane"],"label":[513]},null,{"isActivePane":["determineDisabledContent"]}]]],["p-e796e5a8",[[1,"q2-chart-area",{"data":[16],"alignChartName":[513,"align-chart-name"],"areaColor":[513,"area-color"],"chartName":[513,"chart-name"],"chartSubTitle":[513,"chart-sub-title"],"dataNamesOverflow":[513,"data-names-overflow"],"dataNamesWidth":[514,"data-names-width"],"format":[513],"formatModifier":[513,"format-modifier"],"gridLines":[513,"grid-lines"],"hideNameAxisLabels":[516,"hide-name-axis-labels"],"hideValueAxisLabels":[516,"hide-value-axis-labels"],"lineColor":[513,"line-color"],"offsetDataNames":[516,"offset-data-names"],"offsetDataValues":[516,"offset-data-values"],"pointerLineColor":[513,"pointer-line-color"],"pointerLineStyle":[513,"pointer-line-style"],"showChartName":[516,"show-chart-name"],"showDatapointLabels":[516,"show-datapoint-labels"],"showGradient":[516,"show-gradient"]},null,{"data":["propsUpdates"],"alignChartName":["propsUpdates"],"chartName":["propsUpdates"],"chartSubTitle":["propsUpdates"],"lineColor":["propsUpdates"],"pointerLineColor":["propsUpdates"],"pointerLineStyle":["propsUpdates"],"areaColor":["propsUpdates"],"dataNamesOverflow":["propsUpdates"],"dataNamesWidth":["propsUpdates"],"format":["propsUpdates"],"formatModifier":["propsUpdates"],"hideNameAxisLabels":["propsUpdates"],"hideValueAxisLabels":["propsUpdates"],"offsetDataNames":["propsUpdates"],"offsetDataValues":["propsUpdates"],"showChartName":["propsUpdates"],"showDatapointLabels":["propsUpdates"],"showGradient":["propsUpdates"],"gridLines":["propsUpdates"]}]]],["p-871d387c",[[1,"q2-chart-bar",{"data":[16],"alignChartName":[513,"align-chart-name"],"chartName":[513,"chart-name"],"chartSubTitle":[513,"chart-sub-title"],"color":[513],"dataNamesOverflow":[513,"data-names-overflow"],"dataNamesWidth":[514,"data-names-width"],"format":[513],"formatModifier":[513,"format-modifier"],"hideBarLabels":[516,"hide-bar-labels"],"hideValueAxisLabels":[516,"hide-value-axis-labels"],"offsetDataNames":[516,"offset-data-names"],"offsetDataValues":[516,"offset-data-values"],"orientation":[513],"showChartName":[516,"show-chart-name"],"sort":[516]},null,{"chartName":["propsUpdates"],"chartSubTitle":["propsUpdates"],"color":["propsUpdates"],"hideBarLabels":["propsUpdates"],"showChartName":["propsUpdates"],"alignChartName":["propsUpdates"],"orientation":["propsUpdates"],"format":["propsUpdates"],"sort":["propsUpdates"],"data":["propsUpdates"],"offsetDataNames":["propsUpdates"],"hideValueAxisLabels":["propsUpdates"],"formatModifier":["propsUpdates"],"dataNamesOverflow":["propsUpdates"]}]]],["p-56f1c39b",[[0,"q2-loading-element",{"shape":[513],"width":[513],"height":[513],"borderRadius":[513,"border-radius"]}]]],["p-ce7868a2",[[1,"q2-loc",{"substitutions":[16],"value":[513]}]]],["p-5e53dd08",[[1,"q2-radio",{"checked":[1540],"disabled":[516],"hideLabel":[1540,"hide-label"],"label":[1537],"readonly":[516],"value":[513],"tabIndex":[2,"tab-index"],"name":[513],"groupDisabled":[4,"group-disabled"],"groupReadonly":[4,"group-readonly"],"groupTileLayout":[4,"group-tile-layout"],"ariaLabel":[1537,"aria-label"]},[[0,"click","onHostClick"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"checked":["checkedObserver"]}]]],["p-adda0544",[[1,"q2-relative-time",{"baseDate":[513,"base-date"],"locale":[513],"messageFormat":[513,"message-format"],"numericOnly":[516,"numeric-only"],"sync":[1540],"date":[513],"unit":[513],"displayedMessage":[32],"displayedMessageValue":[64]},null,{"sync":["syncUpdated"],"messageFormat":["updateMessage"],"locale":["updateMessage"],"date":["updateMessage"],"baseDate":["updateMessage"],"numericOnly":["updateMessage"],"unit":["updateMessage"]}]]],["p-95edb04b",[[1,"q2-stepper-pane",{"description":[513],"isActive":[516,"is-active"],"label":[513],"showWithChildren":[516,"show-with-children"],"status":[513],"isChildActive":[32]},[[0,"activeChange","checkForActiveChildren"]],{"label":["labelOrDescriptionChanged"],"description":["labelOrDescriptionChanged"],"status":["statusChanged"],"isActive":["isActiveChanged"],"showWithChildren":["checkForActiveChildren"]}]]],["p-db29fd63",[[1,"q2-tab-pane",{"badgeCount":[514,"badge-count"],"badgeDescription":[513,"badge-description"],"badgeStatus":[513,"badge-status"],"badgeTheme":[513,"badge-theme"],"label":[513],"value":[513],"name":[513],"selected":[516],"index":[2],"guid":[2]},null,{"badgeCount":["badgeObserver"],"badgeDescription":["badgeObserver"],"badgeTheme":["badgeObserver"],"badgeStatus":["badgeObserver"]}]]],["p-a2c34e90",[[1,"q2-tooltip",{"block":[516],"focusable":[516],"immediate":[516],"label":[513],"multiline":[516],"persistent":[516],"position":[513],"focusClass":[32]},[[0,"keyup","keyUpHandler"],[2,"focus","focusCaptureHandler"],[0,"focus","focusHandler"],[0,"focusout","focusOutHandler"]]]]],["p-e11fe671",[[1,"tecton-tab-pane",{"value":[513],"label":[513],"name":[513],"selected":[516],"index":[2],"guid":[2],"provided":[516],"url":[513],"moduleId":[513,"module-id"],"minHeight":[513,"min-height"],"badgeCount":[514,"badge-count"],"badgeDescription":[513,"badge-description"],"badgeTheme":[513,"badge-theme"],"badgeStatus":[513,"badge-status"],"authPayload":[16],"showForm":[4,"show-form"],"_showForm":[32]},null,{"badgeCount":["badgeObserver"],"badgeDescription":["badgeObserver"],"badgeTheme":["badgeObserver"],"badgeStatus":["badgeObserver"],"selected":["selectedObserver"]}]]],["p-cc2901ae",[[1,"q2-icon",{"inline":[516],"label":[513],"type":[513]},null,{"type":["customIconHandler"]}]]],["p-b159ec91",[[1,"q2-dropdown-item",{"disabled":[516],"label":[1537],"removable":[516],"separator":[516],"value":[513],"ariaLabel":[1537,"aria-label"]},[[0,"focus","onHostElementFocus"]],{"ariaLabel":["ariaLabelObserver"]}]]],["p-c929f062",[[1,"q2-avatar",{"icon":[1],"initials":[513],"name":[513],"src":[513],"badSrc":[32],"isLoaded":[32]},null,{"src":["srcDidUpdate"]}]]],["p-7990796e",[[1,"q2-checkbox",{"alignment":[513],"checked":[1540],"description":[513],"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"indeterminate":[516],"label":[1537],"name":[513],"readonly":[516],"type":[513],"value":[513],"groupDisabled":[516,"group-disabled"],"ariaLabel":[1537,"aria-label"]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"]}]]],["p-53265e50",[[1,"q2-option",{"role":[513],"disabled":[516],"display":[1025],"value":[513],"disabledGroup":[516,"disabled-group"],"selected":[516],"multiline":[516],"active":[516],"_multiSelectHidden":[516,"_multiselecthidden"]}],[1,"q2-optgroup",{"disabled":[516],"label":[513],"hidden":[32]},null,{"disabled":["disabledWatcher"]}]]],["p-08981e14",[[1,"q2-message",{"appearance":[513],"description":[516],"type":[513],"presentToggle":[32],"present":[64]},[[0,"focus","delegateFocus"]]]]],["p-9289eb68",[[1,"q2-input",{"autocapitalize":[513],"autocomplete":[513],"autocorrect":[513],"autofocus":[516],"badgeTheme":[513,"badge-theme"],"badgeValue":[513,"badge-value"],"clearable":[516],"current":[1],"disabled":[516],"errors":[16],"formatModifier":[513,"format-modifier"],"hideLabel":[1540,"hide-label"],"hideMessages":[516,"hide-messages"],"hints":[16],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"label":[1537],"max":[514],"maxlength":[1538],"min":[514],"optional":[516],"placeholder":[513],"pseudo":[516],"readonly":[516],"role":[1],"showCount":[516,"show-count"],"showVisibilityToggle":[516,"show-visibility-toggle"],"step":[514],"textHidden":[1540,"text-hidden"],"type":[513],"value":[1025],"ariaControls":[1,"aria-controls"],"ariaOwns":[1,"aria-owns"],"ariaHaspopup":[1,"aria-haspopup"],"ariaExpanded":[1,"aria-expanded"],"ariaActivedescendant":[1,"aria-activedescendant"],"ariaLabel":[1537,"aria-label"],"formattedValueObject":[32],"hasFocus":[32],"isSmall":[32],"checkSlotCount":[32],"setValue":[64],"clearValue":[64]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"]],{"clearable":["manageClearableResizeObserver"],"ariaLabel":["ariaLabelObserver"],"value":["valueObserver"],"formattedValueObject":["formattedValueObjectObserver"],"type":["typeObserver"],"formatModifier":["formatModifierObserver"],"hints":["hintsObserver"],"errors":["errorsObserver"]}]]],["p-324946ce",[[1,"q2-option-list",{"align":[513],"customSearch":[516,"custom-search"],"disabled":[516],"label":[1],"multiple":[516],"noSelect":[516,"no-select"],"selectedOptions":[1040],"showSelected":[1540,"show-selected"],"type":[1],"hasOptions":[32],"setDefaultActiveElement":[64],"setActiveElement":[64],"handleExternalKeydown":[64],"getContents":[64],"getOptions":[64]},[[0,"focus","delegateFocus"],[0,"click","handleClick"]],{"showSelected":["showSelectedUpdated"],"selectedOptions":["selectedOptionsUpdated"]}]]],["p-e6022136",[[1,"q2-badge",{"maxLength":[514,"max-length"],"size":[513],"status":[513],"theme":[513],"value":[514]}]]],["p-3729ab9c",[[1,"q2-popover",{"direction":[513],"align":[513],"open":[1540],"block":[516],"controlElement":[16],"minHeight":[2,"min-height"],"currentDirection":[32],"toggle":[64],"scrollContainerTo":[64]},[[0,"popoverState","popoverStateHandler"]],{"open":["openChanged"],"minHeight":["minHeightProvided"]}],[0,"click-elsewhere"]]],["p-f10593d8",[[1,"q2-btn",{"ariaExpanded":[1,"aria-expanded"],"ariaHasPopup":[1,"aria-has-popup"],"ariaControls":[1,"aria-controls"],"ariaSelected":[1,"aria-selected"],"ariaPressed":[1,"aria-pressed"],"description":[1],"tabIndex":[2,"tab-index"],"active":[516],"badge":[516],"block":[516],"disabled":[516],"hideLabel":[1540,"hide-label"],"intent":[1537],"label":[1537],"loading":[516],"type":[513],"size":[513],"color":[1537],"fab":[516],"ariaLabel":[1537,"aria-label"],"iconPosition":[32]},[[2,"click","disable"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"size":["sizeObserver"]}],[1,"q2-loading",{"counts":[513],"inline":[516],"label":[1537],"modifiers":[513],"shape":[513],"type":[513],"ariaLabel":[1537,"aria-label"]},null,{"ariaLabel":["ariaLabelObserver"]}]]]]'),e)}));
2
2
  //# sourceMappingURL=q2-tecton-elements.esm.js.map
@@ -1,4 +1,4 @@
1
- import { setTestStrings, setup, dispatchEvent, testDeprecatedAriaLabel, getActiveElementTestId } from "../helpers";
1
+ import { setTestStrings, setup, dispatchEvent, testDeprecatedAriaLabel, getActiveElementTestId, getNestedElementStyle, } from "../helpers";
2
2
  describe('q2-checkbox', () => {
3
3
  let page;
4
4
  let normalStyle;
@@ -6,9 +6,7 @@ describe('q2-checkbox', () => {
6
6
  const setupPage = async (props = '') => {
7
7
  props = props ? ` ${props}` : '';
8
8
  page = await setup({
9
- html: `
10
- <q2-checkbox ${props}></q2-checkbox>
11
- `,
9
+ html: `<q2-checkbox ${props}></q2-checkbox>`,
12
10
  });
13
11
  await page.waitForChanges();
14
12
  return page;
@@ -210,6 +208,116 @@ describe('q2-checkbox', () => {
210
208
  });
211
209
  });
212
210
  });
211
+ describe('type', () => {
212
+ describe('when not set (default)', () => {
213
+ it('renders the unchecked state', async () => {
214
+ page = await setupPage();
215
+ const labelFontWeight = await getNestedElementStyle(page, ['q2-checkbox', '.label-text label'], 'font-weight');
216
+ const checkboxFill = await page.find('q2-checkbox >>> .checkbox-fill');
217
+ expect(labelFontWeight).toBe('400');
218
+ expect(checkboxFill).toBeNull();
219
+ });
220
+ it('applies necessary styles when hovered', async () => {
221
+ page = await setupPage('type="toggle"');
222
+ await page.hover('q2-checkbox >>> .toggle-svg');
223
+ await page.waitForChanges();
224
+ const labelFontWeight = await getNestedElementStyle(page, ['q2-checkbox', '.label-text label'], 'font-weight');
225
+ expect(labelFontWeight).toBe('400');
226
+ });
227
+ describe('when checked attribute is present', () => {
228
+ it('renders the checked state', async () => {
229
+ page = await setupPage('checked');
230
+ const labelFontWeight = await getNestedElementStyle(page, ['q2-checkbox', '.label-text label'], 'font-weight');
231
+ const checkboxFill = await page.find('q2-checkbox >>> .checkbox-fill');
232
+ expect(labelFontWeight).toBe('600');
233
+ expect(checkboxFill).toBeTruthy();
234
+ });
235
+ it('applies necessary styles when hovered', async () => {
236
+ page = await setupPage('checked');
237
+ await page.hover('q2-checkbox >>> .checkbox-fill');
238
+ await page.waitForChanges();
239
+ const labelFontWeight = await getNestedElementStyle(page, ['q2-checkbox', '.label-text label'], 'font-weight');
240
+ const checkboxFill = await page.find('q2-checkbox >>> .checkbox-fill');
241
+ expect(labelFontWeight).toBe('600');
242
+ expect(checkboxFill).toBeTruthy();
243
+ });
244
+ it('renders the unchecked state when checked="false"', async () => {
245
+ page = await setupPage('checked="false"');
246
+ const labelFontWeight = await getNestedElementStyle(page, ['q2-checkbox', '.label-text label'], 'font-weight');
247
+ const checkboxFill = await page.find('q2-checkbox >>> .checkbox-fill');
248
+ expect(labelFontWeight).toBe('400');
249
+ expect(checkboxFill).toBeNull();
250
+ });
251
+ });
252
+ });
253
+ describe("when set to 'toggle'", () => {
254
+ const getToggleStyles = async (page) => {
255
+ const labelFontWeight = await getNestedElementStyle(page, ['q2-checkbox', '.label-text label'], 'font-weight');
256
+ const toggleHoverCircleStrokeWidth = await getNestedElementStyle(page, ['q2-checkbox', '.toggle-hover-circle'], 'stroke-width');
257
+ const toggleIndicatorLeft = await getNestedElementStyle(page, ['q2-checkbox', '.toggle-indicator'], 'left');
258
+ const toggleSvgOffOpacity = await getNestedElementStyle(page, ['q2-checkbox', '.toggle-svg .off'], 'opacity');
259
+ const toggleSvgOnOpacity = await getNestedElementStyle(page, ['q2-checkbox', '.toggle-svg .on'], 'opacity');
260
+ return {
261
+ labelFontWeight,
262
+ toggleIndicatorLeft,
263
+ toggleHoverCircleStrokeWidth,
264
+ toggleSvgOffOpacity,
265
+ toggleSvgOnOpacity,
266
+ };
267
+ };
268
+ it('renders the unchecked state', async () => {
269
+ page = await setupPage('type="toggle"');
270
+ const computedStyles = await getToggleStyles(page);
271
+ expect(computedStyles.labelFontWeight).toBe('400');
272
+ expect(computedStyles.toggleHoverCircleStrokeWidth).toBe('0px');
273
+ expect(computedStyles.toggleIndicatorLeft).toBe('0px');
274
+ expect(computedStyles.toggleSvgOffOpacity).toBe('1');
275
+ expect(computedStyles.toggleSvgOnOpacity).toBe('0');
276
+ });
277
+ it('applies necessary styles when hovered', async () => {
278
+ page = await setupPage('type="toggle"');
279
+ await page.hover('q2-checkbox >>> .toggle-svg');
280
+ await page.waitForChanges();
281
+ const computedStyles = await getToggleStyles(page);
282
+ expect(computedStyles.labelFontWeight).toBe('400');
283
+ expect(computedStyles.toggleHoverCircleStrokeWidth).toBe('10px');
284
+ expect(computedStyles.toggleIndicatorLeft).toBe('0px');
285
+ expect(computedStyles.toggleSvgOffOpacity).toBe('1');
286
+ expect(computedStyles.toggleSvgOnOpacity).toBe('0');
287
+ });
288
+ describe('when checked attribute is present', () => {
289
+ it('renders the checked state', async () => {
290
+ page = await setupPage('type="toggle" checked');
291
+ const computedStyles = await getToggleStyles(page);
292
+ expect(computedStyles.labelFontWeight).toBe('600');
293
+ expect(computedStyles.toggleHoverCircleStrokeWidth).toBe('0px');
294
+ expect(computedStyles.toggleIndicatorLeft).toBe('21px');
295
+ expect(computedStyles.toggleSvgOffOpacity).toBe('0');
296
+ expect(computedStyles.toggleSvgOnOpacity).toBe('1');
297
+ });
298
+ it('applies necessary styles when hovered', async () => {
299
+ page = await setupPage('type="toggle" checked');
300
+ await page.hover('q2-checkbox >>> .toggle-svg');
301
+ await page.waitForChanges();
302
+ const computedStyles = await getToggleStyles(page);
303
+ expect(computedStyles.labelFontWeight).toBe('600');
304
+ expect(computedStyles.toggleHoverCircleStrokeWidth).toBe('10px');
305
+ expect(computedStyles.toggleIndicatorLeft).toBe('21px');
306
+ expect(computedStyles.toggleSvgOffOpacity).toBe('0');
307
+ expect(computedStyles.toggleSvgOnOpacity).toBe('1');
308
+ });
309
+ it('renders the unchecked state when checked="false"', async () => {
310
+ page = await setupPage('type="toggle" checked="false"');
311
+ const computedStyles = await getToggleStyles(page);
312
+ expect(computedStyles.labelFontWeight).toBe('400');
313
+ expect(computedStyles.toggleHoverCircleStrokeWidth).toBe('0px');
314
+ expect(computedStyles.toggleIndicatorLeft).toBe('0px');
315
+ expect(computedStyles.toggleSvgOffOpacity).toBe('1');
316
+ expect(computedStyles.toggleSvgOnOpacity).toBe('0');
317
+ });
318
+ });
319
+ });
320
+ });
213
321
  });
214
322
  it('toggles the checked attribute when clicked', async () => {
215
323
  page = await setupPage('label="My Checkbox"');
@@ -363,16 +471,16 @@ describe('q2-checkbox', () => {
363
471
  describe('default behavior', () => {
364
472
  it('hides default outer circle when not hovered', async () => {
365
473
  page = await setupPage('label="My Checkbox" type="toggle"');
366
- const toggle = await page.find('q2-checkbox >>> .toggle-circle');
367
- normalStyle = await toggle.getComputedStyle();
368
- expect(normalStyle.strokeWidth).toBe('1px');
474
+ const toggleCircle = await page.find('q2-checkbox >>> .toggle-hover-circle');
475
+ normalStyle = await toggleCircle.getComputedStyle();
476
+ expect(normalStyle.strokeWidth).toBe('0px');
369
477
  });
370
478
  it('shows default outer circle on hover', async () => {
371
479
  page = await setupPage('label="My Checkbox" type="toggle"');
372
- const toggle = await page.find('q2-checkbox >>> .toggle-circle');
480
+ const toggleCircle = await page.find('q2-checkbox >>> .toggle-hover-circle');
373
481
  await page.hover('q2-checkbox');
374
482
  await page.waitForChanges();
375
- hoverStyle = await toggle.getComputedStyle();
483
+ hoverStyle = await toggleCircle.getComputedStyle();
376
484
  expect(hoverStyle.strokeWidth).toBe('10px');
377
485
  });
378
486
  });