@evotecit/canopyx 0.3.21 → 0.3.23

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.
@@ -0,0 +1,71 @@
1
+ /* Shared screens: faces,merged events,finished events,day notes,run layouts and the Reset button (docs/calendar.md#shared-screens). */
2
+ .cx-cal-faces{flex:none;display:inline-flex;align-items:center;}
3
+ .cx-cal-face{--cx-face:var(--cx-ev,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)));--cx-face-size:calc(var(--hfx-icon-md,16px) + var(--hfx-space-0-5,2px));flex:none;display:inline-grid;place-items:center;width:var(--cx-face-size);height:var(--cx-face-size);border-radius:50%;background:color-mix(in srgb,var(--cx-face) 24%,var(--hfx-color-surface-card,var(--hfx-color-surface,light-dark(#ffffff,#16181c))));color:color-mix(in srgb,var(--cx-face) 45%,var(--hfx-color-text-primary,var(--hfx-color-text,light-dark(#16181c,#f2f3f5))));box-shadow:0 0 0 calc(1.5 * var(--hfx-border-width,1px)) var(--cx-ev-bg,var(--hfx-color-surface-card,var(--hfx-color-surface,light-dark(#ffffff,#16181c))));font-size:calc(var(--cx-face-size) / 2);font-weight:var(--hfx-weight-semibold,600);line-height:1;letter-spacing:0;overflow:hidden;user-select:none;}
4
+ .cx-cal-face > img{width:100%;height:100%;object-fit:cover;}
5
+ .cx-cal-face-icon{background:transparent;box-shadow:none;font-size:calc(var(--cx-face-size) * .72);}
6
+ .cx-cal-faces > .cx-cal-face + .cx-cal-face{margin-inline-start:calc(-1 * var(--hfx-space-0-5,2px));}
7
+ .cx-cal-face-more{background:var(--hfx-color-surface-card,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));color:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));}
8
+ .cx-cal-ev.cx-cal-faced::before{display:none;}
9
+ .cx-cal-slots .cx-cal-ev-block.cx-cal-faced:not(.cx-cal-marker){flex-flow:row wrap;align-content:flex-start;align-items:center;column-gap:var(--hfx-space-1,0.25rem);}
10
+ .cx-cal-slots .cx-cal-ev-block.cx-cal-faced:not(.cx-cal-short,.cx-cal-marker) > :not(.cx-cal-faces,.cx-cal-ev-time,.cx-cal-ico){flex:1 0 100%;min-width:0;}
11
+ .cx-cal-slots .cx-cal-ev-block.cx-cal-faced.cx-cal-short > .cx-cal-faces{order:-2;}
12
+ .cx-cal-slots .cx-cal-ev-block.cx-cal-short .cx-cal-faces > .cx-cal-face + .cx-cal-face{display:none;}
13
+ .cx-cal-slots .cx-cal-ev-block.cx-cal-short .cx-cal-faces[data-cx-more]::after{display:inline;}
14
+ @container (width >= 7.5em){
15
+ .cx-cal-slots .cx-cal-ev-block.cx-cal-faced.cx-cal-short > .cx-cal-ev-title{max-width:calc(100% - var(--hfx-icon-md,16px) - var(--hfx-space-0-5,2px) - var(--hfx-space-1,0.25rem));}
16
+ .cx-cal-slots .cx-cal-ev-block.cx-cal-faced.cx-cal-short:has(> .cx-cal-faces[data-cx-more]) > .cx-cal-ev-title{max-width:calc(100% - var(--hfx-icon-md,16px) - var(--hfx-space-5,1.5rem) - var(--hfx-space-1,0.25rem));}
17
+ }
18
+ .cx-cal-ev-block.cx-cal-faced > .cx-cal-ico{display:none;}
19
+ .cx-cal-ev:is(.cx-cal-ev-bar,.cx-cal-ev-block,.cx-cal-ev-lane) .cx-cal-face{--cx-ev-bg:var(--cx-ev);}
20
+ .cx-cal-faces[data-cx-more]::after{display:none;content:attr(data-cx-more);margin-inline-start:var(--hfx-space-0-5,2px);font-size:var(--hfx-type-caption-size,0.75rem);font-weight:var(--hfx-weight-semibold,600);}
21
+ @container (width < 9em){.cx-cal-ev-block .cx-cal-faces > .cx-cal-face + .cx-cal-face{margin-inline-start:calc(-1 * var(--hfx-space-1,0.25rem));}}
22
+ @container (width < 7.5em){.cx-cal-slots .cx-cal-ev-block.cx-cal-short > .cx-cal-faces{display:none;}}
23
+ @container (width < 6.5em){
24
+ .cx-cal-ev-block .cx-cal-faces > .cx-cal-face + .cx-cal-face{display:none;}
25
+ .cx-cal-ev-block .cx-cal-faces[data-cx-more]::after{display:inline;}
26
+ }
27
+ :is(.cx-cal-ev-bar,.cx-cal-ev-chip,.cx-cal-ev-lane) .cx-cal-face{--cx-face-size:var(--hfx-icon-md,16px);}
28
+ .cx-cal-ev-item .cx-cal-face{--cx-face-size:calc(var(--hfx-icon-lg,20px) + var(--hfx-space-0-5,2px));}
29
+ .cx-cal-ev-item > .cx-cal-faces{align-self:center;}
30
+ .cx-cal-legend .cx-cal-face{--cx-face-size:var(--hfx-icon-lg,20px);margin-inline-start:calc(-1 * var(--hfx-space-1,0.25rem));box-shadow:none;}
31
+ .cx-cal-src-item .cx-cal-face{margin-inline-start:0;}
32
+ .cx-cal-src[aria-pressed="false"] .cx-cal-face{filter:grayscale(1);opacity:.55;}
33
+ .cx-cal-det-owners{display:flex;flex-wrap:wrap;gap:var(--hfx-space-1,0.25rem) var(--hfx-space-3,0.75rem);margin:0;}
34
+ .cx-cal-det-owner{display:inline-flex;align-items:center;gap:var(--hfx-space-1-5,6px);color:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));}
35
+ .cx-cal-ev.cx-cal-past{color:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));transition:background-color .15s ease;}
36
+ .cx-cal-ev.cx-cal-past:is(.cx-cal-ev-bar,.cx-cal-ev-block,.cx-cal-ev-lane){--cx-cal-past-bg:color-mix(in srgb,var(--cx-ev) calc(var(--cx-cal-fade,.4) * 25%),var(--hfx-color-surface-card,var(--hfx-color-surface,light-dark(#ffffff,#16181c))));background:var(--cx-cal-past-bg);color:var(--hfx-color-text-primary,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)));}
37
+ .cx-cal-ev.cx-cal-past:is(.cx-cal-ev-bar,.cx-cal-ev-block,.cx-cal-ev-lane) .cx-cal-face{--cx-ev-bg:var(--cx-cal-past-bg);}
38
+ .cx-cal-ev.cx-cal-past:is(.cx-cal-ev-bar,.cx-cal-ev-block,.cx-cal-ev-lane) :is(.cx-cal-ev-time,.cx-cal-ev-sub,.cx-cal-ico){color:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));opacity:1;}
39
+ .cx-cal-ev.cx-cal-past::before,.cx-cal-ev.cx-cal-past .cx-cal-face > img{opacity:var(--cx-cal-fade,.4);filter:saturate(.5);}
40
+ .cx-cal-ev.cx-cal-past:is(:hover,:focus-visible),.cx-cal-arow:focus-within .cx-cal-ev.cx-cal-past{background:var(--cx-ev-bg);color:var(--hfx-color-text-primary,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)));}
41
+ .cx-cal-ev.cx-cal-past:is(:hover,:focus-visible)::before,.cx-cal-ev.cx-cal-past:is(:hover,:focus-visible) .cx-cal-face > img,.cx-cal-arow:focus-within .cx-cal-past .cx-cal-face > img{opacity:1;filter:none;}
42
+ .cx-cal-arow:has(.cx-cal-past) > .cx-cal-atime{color:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));}
43
+ .cx-cal-notes{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hfx-space-1,0.25rem);min-width:0;}
44
+ .cx-cal-note{--cx-note:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));display:inline-flex;align-items:center;gap:var(--hfx-space-1,0.25rem);max-width:100%;padding:0 var(--hfx-space-1-5,6px);border-radius:var(--hfx-radius-pill,999px);background:color-mix(in srgb,var(--cx-note) 12%,transparent);color:color-mix(in srgb,var(--cx-note) 80%,var(--hfx-color-text-primary,var(--hfx-color-text,light-dark(#16181c,#f2f3f5))));font-size:var(--hfx-type-caption-size,0.75rem);font-weight:var(--hfx-weight-semibold,600);line-height:var(--hfx-type-caption-line,1.35);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
45
+ .cx-cal-note-host{background:transparent;padding:0;}
46
+ .cx-cal-dayhead:has(> .cx-cal-notes){flex-wrap:wrap;row-gap:var(--hfx-space-0-5,2px);}
47
+ .cx-cal-dayhead > .cx-cal-notes{flex:1 0 100%;justify-content:center;overflow:hidden;}
48
+ .cx-cal-lhead > .cx-cal-notes{margin-inline-start:auto;justify-content:flex-end;}
49
+ .cx-cal-lhead:has(> .cx-cal-wknum) > .cx-cal-notes{margin-inline-start:var(--hfx-space-1-5,6px);}
50
+ .cx-cal-ahead-c > .cx-cal-notes,.cx-cal-daylist-h > .cx-cal-notes{margin-inline-start:var(--hfx-space-2,0.5rem);}
51
+ .cx-cal-month .cx-cal-day > .cx-cal-notes{float:inline-end;max-width:70%;margin-top:var(--hfx-space-0-5,2px);flex-wrap:nowrap;overflow:hidden;}
52
+ .cx-cal-boxes .cx-cal-lday > .cx-cal-ev-item{--cx-cal-bar:calc(var(--hfx-indicator-width,2px) + var(--hfx-border-width,1px));padding:var(--hfx-space-1-5,6px) var(--hfx-space-2,0.5rem);border-radius:var(--hfx-radius-sm,4px);background:var(--cx-ev-bg);box-shadow:inset var(--cx-cal-bar) 0 0 var(--cx-ev);}
53
+ :where(.cx-cal-rtl) .cx-cal-boxes .cx-cal-lday > .cx-cal-ev-item{box-shadow:inset calc(-1 * var(--cx-cal-bar)) 0 0 var(--cx-ev);}
54
+ .cx-cal-boxes .cx-cal-lday > .cx-cal-ev-item::before{display:none;}
55
+ .cx-cal-boxes .cx-cal-lday > .cx-cal-ev-item:focus-visible{outline:var(--hfx-focus-width,2px) solid var(--hfx-color-focus-ring,light-dark(#02726a,#37c9b8));outline-offset:var(--hfx-focus-offset,2px);}
56
+ .cx-cal-list.cx-cal-boxes:not(.cx-cal-list-day):not(.cx-cal-stack) .cx-cal-lday > .cx-cal-ev-item.cx-cal-faced > .cx-cal-faces{order:0;}
57
+ .cx-cal-stack .cx-cal-lrow{grid-template-columns:minmax(0,1fr);}
58
+ .cx-cal-stack .cx-cal-lday{border-inline-start:0;border-top:var(--hfx-border-width,1px) solid var(--hfx-color-surface-line,var(--hfx-color-border,light-dark(#e2e4e7,#272a30)));padding:var(--hfx-space-2,0.5rem) var(--hfx-space-3,0.75rem);}
59
+ .cx-cal-stack .cx-cal-lday:first-child{border-top:0;}
60
+ .cx-cal-list.cx-cal-stack .cx-cal-lday > .cx-cal-ev-item > .cx-cal-ev-title{flex:1 1 auto;order:0;}
61
+ .cx-cal-list.cx-cal-stack .cx-cal-lday > .cx-cal-ev-item > .cx-cal-ev-time{order:-1;}
62
+ .cx-cal-list.cx-cal-stack .cx-cal-lday > .cx-cal-ev-item > .cx-cal-faces{order:-2;}
63
+ .cx-cal-stack .cx-cal-lday > .cx-cal-empty{display:none;}
64
+ .cx-cal-reset{border-color:color-mix(in srgb,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)) 45%,var(--hfx-color-surface-line,var(--hfx-color-border,light-dark(#e2e4e7,#272a30))));background:var(--hfx-color-accent-subtle,light-dark(#e7f1f1,#1b3435));color:var(--hfx-color-accent-text,light-dark(#02726a,#37c9b8));font-weight:var(--hfx-weight-semibold,600);}
65
+ .cx-cal-reset[hidden]{display:none;}
66
+ @media (forced-colors:active){
67
+ .cx-cal-face{forced-color-adjust:none;border:var(--hfx-border-width,1px) solid CanvasText;background:Canvas;color:CanvasText;}
68
+ .cx-cal-ev.cx-cal-past{text-decoration:line-through;}
69
+ }
70
+ @media print{.cx-cal-reset{display:none !important;}.cx-cal-ev.cx-cal-past .cx-cal-face > img{opacity:1;filter:none;}}
71
+ @media (prefers-reduced-motion:reduce){.cx-cal-ev.cx-cal-past{transition:none;}}
@@ -0,0 +1,38 @@
1
+ (function(global){"use strict";const installed=new WeakSet();const part={version:"c2be4b1ddf96a778",requires:["calendar"],install(context){if(installed.has(context.DataGrid.prototype))return;const{DataGrid,h,setText,fill,gridButton,gridFreeze,toneVariable}=context;const{CAL_DAY,CAL_GUTTER,calCount,calDayText,calParseDay,calDow,calSameOrigin,calSafeTone,calInvalid}=DataGrid.prototype.calKit;const CAL_SCREEN_LABELS={calendarReset:"Reset",calendarSharedBy:"Shared by {names}"};const CAL_IMAGE=/^data:image\/(?:png|jpeg|gif|webp|svg\+xml);base64,[A-Za-z0-9+/]+=*$/;
2
+ function calFace(item,name){const{avatar,initials,icon}=item;if(avatar===undefined&&initials===undefined&&icon===undefined)return null;const short=(text,most)=>typeof text==="string"&&!!text.trim()&&[...(typeof Intl.Segmenter==="function"?new Intl.Segmenter().segment(text.trim()):text.trim())].length<=most;if(avatar!==undefined&&!(typeof avatar==="string"&&(avatar.length<=100000&&CAL_IMAGE.test(avatar)||calSameOrigin(avatar)))||
3
+ initials!==undefined&&!short(initials,3)||icon!==undefined&&!short(icon,4))
4
+ calInvalid(name+" has an avatar (a same-origin address or a base64 data:image URL), initials (1 to 3 characters) or an icon (1 to 4 characters).");return{avatar:avatar??null,initials:initials?.trim()??null,icon:icon?.trim()??null}}
5
+ function calScreenSettings(input,settings){const integer=(name,min,max)=>{const value=input[name];if(value!==undefined&&(!Number.isInteger(value)||value<min||value>max))calInvalid("calendar "+name+" is an integer from "+min+" to "+max+".");return value??null};for(const source of settings.sources)source.face=calFace(source.face,"calendar source "+source.id);const faces=input.faces??[];if(!Array.isArray(faces)||faces.length>1000)calInvalid("calendar faces are a list of at most 1000.");settings.faces=new Map();for(const item of faces){if(!item||typeof item!=="object"||Array.isArray(item)||Object.keys(item).some(key=>!["resource","avatar","initials","icon"].includes(key))||
6
+ typeof item.resource!=="string"||!item.resource||settings.faces.has(item.resource))
7
+ calInvalid("a calendar face names a resource once and has an avatar, initials or an icon.");settings.faces.set(item.resource,calFace(item,"calendar face "+item.resource)||calInvalid("calendar face "+item.resource+" needs an avatar, initials or an icon."))}
8
+ const merge=input.merge;if(merge!==undefined&&typeof merge!=="boolean"&&!(merge&&typeof merge==="object"&&!Array.isArray(merge)&&
9
+ Object.keys(merge).every(key=>key==="tone")&&(merge.tone===undefined||calSafeTone(merge.tone))))
10
+ calInvalid("calendar merge is true or { tone }.");settings.merge=merge?{tone:merge.tone??null}:null;if(input.fadePast!==undefined&&!(typeof input.fadePast==="number"&&input.fadePast>=0.1&&input.fadePast<=0.9))calInvalid("calendar fadePast is a number from 0.1 to 0.9.");settings.fadePast=input.fadePast??null;const notes=input.dayNotes??[];if(!Array.isArray(notes)||notes.length>1000)calInvalid("calendar dayNotes are a list of at most 1000.");settings.dayNotes=new Map();for(const note of notes){const day=typeof note?.date==="string"?calParseDay(note.date):NaN;if(!Number.isFinite(day)||Object.keys(note).some(key=>!["date","text","tone"].includes(key))||typeof note.text!=="string"||!note.text.trim()||
11
+ note.text.length>64||note.tone!==undefined&&!calSafeTone(note.tone))
12
+ calInvalid("a calendar day note has a date (yyyy-MM-dd), a text of 1 to 64 characters and an optional tone.");(settings.dayNotes.get(day)||settings.dayNotes.set(day,[]).get(day)).push({text:note.text.trim(),tone:note.tone??null})}
13
+ settings.listDays=integer("listDays",2,14);settings.dayWidth=integer("dayWidth",60,400);settings.listBelow=integer("listBelow",2,7);if(input.reset!==undefined&&typeof input.reset!=="boolean")calInvalid("calendar reset is a boolean.");settings.reset=input.reset===true}
14
+ const CAL_SCREEN_START=DataGrid.prototype.startCalendar;DataGrid.prototype.startCalendar=function(...args){const result=CAL_SCREEN_START.apply(this,args);const cal=this.cal;if(!cal?.dayNotes||this.calScreenStarted)return result;this.calScreenStarted=true;this.calLabels=Object.freeze({...this.calLabels,...Object.fromEntries(Object.entries(CAL_SCREEN_LABELS).map(([name,text])=>[name,Object.hasOwn(this.labels,name)?this.labels[name]:text]))});const signal=this.lifetime.signal;if(cal.fadePast){this.host.style.setProperty("--cx-cal-fade",String(Math.round((1-cal.fadePast)*100)/ 100));
15
+ const timer=setInterval(()=>this.calMarkPast(),60000);signal.addEventListener("abort",()=>{clearInterval(timer);this.host.style.removeProperty("--cx-cal-fade")},{once:true})}
16
+ this.calHomeSources=new Set(this.calHiddenSources);this.calHomeView=this.calView;this.calScreenReset();if(cal.dayWidth||cal.listDays)this.calStartFit();return result};const CAL_SCREEN_BASE={shown:DataGrid.prototype.calShownEvents,element:DataGrid.prototype.calEventElement,name:DataGrid.prototype.calEventName,details:DataGrid.prototype.calDetailsContent,events:DataGrid.prototype.getCalendarEvents,public:DataGrid.prototype.calPublicEvent,highlights:DataGrid.prototype.calMarkHighlights,legend:DataGrid.prototype.calBuildLegend,link:DataGrid.prototype.calEmitLink};const CAL_FACES_SHOWN=4;function calFaceElement(face,label,color){const element=h("span","cx-cal-face"),fallback=()=>face.initials||face.icon||[...label.trim()][0]||"";element.setAttribute("aria-hidden","true");if(color)element.style.setProperty("--cx-face",color);if(face.avatar){const image=h("img");image.alt="";image.decoding="async";image.draggable=false;image.addEventListener("error",()=>{image.remove();setText(element,fallback())},{once:true});image.src=face.avatar;element.appendChild(image)}else{setText(element,fallback());if(!face.initials)element.classList.add("cx-cal-face-icon")}
17
+ return element}
18
+ Object.assign(DataGrid.prototype,{calSourceColor(source){return source.color||(source.tone?toneVariable(source.tone,false,"var(--hfx-color-accent,light-dark(#11776f,#37c9b8))"):null)},calFacesOf(event){const cal=this.cal,sources=cal.sources;if(event.owners)return event.owners.map(id=>sources.find(source=>source.id===id)).map(source=>({face:source.face||{},label:source.label,color:this.calSourceColor(source)}));const source=event.base?.source!=null?sources.find(item=>item.id===event.base.source):null;if(source?.face)return[{face:source.face,label:source.label,color:this.calSourceColor(source)}];const resource=cal.faces?.size?this.calEventResources(event).find(id=>cal.faces.has(id)):null;return resource!=null?[{face:cal.faces.get(resource),label:this.calResourceName?.(resource)||resource,color:null}]:[]},calShownEvents(events){const shown=CAL_SCREEN_BASE.shown.call(this,events),merge=this.cal.merge;if(!merge)return shown;const order=new Map(this.cal.sources.map((source,index)=>[source.id,index])),groups=new Map(),out=[];for(const event of shown){const source=event.base.source;if(event.background||!order.has(source)){out.push(event);continue}
19
+ const key=JSON.stringify([event.title.trim().toLocaleLowerCase(),event.start,event.end,event.allDay,event.base.location.toLocaleLowerCase()]),list=groups.get(key)||groups.set(key,[]).get(key);const group=list.find(members=>!members.some(member=>member.base.source===source));if(group){group.push(event);continue}
20
+ const members=[event];out.push(members);list.push(members)}
21
+ return out.map(item=>{if(!Array.isArray(item))return item;if(item.length===1)return item[0];const members=item.sort((a,b)=>order.get(a.base.source)- order.get(b.base.source)),first=members[0];return{...first,owners:members.map(member=>member.base.source),members,...merge.tone?{tone:merge.tone,color:null}:{}}})},calEventElement(event,kind,day){const element=CAL_SCREEN_BASE.element.call(this,event,kind,day);if(!this.cal.dayNotes)return element;if(event.owners){element.classList.add("cx-cal-merged");if(this.cal.merge.tone)element.dataset.cxShared="true";if(event.members.some(member=>!member.base.external&&this.linkHighlight?.has(member.key)))element.dataset.cxLinked="true"}
22
+ const faces=element.querySelector(":scope > .cx-cal-ev-title")?this.calFacesOf(event):[];if(faces.length){const group=h("span","cx-cal-faces");if(faces.length>1)group.dataset.cxMore="+" +(faces.length-1);group.setAttribute("aria-hidden","true");for(const item of faces.slice(0,faces.length>CAL_FACES_SHOWN?CAL_FACES_SHOWN-1:CAL_FACES_SHOWN))group.appendChild(calFaceElement(item.face,item.label,item.color));if(faces.length>CAL_FACES_SHOWN){const more=h("span","cx-cal-face cx-cal-face-more");setText(more,"+" +(faces.length-CAL_FACES_SHOWN+1));group.appendChild(more)}
23
+ element.prepend(group);element.classList.add("cx-cal-faced")}
24
+ this.calMarkPast(element);return element},calEventName(event){const name=CAL_SCREEN_BASE.name.call(this,event);if(!event.owners)return name;const names=event.owners.map(id=>this.cal.sources.find(source=>source.id===id).label).join(", ");return name+", "+fill(this.calLabels.calendarSharedBy,{names})},calPublicEvent(event){const plain=CAL_SCREEN_BASE.public.call(this,event);return event.owners?gridFreeze({...plain,owners:event.owners}):plain},getCalendarEvents(){const list=CAL_SCREEN_BASE.events.call(this),events=this.calEvents;return list.some((item,index)=>events[index]?.owners)?gridFreeze(list.map((item,index)=>events[index].owners?gridFreeze({...item,owners:events[index].owners}):item)):list},calDetailsContent(event,titleId){const parts=CAL_SCREEN_BASE.details.call(this,event,titleId),faces=this.cal.dayNotes?this.calFacesOf(event):[];if(faces.length){const owners=h("p","cx-cal-det-owners");for(const{face,label,color}of faces){const item=h("span","cx-cal-det-owner"),text=h("span");setText(text,label);item.append(calFaceElement(face,label,color),text);owners.appendChild(item)}
25
+ parts.splice(2,0,owners)}
26
+ if(!event.base?.external&&event.base?.location){const where=h("p","cx-cal-det-facts");setText(where,event.base.location);parts.splice(2,0,where)}
27
+ return parts},calMarkHighlights(){CAL_SCREEN_BASE.highlights.call(this);const keys=this.linkHighlight;if(keys?.size)for(const element of this.calBody.querySelectorAll(".cx-cal-merged"))
28
+ if(element._calEvent.members.some(member=>!member.base.external&&keys.has(member.key)))element.dataset.cxLinked="true"},calEmitLink(action,events,label,selection){return CAL_SCREEN_BASE.link.call(this,action,events.flatMap(event=>event.members||[event]),label,selection)},calBuildLegend(){const legend=CAL_SCREEN_BASE.legend.call(this);if(legend&&this.cal.dayNotes)for(const source of this.cal.sources)if(source.face){const id=CSS.escape(source.id),swatches=[legend.querySelector('[data-cx-source="'+id+'"] > .cx-cal-src-swatch'),legend.querySelector('[data-cx-source-check="'+id+'"]').nextElementSibling];for(const swatch of swatches)swatch.replaceWith(calFaceElement(source.face,source.label,this.calSourceColor(source)))}
29
+ return legend}});const CAL_SCREEN_DAYS={range:DataGrid.prototype.calRangeOf,step:DataGrid.prototype.calStepDate,count:DataGrid.prototype.calDaysCount,today:DataGrid.prototype.calendarToday,view:DataGrid.prototype.setCalendarView,paint:DataGrid.prototype.calPaint,list:DataGrid.prototype.calDayList};const CAL_FADE_VIEWS=["week","day","days","weekList","dayList","agenda"];Object.assign(DataGrid.prototype,{calMarkPast(element){if(!this.cal.fadePast||!this.calBody)return;const now=Date.now(),on=CAL_FADE_VIEWS.includes(this.calView);for(const item of element?[element]:this.calBody.querySelectorAll(".cx-cal-ev"))
30
+ if(item._calEvent)item.classList.toggle("cx-cal-past",on&&this.calDisplaySpan(item._calEvent).end<=now)},calPaint(options){CAL_SCREEN_DAYS.paint.call(this,options);if(!this.cal.dayNotes||!this.calBody)return;const list=this.calBody.querySelector(".cx-cal-list");if(list&&(this.cal.dayWidth||this.cal.listDays||this.cal.listBelow)){list.classList.add("cx-cal-boxes");list.classList.toggle("cx-cal-stack",this.calStacked())}
31
+ this.calDayNotes()},calDayNotes(){if(!this.cal.dayNotes.size&&typeof this.opts.calendar?.dayHeader!=="function")return;const heads=[];for(const head of this.calBody.querySelectorAll(".cx-cal-dayhead[data-cx-day]"))heads.push([head,head,head]);for(const cell of this.calBody.querySelectorAll(".cx-cal-lday[data-cx-day]"))heads.push([cell,cell.querySelector(".cx-cal-lhead"),cell]);for(const cell of this.calBody.querySelectorAll(".cx-cal-month:not(.cx-cal-mini) .cx-cal-day[data-cx-day]"))heads.push([cell,this.calPhone?null:cell,cell]);for(const group of this.calBody.querySelectorAll(".cx-cal-agroup"))heads.push([group.querySelector(".cx-cal-arow"),group.querySelector(".cx-cal-ahead-c"),null]);for(const[dated,target,named]of heads){const notes=this.calNotesOf(Number(dated.dataset.cxDay));if(!notes)continue;notes.box.setAttribute("aria-hidden",String(!!named));target?.appendChild(notes.box);if(named)named.setAttribute("aria-label",named.getAttribute("aria-label")+ ", "+notes.texts.join(", "))}},calNotesOf(day){const hook=this.opts.calendar?.dayHeader,box=h("span","cx-cal-notes"),texts=[];for(const note of this.cal.dayNotes.get(day)||[]){const item=h("span","cx-cal-note");setText(item,note.text);if(note.tone)item.style.setProperty("--cx-note",toneVariable(note.tone,false,"var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc))"));box.appendChild(item);texts.push(note.text)}
32
+ if(typeof hook==="function"){const element=h("span","cx-cal-note cx-cal-note-host");try{const answer=hook({day:calDayText(day),events:this.calEventsOn(day).length,view:this.calView,element,labels:this.calLabels});if(typeof answer==="string"&&answer.trim())setText(element,answer.trim());if(answer===true||typeof answer==="string"&&answer.trim()){box.appendChild(element);if(element.textContent.trim())texts.push(element.textContent.trim())}}catch(error){this.emit("error",{error})}}
33
+ return box.childNodes.length?{box,texts}:null},calDayList(day){const list=CAL_SCREEN_DAYS.list.call(this,day),notes=this.cal.dayNotes&&this.calNotesOf(day);if(notes)list.querySelector(".cx-cal-daylist-h").append(" ",notes.box);return list},calOwnDays(view){return view==="days"?CAL_SCREEN_DAYS.count.call(this):view==="weekList"&&this.cal.listDays||7-this.cal.hidden.size},calFitDays(view){const own=this.calOwnDays(view),width=this.calRoot?.clientWidth||this.host.clientWidth;return this.cal.dayWidth&&width?Math.max(1,Math.min(own,Math.floor((width -(view==="weekList"?0:CAL_GUTTER))/ this.cal.dayWidth))) : own;
34
+ },calStacked(){return!!this.cal.listBelow&&this.calView==="weekList"&&this.calFitDays("weekList")<this.cal.listBelow},calRunDays(view){const cal=this.cal;if(!cal.dayNotes||!["week","days","weekList"].includes(view)||!cal.dayWidth&&!(view==="weekList"&&cal.listDays))return 0;const own=this.calOwnDays(view),fit=view==="weekList"&&cal.listBelow&&this.calFitDays(view)<cal.listBelow?own:this.calFitDays(view);return view==="week"||view==="weekList"&&!cal.listDays?(fit<own?fit:0):fit},calFitStart(view,day){const run=this.calRunDays(view);if(!run)return day;const own=view==="week"||view==="weekList"&&!this.cal.listDays?CAL_SCREEN_DAYS.range.call(this,view,day):this.calRunRange(day,this.calOwnDays(view));const shown=this.calShownDays(own.firstDay,own.lastDay),today=this.calZone.day(Date.now()),anchor=shown.includes(today)?today:day;const at=Math.max(0,shown.findIndex(item=>item>=anchor));return shown[Math.max(0,Math.min(at,shown.length-run))]??day},calRunRange(day,count){let last=day;for(let shown=0;shown<count;last++)if(!this.cal.hidden.has(calDow(last)))shown++;return{firstDay:day,lastDay:last-1}},calRangeOf(view,date){const run=this.calRunDays(view);return run?this.calRunRange(date,run):CAL_SCREEN_DAYS.range.call(this,view,date)},calDaysCount(){return this.calRunDays("days")||CAL_SCREEN_DAYS.count.call(this)},calStepDate(direction){const run=this.calRunDays(this.calView);if(!run)return CAL_SCREEN_DAYS.step.call(this,direction);if(direction>0)return this.calShownDay(this.calRangeOf(this.calView,this.calDate).lastDay+1,1);let day=this.calDate;for(let shown=0;shown<run;){day--;if(!this.cal.hidden.has(calDow(day)))shown++}
35
+ return day},calendarToday(){if(!this.calRunDays(this.calView))return CAL_SCREEN_DAYS.today.call(this);const today=this.calClampDay(this.calZone.day(Date.now()));return this.calGo(this.calFitStart(this.calView,today),this.calView,today)},setCalendarView(view){if(!this.cal?.views.includes(view)||!this.calRunDays(view))return CAL_SCREEN_DAYS.view.call(this,view);const day=this.calFocus?.day??this.calDate;return this.calGo(this.calFitStart(view,day),view,day)},calStartFit(){const key=()=>this.calView+":"+this.calRunDays(this.calView)+ ":"+this.calStacked();if(this.calRunDays(this.calView)){this.calDate=this.calFitStart(this.calView,this.calDate);this.calRange=this.calRangeOf(this.calView,this.calDate)}
36
+ let last=key(),frame=0;const observer=new ResizeObserver(()=>{if(frame)return;frame=requestAnimationFrame(()=>{frame=0;const next=key();if(next===last||this.destroyed||!this.calRange){last=next;return}
37
+ const view=this.calView,sameView=next.split(":")[0]===last.split(":")[0];last=next;if(sameView)this.calGo(this.calFitStart(view,this.calRange.firstDay),view,this.calFocus?.day??this.calDate)})});observer.observe(this.calRoot);this.lifetime.signal.addEventListener("abort",()=>{observer.disconnect();cancelAnimationFrame(frame)},{once:true})}});const CAL_SCREEN_RESET={sync:DataGrid.prototype.calSyncBar,toggle:DataGrid.prototype.calToggleSource};Object.assign(DataGrid.prototype,{calScreenReset(){if(!this.cal.reset)return;const button=this.calResetButton=gridButton(this.calLabels.calendarReset,()=>this.resetCalendar().catch(error=>this.emit("error",{error})));button.classList.add("cx-btn","cx-cal-reset");button.hidden=true;this.calTodayButton.parentElement.appendChild(button);this.calSyncReset()},calHome(){return{view:this.calHomeView||this.cal.view,day:this.calClampDay(this.cal.date??this.calZone.day(Date.now()))}},calHomeDate(home){const view=home.view,date=this.calFitStart?.(view,home.day)??home.day;return view==="day"||view==="days"?this.calShownDay(date,1):date},calResetNeeded(){const home=this.calHome(),range=this.calRange,hidden=this.calHiddenSources,start=this.calHomeSources;if(!range)return false;const homeRange=this.calView===home.view?this.calRangeOf(home.view,this.calHomeDate(home)):null;return!homeRange||homeRange.firstDay!==range.firstDay||homeRange.lastDay!==range.lastDay||this.calZoom!==this.cal.zoom||
38
+ hidden.size!==start.size||[...hidden].some(id=>!start.has(id))},calSyncReset(){const button=this.calResetButton;if(!button)return;const needed=this.calResetNeeded();if(!needed&&document.activeElement===button)this.calTodayButton.focus();button.hidden=!needed},calSyncBar(announce){CAL_SCREEN_RESET.sync.call(this,announce);this.calSyncReset()},calToggleSource(id,show){const visible=CAL_SCREEN_RESET.toggle.call(this,id,show);this.calSyncReset();return visible},async resetCalendar(){const home=this.calHome(),start=this.calHomeSources||new Set(this.cal.sources.filter(source=>source.hidden).map(source=>source.id));for(const source of this.cal.sources)if(this.calHiddenSources.has(source.id)!==start.has(source.id))this.calToggleSource(source.id,!start.has(source.id));this.calZoom=this.cal.zoom;return this.calGo(this.calHomeDate(home),home.view,home.day)}});DataGrid.prototype.calKit.calScreenSettings=calScreenSettings;installed.add(context.DataGrid.prototype)}};(global.CanopyXParts||=[]).push(["calendar-screen",part])})(typeof window!=="undefined"?window:globalThis);
@@ -102,13 +102,16 @@
102
102
  inset-inline-start:calc(var(--cx-cal-gutter) + (100% - var(--cx-cal-gutter)) * (var(--d) + var(--c) / var(--k)) / var(--cx-cal-n) + var(--cx-size-2px));width:calc((100% - var(--cx-cal-gutter)) * var(--sp) / var(--k) / var(--cx-cal-n) - var(--cx-size-4px));
103
103
  top:calc(var(--t) * var(--cx-cal-ppm) + var(--cx-size-1px));height:calc(var(--h) * var(--cx-cal-ppm) - var(--cx-size-2px));}
104
104
  .cx-cal-ev-block > .cx-cal-ev-title{font-weight:600;overflow:hidden;flex:none;}
105
- .cx-cal-ev-block > .cx-cal-ev-time{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:none;}
105
+ .cx-cal-ev-block > .cx-cal-ev-time{white-space:nowrap;flex:none;}
106
106
  .cx-cal-ev-block > :is(.cx-cal-ev-time,.cx-cal-ev-sub){font-size:var(--cx-size-12px);}
107
107
  .cx-cal-ev-block > .cx-cal-ico{position:absolute;inset-inline-end:var(--cx-size-4px);top:var(--cx-size-4px);}
108
108
  .cx-cal-ev-block > .cx-cal-shared{position:absolute;inset-inline-end:var(--cx-size-4px);top:var(--cx-size-2px);font-size:var(--cx-size-10px);line-height:var(--cx-size-14px);}
109
109
  .cx-cal-ev-block:has(> .cx-cal-shared) > .cx-cal-ev-time{padding-inline-end:var(--cx-size-56px);}
110
110
  .cx-cal-ev-block:has(> .cx-cal-shared) > .cx-cal-ico{display:none;}
111
- .cx-cal-slots .cx-cal-ev-block.cx-cal-short{flex-direction:row;align-items:center;gap:var(--cx-size-4px);white-space:nowrap;}
111
+ .cx-cal-slots .cx-cal-ev-block:not(.cx-cal-marker){container-type:inline-size;}
112
+ .cx-cal-slots .cx-cal-ev-block:not(.cx-cal-marker) > .cx-cal-ev-title{order:-1;}
113
+ .cx-cal-slots .cx-cal-ev-block.cx-cal-short{flex-flow:row wrap;align-content:flex-start;align-items:center;row-gap:100%;column-gap:var(--hfx-space-1,0.25rem);white-space:nowrap;}
114
+ @container (width < 4.5em){.cx-cal-slots .cx-cal-ev-block > .cx-cal-ev-time{display:none;}}
112
115
  .cx-cal-slots .cx-cal-ev-block:is(.cx-cal-short,.cx-cal-marker) > .cx-cal-ev-title{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;}
113
116
  .cx-cal-slots .cx-cal-ev-block:is(.cx-cal-short,.cx-cal-marker) > .cx-cal-ev-time{flex:none;}
114
117
  .cx-cal-slots .cx-cal-ev-block.cx-cal-short > :is(.cx-cal-ev-sub,.cx-cal-ev-status){display:none;}
@@ -266,7 +269,16 @@ top:calc(var(--t) * var(--cx-cal-ppm) + var(--cx-size-1px));height:calc(var(--h)
266
269
  :is(.cx-cal-create-actions,.cx-cal-ask-actions){display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--cx-size-6px);margin-top:var(--cx-size-6px);}
267
270
  .cx-cal-ask-actions{flex-direction:column;align-items:stretch;}
268
271
  .cx-cal-ask-actions .cx-btn{justify-content:flex-start;}
269
- .cx-cal-legend{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cx-size-6px);padding:0 var(--cx-size-12px) var(--cx-size-8px);}
272
+ .cx-cal-legend{position:relative;display:flex;align-items:center;gap:var(--cx-size-6px);min-width:0;padding:0 var(--cx-size-12px) var(--cx-size-8px);}
273
+ .cx-cal-srcs{display:flex;align-items:center;gap:var(--hfx-space-1-5,6px);min-width:0;overflow:hidden;}
274
+ .cx-cal-srcs > .cx-cal-src{flex:none;}
275
+ .cx-cal-src-menu{--cx-cal-menu-room:var(--cx-size-360px);position:absolute;inset-inline-start:var(--hfx-space-3,0.75rem);top:100%;z-index:var(--hfx-z-popover,1000);display:flex;flex-direction:column;min-width:var(--cx-size-180px);max-height:min(var(--cx-size-60vh),var(--cx-cal-menu-room));overflow:auto;padding:var(--hfx-space-1,0.25rem);background:var(--hfx-color-surface-raised,light-dark(#ffffff,#1e2126));border:var(--hfx-border-width,1px) solid var(--hfx-color-surface-line,var(--hfx-color-border,light-dark(#e2e4e7,#272a30)));border-radius:var(--hfx-radius-overlay,var(--hfx-radius-lg,10px));box-shadow:var(--hfx-elevation-2,0 1px 2px rgba(22,24,28,.05),0 6px 18px -10px rgba(22,24,28,.18));}
276
+ .cx-cal-src-menu[hidden]{display:none;}
277
+ .cx-cal-src-menu.cx-cal-src-up{top:auto;bottom:100%;}
278
+ .cx-cal-src-item{display:flex;align-items:center;gap:var(--hfx-space-2,0.5rem);min-height:var(--hfx-control-height-sm,calc(28px - var(--cx-compact,0) * 4px));padding:0 var(--hfx-space-2,0.5rem);border-radius:var(--hfx-radius-sm,4px);font-size:var(--hfx-type-small-size,0.8125rem);cursor:pointer;}
279
+ .cx-cal-src-item:hover{background:var(--hfx-color-hover,light-dark(#f5f5f5,#232529));}
280
+ .cx-cal-src-item > input{margin:0;accent-color:var(--cx-ev,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)));}
281
+ @media (any-pointer:coarse){.cx-cal-src-item{min-height:var(--hfx-control-height-lg,calc(44px - var(--cx-compact,0) * 8px));}}
270
282
  .cx-cal-src-swatch{width:var(--cx-size-10px);height:var(--cx-size-10px);border-radius:50%;background:var(--cx-ev,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)));border:var(--cx-size-2px) solid var(--cx-ev,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)));}
271
283
  .cx-cal-src[aria-pressed="true"]{border-color:var(--hfx-color-surface-line,var(--hfx-color-border,light-dark(#e2e4e7,#272a30)));background:var(--hfx-color-surface-card,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));color:var(--hfx-color-text-primary,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)));}
272
284
  .cx-cal-src[aria-pressed="false"]{color:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));}
@@ -1,4 +1,4 @@
1
- (function(global){"use strict";const installed=new WeakSet();const part={version:"e11aad6b723ddf23",requires:["ui-menu"],install(context){if(installed.has(context.DataGrid.prototype))return;const{toneVariable,bindContextMenu,DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,HostCellContext,disposeHostSlot,loadPart,PROTOCOL}=context;const CALENDAR_LABELS={calendarToday:"Today",calendarPrevious:"Previous period",calendarNext:"Next period",calendarViews:"Calendar view",calendarMonth:"Month",calendarWeek:"Week",calendarDay:"Day",calendarDays:"{count} days",calendarAgenda:"Agenda",calendarYear:"Year",calendarTimeline:"Timeline",calendarGoTo:"Go to date",calendarAllDay:"All day",calendarMore:"+{count} more",calendarMoreLabel:"Show {count} more events on {date}",calendarDayEvents:"Events on {date}",calendarNoEvents:"No events in this period",calendarEvents:"[one]{count} event[other]{count} events",calendarShowing:"{view}, {range}",calendarRepeats:"Repeats",calendarTruncated:"Showing the first {count} events. Narrow the period or the filters to see the rest.",calendarLoading:"Loading events…",calendarLoadError:"Could not load events: {error}",calendarNow:"Now",calendarZoom:"Zoom",calendarZoomHour:"Hours",calendarZoomDay:"Days",calendarZoomWeek:"Weeks",calendarZoomMonth:"Months",calendarZoomQuarter:"Quarters",calendarResources:"Resources",calendarCapacity:"Concurrent events",calendarCapacityAt:"{count} at once",calendarBusy:"{hours} h busy",calendarOverlaps:"[one]{count} overlap[other]{count} overlaps",calendarUnavailable:"Unavailable",calendarOutsideHours:"Outside working hours",calendarConflict:"Overlaps {title}",calendarNotAllowed:"{resource} cannot take this event",calendarMoved:"{title} moved to {time}",calendarResized:"{title} now ends {time}",calendarSeriesMoved:"Every occurrence of {title} moved",calendarSeriesTime:"Only the time of a whole series can be moved here.",calendarMoveHelp:"Arrow keys move, Shift with arrow keys changes the end, Alt with Up or Down changes the resource, Enter saves, Escape cancels.",calendarEdit:"Move or resize {title}",calendarSaveFailed:"{title} was not saved: {error}",calendarExport:"iCalendar (.ics)",calendarTimeRange:"{start} – {end}",calendarSelected:"Selected {range}",calendarLane:"{resource}, {events}",calendarHighlighted:"[one]{count} event highlighted[other]{count} events highlighted",calendarMini:"Mini month",calendarWeekList:"Week list",calendarDayList:"Day list",calendarMonths:"Months",calendarWeekNumber:"Week {number}",calendarWeekShort:"W{number}",calendarNewEvent:"New event",calendarEventTitle:"Title",calendarCreate:"Add",calendarCancel:"Cancel",calendarCreated:"{title} added on {time}",calendarReceived:"{title} scheduled on {time}",calendarOccurrenceTitle:"Change a repeating event",calendarOccurrenceReadOnly:"This part of the series cannot be saved because some values are read-only.",calendarEditOccurrence:"Edit this occurrence",calendarRemoveOccurrence:"Remove this occurrence",calendarOccurrenceScope:"Only {date} changes; other dates of {title} stay as they are.",calendarSharedResources:"{count} {resources}",calendarResourceWindow:"{resources} {start}–{end} of {total}",calendarThisEvent:"This event",calendarThisAndFollowing:"This and following events",calendarAllEvents:"All events",calendarSources:"Calendars",calendarImportFailed:"Could not read {source}: {error}",calendarActions:"Actions for {title}",calendarOpen:"Open",calendarMove:"Move",calendarNewHere:"New event here",calendarOutsideRange:"Outside the dates this calendar shows",calendarClose:"Close",calendarDetailsOf:"Details of {title}"};function calLabelsFor(labels){const out={...CALENDAR_LABELS};for(const name of Object.keys(CALENDAR_LABELS))if(Object.hasOwn(labels,name))out[name]=labels[name];return Object.freeze(out)}
1
+ (function(global){"use strict";const installed=new WeakSet();const part={version:"b414f93d261b2b76",requires:["ui-menu"],install(context){if(installed.has(context.DataGrid.prototype))return;const{toneVariable,bindContextMenu,DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,HostCellContext,disposeHostSlot,loadPart,PROTOCOL}=context;const CALENDAR_LABELS={calendarToday:"Today",calendarPrevious:"Previous period",calendarNext:"Next period",calendarViews:"Calendar view",calendarMonth:"Month",calendarWeek:"Week",calendarDay:"Day",calendarDays:"{count} days",calendarAgenda:"Agenda",calendarYear:"Year",calendarTimeline:"Timeline",calendarGoTo:"Go to date",calendarAllDay:"All day",calendarMore:"+{count} more",calendarMoreLabel:"Show {count} more events on {date}",calendarDayEvents:"Events on {date}",calendarNoEvents:"No events in this period",calendarEvents:"[one]{count} event[other]{count} events",calendarShowing:"{view}, {range}",calendarRepeats:"Repeats",calendarTruncated:"Showing the first {count} events. Narrow the period or the filters to see the rest.",calendarLoading:"Loading events…",calendarLoadError:"Could not load events: {error}",calendarNow:"Now",calendarZoom:"Zoom",calendarZoomHour:"Hours",calendarZoomDay:"Days",calendarZoomWeek:"Weeks",calendarZoomMonth:"Months",calendarZoomQuarter:"Quarters",calendarResources:"Resources",calendarCapacity:"Concurrent events",calendarCapacityAt:"{count} at once",calendarBusy:"{hours} h busy",calendarOverlaps:"[one]{count} overlap[other]{count} overlaps",calendarUnavailable:"Unavailable",calendarOutsideHours:"Outside working hours",calendarConflict:"Overlaps {title}",calendarNotAllowed:"{resource} cannot take this event",calendarMoved:"{title} moved to {time}",calendarResized:"{title} now ends {time}",calendarSeriesMoved:"Every occurrence of {title} moved",calendarSeriesTime:"Only the time of a whole series can be moved here.",calendarMoveHelp:"Arrow keys move, Shift with arrow keys changes the end, Alt with Up or Down changes the resource, Enter saves, Escape cancels.",calendarEdit:"Move or resize {title}",calendarSaveFailed:"{title} was not saved: {error}",calendarExport:"iCalendar (.ics)",calendarTimeRange:"{start} – {end}",calendarSelected:"Selected {range}",calendarLane:"{resource}, {events}",calendarHighlighted:"[one]{count} event highlighted[other]{count} events highlighted",calendarMini:"Mini month",calendarWeekList:"Week list",calendarDayList:"Day list",calendarMonths:"Months",calendarWeekNumber:"Week {number}",calendarWeekShort:"W{number}",calendarNewEvent:"New event",calendarEventTitle:"Title",calendarCreate:"Add",calendarCancel:"Cancel",calendarCreated:"{title} added on {time}",calendarReceived:"{title} scheduled on {time}",calendarOccurrenceTitle:"Change a repeating event",calendarOccurrenceReadOnly:"This part of the series cannot be saved because some values are read-only.",calendarEditOccurrence:"Edit this occurrence",calendarRemoveOccurrence:"Remove this occurrence",calendarOccurrenceScope:"Only {date} changes; other dates of {title} stay as they are.",calendarSharedResources:"{count} {resources}",calendarResourceWindow:"{resources} {start}–{end} of {total}",calendarThisEvent:"This event",calendarThisAndFollowing:"This and following events",calendarAllEvents:"All events",calendarSources:"Calendars",calendarImportFailed:"Could not read {source}: {error}",calendarActions:"Actions for {title}",calendarOpen:"Open",calendarMove:"Move",calendarNewHere:"New event here",calendarOutsideRange:"Outside the dates this calendar shows",calendarClose:"Close",calendarDetailsOf:"Details of {title}",calendarSourcesShown:"{shown} of {total}"};function calLabelsFor(labels){const out={...CALENDAR_LABELS};for(const name of Object.keys(CALENDAR_LABELS))if(Object.hasOwn(labels,name))out[name]=labels[name];return Object.freeze(out)}
2
2
  function calCount(grid,template,count,values){return fill(plural(template,count,grid.lang),{...values,count:numberFormat(grid.lang).format(count)})}
3
3
  const CAL_DAY=86400000,CAL_MINUTE=60000,CAL_HOUR=3600000;const calZones=new Map();function calDayNumber(y,m,d){return Math.floor(Date.UTC(y,m-1,d)/ CAL_DAY); }
4
4
  function calDayParts(day){const date=new Date(day*CAL_DAY);return{y:date.getUTCFullYear(),m:date.getUTCMonth()+ 1,d:date.getUTCDate(),dow:date.getUTCDay()}}
@@ -31,13 +31,13 @@ function calFirstDay(lang){try{const locale=new Intl.Locale(lang||"en-US"),info=
31
31
  function calFormats(lang,zone){const cache=new Map(),timeZone=zone.name==="utc"?"UTC":zone.name==="local"?undefined:zone.name;const make=(options,dayFormat)=>{const key=JSON.stringify(options)+(dayFormat?"d":"t");let format=cache.get(key);if(!format){const settings={...options,timeZone:dayFormat?"UTC":timeZone};try{format=new Intl.DateTimeFormat(lang||undefined,settings)}catch(_){format=new Intl.DateTimeFormat(undefined,settings)}
32
32
  cache.set(key,format)}
33
33
  return format};const day=(options,value)=>make(options,true).format(new Date(value*CAL_DAY));const range=(options,from,to)=>{if(from===to)return day(options,from);const format=make(options,true);try{return format.formatRange(new Date(from*CAL_DAY),new Date(to*CAL_DAY))}catch(_){return format.format(new Date(from*CAL_DAY))+ " – "+format.format(new Date(to*CAL_DAY))}};return{lang,day,range,monthTitle:value=>day({month:"long",year:"numeric"},value),monthName:value=>day({month:"long"},value),monthShort:value=>day({month:"short"},value),weekday:(value,width)=>day({weekday:width||"short"},value),dayNumber:value=>day({day:"numeric"},value),dayHeader:value=>day({weekday:"short",day:"numeric"},value),longDay:value=>day({weekday:"long",day:"numeric",month:"long",year:"numeric"},value),shortDay:value=>day({day:"numeric",month:"short"},value),date:value=>day({day:"numeric",month:"short",year:"numeric"},value),year:value=>day({year:"numeric"},value),dayRange:(from,to)=>range({day:"numeric",month:"short",year:"numeric"},from,to),monthRange:(from,to)=>range({month:"short",year:"numeric"},from,to),time:value=>make({hour:"numeric",minute:"2-digit"}).format(new Date(value)),timeRange:(from,to)=>make({hour:"numeric",minute:"2-digit"}).formatRange(new Date(from),new Date(to)),hour:minutes=>make({hour:"numeric"},true).format(new Date(minutes*CAL_MINUTE)),clock:minutes=>make({hour:"numeric",minute:"2-digit"},true).format(new Date(minutes*CAL_MINUTE)),number:value=>numberFormat(lang).format(value)}}
34
- const CAL_VIEWS=["month","week","day","days","agenda","year","timeline","mini","weekList","dayList","months"],CAL_ZOOMS=["hour","day","week","month","quarter"];const CAL_KEYS=new Set(["start","end","title","subtitle","allDay","resource","resourceIds","status","recurrence","exceptions","series","recurrenceId","display","seriesEnd","view","views","date","days","firstDay","hiddenDays","slotMinutes","minTime","maxTime","scrollTime","workingHours","nowIndicator","eventLimit","eventStyle","timeZone","editable","resources","zoom","zooms","capacity","ranges","availability","limit","phone","toolbar","details","description","tone","source","sources","create","drop","occurrence","weekNumbers","navLinks","validRange","fixedWeeks","outsideDays","span","menu","hover","yearEvents","agendaSpan","months","print"]);const CAL_TONE=/^[a-z][a-z0-9-]{0,31}$/;
34
+ const CAL_SCREEN=["merge","fadePast","dayNotes","listDays","dayWidth","listBelow","reset","faces"],CAL_FACE=["avatar","initials","icon"];const CAL_VIEWS=["month","week","day","days","agenda","year","timeline","mini","weekList","dayList","months"],CAL_ZOOMS=["hour","day","week","month","quarter"];const CAL_KEYS=new Set(["start","end","title","subtitle","allDay","resource","resourceIds","status","recurrence","exceptions","series","recurrenceId","display","seriesEnd","view","views","date","days","firstDay","hiddenDays","slotMinutes","minTime","maxTime","scrollTime","workingHours","nowIndicator","eventLimit","eventStyle","timeZone","editable","resources","zoom","zooms","capacity","ranges","availability","limit","phone","toolbar","details","description","tone","source","sources","create","drop","occurrence","weekNumbers","navLinks","validRange","fixedWeeks","outsideDays","span","menu","hover","yearEvents","agendaSpan","months","print","location",...CAL_SCREEN]);const CAL_TONE=/^[a-z][a-z0-9-]{0,31}$/;
35
35
  function calInvalid(message){throw new Error("CanopyX: "+message)}
36
36
  function calDays(list,name){if(!Array.isArray(list)||list.length>7||new Set(list).size!==list.length||list.some(day=>!Number.isInteger(day)||day<0||day>6))calInvalid(name+" lists weekdays 0 to 6.");return new Set(list)}
37
37
  function calTimeRange(value,name){const start=calMinutes(value?.start),end=calMinutes(value?.end);if(!(start<end))calInvalid(name+" needs a start before its end (HH:mm).");return{start,end}}
38
- function calSettings(grid){const input=grid.view.calendar,columns=new Map(grid.columns.map(column=>[column.id,column]));if(!input||typeof input!=="object"||Array.isArray(input))calInvalid("calendar settings are an object.");for(const key of Object.keys(input))if(!CAL_KEYS.has(key))calInvalid("calendar settings have no '"+key+"'.");const column=(name,kinds,required)=>{const id=input[name];if(id===undefined&&!required)return null;const found=columns.get(id);if(!found||kinds&&!kinds.includes(found.kind))calInvalid("calendar "+name+" names a " +(kinds?kinds.join(" or ")+ " ":"")+ "column.");return found};const settings={start:column("start",["datetime"],true),end:column("end",["datetime"]),allDay:column("allDay",["text"]),title:column("title")||grid.columns.find(item=>item.rowHeader)||grid.columns.find(item=>!item.hidden),subtitle:column("subtitle"),resource:column("resource",["text"]),resourceIds:column("resourceIds",["text"]),status:column("status"),recurrence:column("recurrence",["text"]),exceptions:column("exceptions",["text"]),series:column("series",["text"]),recurrenceId:column("recurrenceId",["datetime"]),display:column("display",["text"]),seriesEnd:column("seriesEnd",["datetime"])};if(!settings.series!==!settings.recurrenceId)calInvalid("calendar series and recurrenceId come together.");const views=input.views===undefined?["month","week","day","agenda"].concat(input.resources?["timeline"]:[]):input.views;if(!Array.isArray(views)||!views.length||new Set(views).size!==views.length||views.some(view=>!CAL_VIEWS.includes(view)))calInvalid("calendar views list unique views.");const view=input.view===undefined?views[0]:input.view;if(!views.includes(view))calInvalid("the calendar's first view must be one of its views.");settings.views=views;settings.view=view;settings.date=input.date===undefined?null:calParseDay(input.date);if(Number.isNaN(settings.date))calInvalid("calendar date is yyyy-MM-dd.");const integer=(name,min,max,fallback)=>{const value=input[name]===undefined?fallback:input[name];if(!Number.isInteger(value)||value<min||value>max)calInvalid("calendar "+name+" is an integer from "+min+" to "+max+".");return value};settings.days=integer("days",2,14,3);settings.firstDay=input.firstDay===undefined?calFirstDay(grid.lang):integer("firstDay",0,6,0);settings.hidden=input.hiddenDays===undefined?new Set():calDays(input.hiddenDays,"calendar hiddenDays");if(settings.hidden.size===7)calInvalid("calendar hiddenDays must leave a day.");settings.slotMinutes=input.slotMinutes===undefined?30:input.slotMinutes;if(![5,10,15,20,30,60].includes(settings.slotMinutes))calInvalid("calendar slotMinutes is 5, 10, 15, 20, 30 or 60.");const time=(name,fallback)=>{const value=input[name]===undefined?fallback:calMinutes(input[name]);if(Number.isNaN(value))calInvalid("calendar "+name+" is HH:mm.");return value};settings.minMinutes=time("minTime",0);settings.maxMinutes=time("maxTime",1440);settings.scrollMinutes=time("scrollTime",480);if(settings.minMinutes>=settings.maxMinutes||settings.minMinutes%settings.slotMinutes||settings.maxMinutes%settings.slotMinutes)
38
+ function calSettings(grid){const input=grid.view.calendar,columns=new Map(grid.columns.map(column=>[column.id,column]));if(!input||typeof input!=="object"||Array.isArray(input))calInvalid("calendar settings are an object.");for(const key of Object.keys(input))if(!CAL_KEYS.has(key))calInvalid("calendar settings have no '"+key+"'.");const column=(name,kinds,required)=>{const id=input[name];if(id===undefined&&!required)return null;const found=columns.get(id);if(!found||kinds&&!kinds.includes(found.kind))calInvalid("calendar "+name+" names a " +(kinds?kinds.join(" or ")+ " ":"")+ "column.");return found};const settings={start:column("start",["datetime"],true),end:column("end",["datetime"]),allDay:column("allDay",["text"]),title:column("title")||grid.columns.find(item=>item.rowHeader)||grid.columns.find(item=>!item.hidden),subtitle:column("subtitle"),resource:column("resource",["text"]),resourceIds:column("resourceIds",["text"]),status:column("status"),recurrence:column("recurrence",["text"]),exceptions:column("exceptions",["text"]),series:column("series",["text"]),recurrenceId:column("recurrenceId",["datetime"]),display:column("display",["text"]),seriesEnd:column("seriesEnd",["datetime"]),location:column("location",["text"])};if(!settings.series!==!settings.recurrenceId)calInvalid("calendar series and recurrenceId come together.");const views=input.views===undefined?["month","week","day","agenda"].concat(input.resources?["timeline"]:[]):input.views;if(!Array.isArray(views)||!views.length||new Set(views).size!==views.length||views.some(view=>!CAL_VIEWS.includes(view)))calInvalid("calendar views list unique views.");const view=input.view===undefined?views[0]:input.view;if(!views.includes(view))calInvalid("the calendar's first view must be one of its views.");settings.views=views;settings.view=view;settings.date=input.date===undefined?null:calParseDay(input.date);if(Number.isNaN(settings.date))calInvalid("calendar date is yyyy-MM-dd.");const integer=(name,min,max,fallback)=>{const value=input[name]===undefined?fallback:input[name];if(!Number.isInteger(value)||value<min||value>max)calInvalid("calendar "+name+" is an integer from "+min+" to "+max+".");return value};settings.days=integer("days",2,14,3);settings.firstDay=input.firstDay===undefined?calFirstDay(grid.lang):integer("firstDay",0,6,0);settings.hidden=input.hiddenDays===undefined?new Set():calDays(input.hiddenDays,"calendar hiddenDays");if(settings.hidden.size===7)calInvalid("calendar hiddenDays must leave a day.");settings.slotMinutes=input.slotMinutes===undefined?30:input.slotMinutes;if(![5,10,15,20,30,60].includes(settings.slotMinutes))calInvalid("calendar slotMinutes is 5, 10, 15, 20, 30 or 60.");const time=(name,fallback)=>{const value=input[name]===undefined?fallback:calMinutes(input[name]);if(Number.isNaN(value))calInvalid("calendar "+name+" is HH:mm.");return value};settings.minMinutes=time("minTime",0);settings.maxMinutes=time("maxTime",1440);settings.scrollMinutes=time("scrollTime",480);if(settings.minMinutes>=settings.maxMinutes||settings.minMinutes%settings.slotMinutes||settings.maxMinutes%settings.slotMinutes)
39
39
  calInvalid("calendar minTime comes before maxTime, both on slot boundaries.");if(input.workingHours!==undefined){const hours=input.workingHours;if(!hours||typeof hours!=="object"||Object.keys(hours).some(key=>!["days","start","end"].includes(key)))calInvalid("calendar workingHours takes days, start and end.");settings.working={...calTimeRange(hours,"calendar workingHours"),days:calDays(hours.days===undefined?[1,2,3,4,5]:hours.days,"calendar workingHours days")}}else settings.working=null;for(const name of["nowIndicator"])if(input[name]!==undefined&&typeof input[name]!=="boolean")calInvalid("calendar "+name+" is a boolean.");settings.now=input.nowIndicator!==false;settings.eventLimit=input.eventLimit===undefined||input.eventLimit==="auto"?"auto":integer("eventLimit",1,20,3);settings.eventStyle=input.eventStyle===undefined?"quiet":input.eventStyle;if(!["quiet","strong"].includes(settings.eventStyle))calInvalid("calendar eventStyle is quiet or strong.");settings.zoneName=input.timeZone===undefined?grid.local?"local":"utc":input.timeZone;if(typeof settings.zoneName!=="string"||!calZone(settings.zoneName))calInvalid("calendar timeZone is utc, local or a time zone the browser knows.");settings.zoneFixed=input.timeZone!==undefined;settings.limit=integer("limit",1,100000,20000);settings.phone=input.phone===undefined?null:input.phone;if(settings.phone!==null&&!views.includes(settings.phone))calInvalid("calendar phone names one of the calendar's views.");settings.editable=calEditable(input.editable,columns,settings);settings.zooms=input.zooms===undefined?CAL_ZOOMS.slice():input.zooms;if(!Array.isArray(settings.zooms)||!settings.zooms.length||new Set(settings.zooms).size!==settings.zooms.length||settings.zooms.some(zoom=>!CAL_ZOOMS.includes(zoom)))
40
- calInvalid("calendar zooms list unique zoom levels.");settings.zoom=input.zoom===undefined?settings.zooms.includes("day")?"day":settings.zooms[0]:input.zoom;if(!settings.zooms.includes(settings.zoom))calInvalid("calendar zoom must be one of its zooms.");settings.resources=calResources(input.resources);settings.capacity=calCapacity(input.capacity);settings.ranges=calRanges(input.ranges);settings.availability=calAvailability(input.availability);calSettingsMore(input,column,settings);return settings}
40
+ calInvalid("calendar zooms list unique zoom levels.");settings.zoom=input.zoom===undefined?settings.zooms.includes("day")?"day":settings.zooms[0]:input.zoom;if(!settings.zooms.includes(settings.zoom))calInvalid("calendar zoom must be one of its zooms.");settings.resources=calResources(input.resources);settings.capacity=calCapacity(input.capacity);settings.ranges=calRanges(input.ranges);settings.availability=calAvailability(input.availability);calSettingsMore(input,column,settings);DataGrid.prototype.calKit.calScreenSettings?.(input,settings);return settings}
41
41
  function calEditable(value,columns,settings){if(value===undefined||value===false)return null;const input=value===true?{}:value;if(!input||typeof input!=="object"||Array.isArray(input)||
42
42
  Object.keys(input).some(key=>!["move","resize","resources","overlap","workingHours","allowedResources","snapMinutes","commit"].includes(key)))
43
43
  calInvalid("calendar editable takes move, resize, resources, overlap, workingHours, allowedResources, snapMinutes and commit.");for(const name of["move","resize","resources","overlap","workingHours"])if(input[name]!==undefined&&typeof input[name]!=="boolean")calInvalid("calendar editable "+name+" is a boolean.");const allowed=input.allowedResources===undefined?null:columns.get(input.allowedResources);if(input.allowedResources!==undefined&&(!allowed||allowed.kind!=="text"))calInvalid("calendar editable allowedResources names a text column.");const snap=input.snapMinutes===undefined?settings.slotMinutes:input.snapMinutes;if(![1,5,10,15,20,30,60].includes(snap))calInvalid("calendar editable snapMinutes is 1, 5, 10, 15, 20, 30 or 60.");if(input.commit!==undefined&&!["auto","manual"].includes(input.commit))calInvalid("calendar editable commit is auto or manual.");return{move:input.move!==false,resize:input.resize!==false&&!!settings.end,resources:input.resources!==false&&!!(settings.resource||settings.resourceIds),overlap:input.overlap!==false,working:!!input.workingHours,allowed,snap,commit:input.commit||"auto"}}
@@ -57,11 +57,11 @@ calInvalid("calendar availability entries take resource, days, start and end.");
57
57
  const CAL_TOOLBAR=["search","filters","columns","views","export","more"],CAL_ID=/^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/;
58
58
  function calSettingsMore(input,column,settings){const flag=(name,fallback)=>{if(input[name]===undefined)return fallback;if(typeof input[name]!=="boolean")calInvalid("calendar "+name+" is a boolean.");return input[name]};const choice=(name,values,fallback)=>{if(input[name]===undefined)return fallback;if(!values.includes(input[name]))calInvalid("calendar "+name+" is "+values.join(", ")+ ".");return input[name]};const toolbar=input.toolbar;if(toolbar!==undefined&&typeof toolbar!=="boolean"&&!(Array.isArray(toolbar)&&new Set(toolbar).size===toolbar.length&&toolbar.every(item=>CAL_TOOLBAR.includes(item))))
59
59
  calInvalid("calendar toolbar is true, false or a list of "+CAL_TOOLBAR.join(", ")+ ".");settings.toolbar=toolbar===undefined||toolbar===true?true:toolbar===false?false:new Set(toolbar);settings.details=choice("details",["drawer","popover"],"drawer");settings.description=column("description",["text"]);settings.tone=column("tone",["text"]);settings.source=column("source",["text"]);settings.sources=calSources(input.sources,settings.source);settings.create=calCreate(input.create,settings);settings.drop=flag("drop",false);if((settings.create||settings.drop)&&(!settings.start.editable||!settings.title?.editable))calInvalid("calendar create and drop need editable start and title columns.");const overrides=!!(settings.series?.editable&&settings.recurrenceId?.editable);settings.occurrence=choice("occurrence",["ask","this","following","all"],overrides?"ask":"all");if(!overrides&&settings.occurrence!=="all")calInvalid("calendar occurrence "+settings.occurrence+" needs editable series and recurrenceId columns.");settings.weekNumbers=input.weekNumbers===undefined||input.weekNumbers===false?false:choice("weekNumbers",["iso","locale"],false);settings.navLinks=flag("navLinks",true);settings.validRange=calValidRange(input.validRange);settings.fixedWeeks=flag("fixedWeeks",false);settings.outsideDays=flag("outsideDays",true);settings.span=calSpan(input.span);settings.menu=flag("menu",true);settings.hover=flag("hover",true);settings.yearEvents=flag("yearEvents",false);settings.print=flag("print",false);settings.agendaSpan=choice("agendaSpan",["day","week","month","year"],"month");if(input.months!==undefined&&(!Number.isInteger(input.months)||input.months<2||input.months>24))calInvalid("calendar months is an integer from 2 to 24.");settings.months=input.months??6}
60
- function calSources(list,sourceColumn){if(list===undefined)return[];if(!Array.isArray(list)||!list.length||list.length>50)calInvalid("calendar sources are a list of 1 to 50.");const ids=new Set();return list.map(item=>{if(!item||typeof item!=="object"||Array.isArray(item)||Object.keys(item).some(key=>!["id","label","tone","ics","url","fetchParams","color","hidden"].includes(key))||
60
+ function calSources(list,sourceColumn){if(list===undefined)return[];if(!Array.isArray(list)||!list.length||list.length>50)calInvalid("calendar sources are a list of 1 to 50.");const ids=new Set();return list.map(item=>{if(!item||typeof item!=="object"||Array.isArray(item)||Object.keys(item).some(key=>!["id","label","tone","ics","url","fetchParams","color","hidden",...CAL_FACE].includes(key))||
61
61
  typeof item.id!=="string"||!CAL_ID.test(item.id)||ids.has(item.id)||typeof item.label!=="string"||!item.label.trim()||item.label.length>256||
62
62
  item.tone!==undefined&&!CAL_TONE.test(item.tone)||item.url!==undefined&&(!calSameOrigin(item.url)||item.ics!==undefined)||
63
63
  item.color!==undefined&&!/^#[0-9a-fA-F]{6}$/.test(item.color) || !calFetchParams(item.fetchParams, item.url) || item.ics !== undefined && !calSameOrigin(item.ics) || item.hidden !== undefined && typeof item.hidden !== "boolean")
64
- calInvalid("a calendar source has a unique id, a label, and optional tone, ics (a same-origin address) and hidden.");if(item.ics===undefined&&item.url===undefined&&!sourceColumn)calInvalid("calendar sources without ics need the source column.");ids.add(item.id);return{id:item.id,label:item.label,tone:calSafeTone(item.tone),ics:item.ics??null,url:item.url??null,fetchParams:item.fetchParams||{},color:item.color??null,hidden:item.hidden===true}})}
64
+ calInvalid("a calendar source has a unique id, a label, and optional tone, ics (a same-origin address) and hidden.");if(item.ics===undefined&&item.url===undefined&&!sourceColumn)calInvalid("calendar sources without ics need the source column.");ids.add(item.id);return{id:item.id,label:item.label,tone:calSafeTone(item.tone),ics:item.ics??null,url:item.url??null,fetchParams:item.fetchParams||{},color:item.color??null,hidden:item.hidden===true,face:item}})}
65
65
  function calFetchParams(value,url){if(value===undefined)return true;return!!url&&value&&typeof value==="object"&&!Array.isArray(value)&&Object.keys(value).length<=50&&
66
66
  Object.entries(value).every(([key,text])=>key.trim()&&key.length<=128&&!["start","end","timeZone"].includes(key)&&typeof text==="string"&&text.length<=2048)}
67
67
  function calSameOrigin(value){if(typeof value!=="string"||!value||value.length>2048||/[\s\\\x00-\x1f\x7f]/.test(value)) return false;
@@ -83,7 +83,7 @@ const calRec=()=>DataGrid.prototype.calKit.calRule?DataGrid.prototype.calKit:nul
83
83
  function calDateOf(value){return typeof value==="string"?calParseDay(value.slice(0,10)):NaN}
84
84
  function calNativeIdentity(id){return /^(json:|grid:)/.test(id) ? "grid:" + id : id; }
85
85
  function calBase(view,row){const cached=CAL_BASES.get(row);if(cached&&cached.view===view&&cached.version===view.calVersion)return cached.base;const cal=view.cal,cells=row.cells,fields=row.external?row.fields:null;const read=column=>column&&!fields?cellValue(cells[column.id]):null,value=name=>fields?fields[name]??null:read(cal[name]);let base=null;const start=calInstant(value("start"));if(Number.isFinite(start)){const allDay=value("allDay")===true||value("allDay")==="true";let end=calInstant(value("end"));if(allDay){const first=calDateOf(value("start")),endText=value("end"),last=calDateOf(endText);const endDay=Number.isFinite(end)&&Number.isFinite(last)?(/T00:00(?::00(?:\.0+)?)?(?:Z|[+-]|$)/.test(endText) ? last : last + 1) : NaN;
86
- base={start:first*CAL_DAY,end:(endDay>first?endDay:first+1)*CAL_DAY}}else base={start,end:Number.isFinite(end)&&end>=start?end:start};const ownTone=cal.tone&&!fields?calSafeTone(String(read(cal.tone)??"").trim()):null;const series=value("series")||null;Object.assign(base,{key:row.id,row,allDay,marker:!allDay&&base.end===base.start,identity:fields?row.id:calNativeIdentity(row.id),seriesIdentity:fields?series:series&&calNativeIdentity(series),title:(fields?fields.title:cellText(cells[cal.title.id],cal.title,view.fmt))||row.id,subtitle:cal.subtitle&&!fields?cellText(cells[cal.subtitle.id],cal.subtitle,view.fmt):"",tone:ownTone||(fields?null:calTone(cal.status,cells))||calSourceTone(cal,fields?row.external:read(cal.source)),source:fields?row.external:cal.source?calResourceOf(read(cal.source)):null,external:!!fields,toneFromStatus:!ownTone&&!fields,resource:calResourceOf(value("resource")),resourceIds:calResourceIds(value("resourceIds")),color:cal.sources?.find(source=>source.id===(fields?row.external:read(cal.source)))?.color,background:cal.display?String(read(cal.display)||"").toLowerCase()==="background":false,rule:null,ruleError:null,seriesZone:allDay?CAL_UTC():fields?.seriesZone?calZone(fields.seriesZone):view.calSeriesZone,series,recurrenceId:calInstant(value("recurrenceId"))});const text=value("recurrence");if(typeof text==="string"&&text.trim()&&!base.series){try{const rec=calRec();if(!rec)throw new Error("CanopyX: the calendar recurrence part is not loaded.");base.rule=rec.calRule(text);Object.assign(base,rec.calExceptions(value("exceptions"),base.seriesZone))}
86
+ base={start:first*CAL_DAY,end:(endDay>first?endDay:first+1)*CAL_DAY}}else base={start,end:Number.isFinite(end)&&end>=start?end:start};const ownTone=cal.tone&&!fields?calSafeTone(String(read(cal.tone)??"").trim()):null;const series=value("series")||null;Object.assign(base,{key:row.id,row,allDay,marker:!allDay&&base.end===base.start,identity:fields?row.id:calNativeIdentity(row.id),seriesIdentity:fields?series:series&&calNativeIdentity(series),title:(fields?fields.title:cellText(cells[cal.title.id],cal.title,view.fmt))||row.id,subtitle:cal.subtitle&&!fields?cellText(cells[cal.subtitle.id],cal.subtitle,view.fmt):"",tone:ownTone||(fields?null:calTone(cal.status,cells))||calSourceTone(cal,fields?row.external:read(cal.source)),source:fields?row.external:cal.source?calResourceOf(read(cal.source)):null,external:!!fields,toneFromStatus:!ownTone&&!fields,resource:calResourceOf(value("resource")),resourceIds:calResourceIds(value("resourceIds")),color:cal.sources?.find(source=>source.id===(fields?row.external:read(cal.source)))?.color,background:cal.display?String(read(cal.display)||"").toLowerCase()==="background":false,rule:null,ruleError:null,seriesZone:allDay?CAL_UTC():fields?.seriesZone?calZone(fields.seriesZone):view.calSeriesZone,series,recurrenceId:calInstant(value("recurrenceId")),location:String(value("location")??"").trim()});const text=value("recurrence");if(typeof text==="string"&&text.trim()&&!base.series){try{const rec=calRec();if(!rec)throw new Error("CanopyX: the calendar recurrence part is not loaded.");base.rule=rec.calRule(text);Object.assign(base,rec.calExceptions(value("exceptions"),base.seriesZone))}
87
87
  catch(error){base.ruleError=error}}}
88
88
  CAL_BASES.set(row,{view,version:view.calVersion,base});return base}
89
89
  function calSourceTone(cal,id){return id!=null&&cal.sources?.length?cal.sources.find(source=>source.id===String(id).trim())?.tone??null:null}
@@ -148,8 +148,10 @@ else if(key.key==="Tab"){key.preventDefault();const stops=[close,...panel.queryS
148
148
  items.push({id:"occurrence",label:labels.calendarEditOccurrence,run:()=>this.editCalendarOccurrence(context.raw.id)});if(this.calStartMove&&this.cal.editable&&(this.calCanEdit(context.raw,false)||this.calCanEdit(context.raw,true)))items.push({id:"move",label:labels.calendarMove,run:()=>this.calStartMove(context.target)})}else if(this.cal.create&&this.calCreateFromClick){items.push({id:"new",label:labels.calendarNewHere,run:()=>this.calCreateFromClick(context.target)})}
149
149
  const hook=this.opts.calendar?.menu;if(typeof hook!=="function")return items;const own={kind:context.kind,event:context.event,day:context.day,minutes:context.minutes,resource:context.resource};let result;try{result=hook(Object.freeze(own),items.map(({id,label})=>Object.freeze({id,label})))}catch(error){this.emit("error",{error});return items}
150
150
  if(result===null||result===false)return[];if(!Array.isArray(result))return items;return result.slice(0,30).map(item=>{const kept=item&&items.find(entry=>entry.id===item.id&&!item.run);if(kept)return kept;return item&&typeof item.label==="string"&&item.label.trim()&&typeof item.run==="function"?{id:item.id??null,label:item.label.slice(0,200),run:()=>item.run(Object.freeze(own)),disabled:item.disabled===true}:null}).filter(Boolean)},calMenuStart(){if(!this.cal.menu)return;this.calMenuBinding=bindContextMenu(this.calBody,(event,element)=>{const context=this.calMenuContext(element,event?.clientX);return context?this.calMenuItems(context):[]},{host:this.host,closeOnFocusOutside:true,match:event=>this.calMenuContext(event.target,event.type==="keydown"?null:event.clientX)?.target,beforeOpen:(_event,element)=>{if(this.destroyed||!this.cal.menu||this.calDrag?.started||this.calMoving||element.classList.contains("cx-cal-invalid"))return false;this.calHideHover()},label:(event,element)=>{const context=this.calMenuContext(element,event?.clientX);const name=context.kind==="event"?context.raw.title:context.kind==="resource"?
151
- this.calResourceName?.(context.resource)??"":this.calFmt.longDay(calParseDay(context.day));return fill(this.calLabels.calendarActions,{title:name})},onOpen:({menu})=>{this.calMenu=menu;document.dispatchEvent(new CustomEvent("canopyx:closemenus",{detail:{source:menu}}))},onClose:({menu})=>{if(this.calMenu===menu)this.calMenu=null},onSelect:item=>{Promise.resolve().then(()=>item.run()).catch(error=>this.emit("error",{error}))}});this.calMenuBinding.ready.catch(error=>{if(!this.destroyed)this.emit("error",{error})})}});Object.assign(DataGrid.prototype,{calBuildLegend(){const sources=this.cal.sources;this.calHiddenSources=new Set(sources.filter(source=>source.hidden).map(source=>source.id));if(!sources.length)return null;const legend=this.calLegend=h("div","cx-cal-legend");legend.setAttribute("role","group");legend.setAttribute("aria-label",this.calLabels.calendarSources);for(const source of sources){const button=h("button","cx-chip cx-cal-src"),swatch=h("i","cx-cal-src-swatch"),text=h("span");button.type="button";button.dataset.cxSource=source.id;button.setAttribute("aria-pressed",String(!this.calHiddenSources.has(source.id)));if(source.tone)button.style.setProperty("--cx-ev",toneVariable(source.tone,false,"var(--hfx-color-accent,light-dark(#11776f,#37c9b8))"));if(source.color)button.style.setProperty("--cx-ev",source.color);swatch.setAttribute("aria-hidden","true");setText(text,source.label);button.append(swatch,text);button.addEventListener("click",()=>this.calToggleSource(source.id));legend.appendChild(button)}
152
- return legend},setCalendarSource(id,visible){return this.calToggleSource(id,visible)},calToggleSource(id,show){const hidden=this.calHiddenSources,source=this.cal.sources.find(item=>item.id===id);if(!source)throw new Error("CanopyX: the calendar has no source "+id+".");const visible=show===undefined?hidden.has(id):!!show;if(visible)hidden.delete(id);else hidden.add(id);this.calLegend?.querySelector('[data-cx-source="'+CSS.escape(id)+ '"]')?.setAttribute("aria-pressed",String(visible));this.calSourceVersion=(this.calSourceVersion||0)+ 1;if(this.calAllEvents){this.calEvents=this.calShownEvents(this.calAllEvents);this.calPaint({keep:true})}
151
+ this.calResourceName?.(context.resource)??"":this.calFmt.longDay(calParseDay(context.day));return fill(this.calLabels.calendarActions,{title:name})},onOpen:({menu})=>{this.calMenu=menu;document.dispatchEvent(new CustomEvent("canopyx:closemenus",{detail:{source:menu}}))},onClose:({menu})=>{if(this.calMenu===menu)this.calMenu=null},onSelect:item=>{Promise.resolve().then(()=>item.run()).catch(error=>this.emit("error",{error}))}});this.calMenuBinding.ready.catch(error=>{if(!this.destroyed)this.emit("error",{error})})}});Object.assign(DataGrid.prototype,{calBuildLegend(){const sources=this.cal.sources,labels=this.calLabels;this.calHiddenSources=new Set(sources.filter(source=>source.hidden).map(source=>source.id));if(!sources.length)return null;const legend=this.calLegend=h("div","cx-cal-legend"),chips=this.calLegendChips=h("div","cx-cal-srcs"),menu=this.calLegendMenu=h("div","cx-cal-src-menu");const fold=this.calLegendFold=h("button","cx-btn cx-cal-src-fold");legend.setAttribute("role","group");legend.setAttribute("aria-label",labels.calendarSources);fold.type="button";fold.hidden=true;menu.hidden=true;menu.id=this.id+"-cal-srcs";fold.setAttribute("aria-controls",menu.id);fold.setAttribute("aria-expanded","false");menu.setAttribute("role","group");menu.setAttribute("aria-label",labels.calendarSources);const close=focus=>{menu.hidden=true;fold.setAttribute("aria-expanded","false");if(focus)fold.focus()};fold.addEventListener("click",()=>{menu.hidden=!menu.hidden;fold.setAttribute("aria-expanded",String(!menu.hidden));if(!menu.hidden)this.calPlaceLegendMenu();menu.querySelector("input").focus()});menu.addEventListener("keydown",event=>{if(event.key==="Escape"){event.stopPropagation();close(true)}});for(const type of["focusout","pointerdown"])document.addEventListener(type,event=>{if(!legend.contains(event.relatedTarget??event.target))close(false)},{signal:this.lifetime.signal});for(const source of sources){const button=h("button","cx-chip cx-cal-src"),swatch=h("i","cx-cal-src-swatch"),text=h("span");const item=h("label","cx-cal-src-item"),check=h("input"),mark=h("i","cx-cal-src-swatch"),name=h("span");button.type="button";button.dataset.cxSource=source.id;button.setAttribute("aria-pressed",String(!this.calHiddenSources.has(source.id)));check.type="checkbox";check.dataset.cxSourceCheck=source.id;check.checked=!this.calHiddenSources.has(source.id);for(const element of[button,item]){if(source.tone)element.style.setProperty("--cx-ev",toneVariable(source.tone,false,"var(--hfx-color-accent,light-dark(#11776f,#37c9b8))"));if(source.color)element.style.setProperty("--cx-ev",source.color)}
152
+ swatch.setAttribute("aria-hidden","true");mark.setAttribute("aria-hidden","true");setText(text,source.label);setText(name,source.label);button.append(swatch,text);item.append(check,mark,name);button.addEventListener("click",()=>this.calToggleSource(source.id));check.addEventListener("change",()=>this.calToggleSource(source.id,check.checked));chips.appendChild(button);menu.appendChild(item)}
153
+ legend.append(chips,fold,menu);this.calSyncLegend();return legend},calFitLegend(){const legend=this.calLegend;if(!legend?.clientWidth)return;const folded=legend.classList.contains("cx-cal-folded");if(!folded)this.calLegendNeed=this.calLegendChips.scrollWidth;const style=getComputedStyle(legend),fold=legend.clientWidth-parseFloat(style.paddingLeft)- parseFloat(style.paddingRight)<this.calLegendNeed-1;if(fold===folded)return;legend.classList.toggle("cx-cal-folded",fold);this.calLegendFold.hidden=!fold;this.calLegendChips.hidden=fold;if(!fold){this.calLegendMenu.hidden=true;this.calLegendFold.setAttribute("aria-expanded","false")}},calPlaceLegendMenu(){const menu=this.calLegendMenu,box=this.calLegend.getBoundingClientRect(),screen=window.visualViewport?.height??window.innerHeight;const below=screen-box.bottom,above=box.top,up=below<menu.scrollHeight&&above>below;menu.classList.toggle("cx-cal-src-up",up);menu.style.setProperty("--cx-cal-menu-room",Math.max(0,Math.min(360,Math.floor((up?above:below)- 8)))+ "px")},calSyncLegend(){const total=this.cal.sources.length,shown=total-this.calHiddenSources.size;setText(this.calLegendFold,this.calLabels.calendarSources+" · "+fill(this.calLabels.calendarSourcesShown,{shown,total}))},setCalendarSource(id,visible){return this.calToggleSource(id,visible)},calToggleSource(id,show){const hidden=this.calHiddenSources,source=this.cal.sources.find(item=>item.id===id);if(!source)throw new Error("CanopyX: the calendar has no source "+id+".");const visible=show===undefined?hidden.has(id):!!show;if(visible)hidden.delete(id);else hidden.add(id);if(this.calLegend){this.calLegend.querySelector('[data-cx-source="'+CSS.escape(id)+ '"]').setAttribute("aria-pressed",String(visible));this.calLegend.querySelector('[data-cx-source-check="'+CSS.escape(id)+ '"]').checked=visible;this.calSyncLegend()}
154
+ this.calSourceVersion=(this.calSourceVersion||0)+ 1;if(this.calAllEvents){this.calEvents=this.calShownEvents(this.calAllEvents);this.calPaint({keep:true})}
153
155
  this.emit("calendarSource",{id,visible});if(source.url)this.calReload({keep:true});return visible},calShownEvents(events){const hidden=this.calHiddenSources;return hidden?.size?events.filter(event=>!event.base.source||!hidden.has(event.base.source)):events}});Object.assign(DataGrid.prototype,{async calLoadJson(from,to,signal){const rows=[],errors=[],cache=this.calJsonCache||=new Map(),budget={bytes:0,rows:0,limit:this.cal.limit};const sources=this.cal.sources.filter(source=>source.url&&!this.calHiddenSources.has(source.id));let next=0;const load=async source=>{const url=new URL(source.url,location.href);for(const[key,value]of Object.entries(source.fetchParams))url.searchParams.set(key,value);url.searchParams.set("start",calIso(from));url.searchParams.set("end",calIso(to));url.searchParams.set("timeZone",this.calZone.name);const key=source.id+":"+url.href;try{let entry=cache.get(key);if(!entry){if(url.origin!==location.origin||!["http:","https:"].includes(url.protocol)||url.username||url.password)throw new Error("JSON feeds need a same-origin http(s) page.");const response=await fetch(url.href,{signal,credentials:"same-origin",redirect:"error",headers:{Accept:"application/json"}});if(!response.ok)throw new Error("HTTP "+response.status);const body=await calJsonText(response,signal,budget);const items=calJsonRows(JSON.parse(body.text),source.id);calJsonCharge(budget,0,items.length);if(signal.aborted)throw new DOMException("Aborted","AbortError");entry={items,bytes:body.bytes};cache.set(key,entry);while(cache.size>12)cache.delete(cache.keys().next().value)}else calJsonCharge(budget,entry.bytes,entry.items.length);rows.push(...entry.items)}catch(error){if(signal.aborted||error.name==="AbortError")throw error;errors.push(source.label+": "+error.message);this.emit("error",{error,source:source.id})}};await Promise.all(Array.from({length:Math.min(4,sources.length)},async()=>{while(next<sources.length&&!budget.problem)await load(sources[next++])}));return{rows,errors}}});async function calJsonText(response,signal,budget){const max=8000000;if(Number(response.headers.get("content-length"))>max)throw new Error("JSON feed exceeds 8 MB.");if(!response.body?.getReader){const text=await response.text();if(text.length>2000000)throw new Error("JSON feed exceeds 2 million characters.");const bytes=new TextEncoder().encode(text).byteLength;calJsonCharge(budget,bytes,0);return{text,bytes}}
154
156
  const reader=response.body.getReader(),decoder=new TextDecoder();let bytes=0,text="";try{for(;;){if(signal.aborted)throw new DOMException("Aborted","AbortError");const chunk=await reader.read();if(chunk.done)break;bytes +=chunk.value.byteLength;if(bytes>max)throw new Error("JSON feed exceeds 8 MB.");calJsonCharge(budget,chunk.value.byteLength,0);text +=decoder.decode(chunk.value,{stream:true});if(text.length>2000000)throw new Error("JSON feed exceeds 2 million characters.")}
155
157
  return{text:text+decoder.decode(),bytes}}finally{await reader.cancel().catch(()=>{});reader.releaseLock()}}
@@ -157,7 +159,7 @@ function calJsonCharge(budget,bytes,rows){budget.problem||=budget.bytes+bytes>16
157
159
  budget.rows+rows>budget.limit?"JSON feeds exceed the combined event limit of "+budget.limit+".":null;if(budget.problem)throw new Error(budget.problem);budget.bytes +=bytes;budget.rows +=rows}
158
160
  function calJsonRows(items,source){if(!Array.isArray(items)||items.length>5000)throw new Error("A JSON feed is an array of at most 5,000 events.");const ids=new Set(),identity=id=>"json:"+JSON.stringify([source,id]);return items.map((item,index)=>{if(!item||typeof item!=="object"||Array.isArray(item)||typeof item.title!=="string"||item.title.length>1000||
159
161
  typeof item.start!=="string"||!Number.isFinite(calInstant(item.start.length===10?item.start+"T00:00:00Z":item.start))||
160
- item.end!=null&&(typeof item.end!=="string"||!Number.isFinite(calInstant(item.end.length===10?item.end+"T00:00:00Z":item.end))))throw new Error("A JSON event needs a title and ISO start/end values.");const id=item.id??String(index+1);if(typeof id!=="string"||!CAL_ID.test(id)||ids.has(id))throw new Error("JSON event ids must be unique identifiers.");ids.add(id);for(const name of["description","resource","recurrence","exceptions","series","recurrenceId"])if(item[name]!=null&&(typeof item[name]!=="string"||item[name].length>10000))throw new Error("Invalid JSON event "+name+".");if(item.allDay!==undefined&&typeof item.allDay!=="boolean")throw new Error("JSON allDay is a boolean.");const allDay=item.allDay??item.start.length===10,normalize=value=>value?.length===10?value+"T00:00:00Z":value;return{id:identity(id),external:source,cells:{},fields:{title:item.title,start:normalize(item.start),end:normalize(item.end),allDay,description:item.description||"",resource:item.resource||null,resourceIds:calResourceIds(item.resourceIds),recurrence:item.recurrence,exceptions:item.exceptions,series:item.series?identity(item.series):null,recurrenceId:normalize(item.recurrenceId)}}})}
162
+ item.end!=null&&(typeof item.end!=="string"||!Number.isFinite(calInstant(item.end.length===10?item.end+"T00:00:00Z":item.end))))throw new Error("A JSON event needs a title and ISO start/end values.");const id=item.id??String(index+1);if(typeof id!=="string"||!CAL_ID.test(id)||ids.has(id))throw new Error("JSON event ids must be unique identifiers.");ids.add(id);for(const name of["description","location","resource","recurrence","exceptions","series","recurrenceId"])if(item[name]!=null&&(typeof item[name]!=="string"||item[name].length>10000))throw new Error("Invalid JSON event "+name+".");if(item.allDay!==undefined&&typeof item.allDay!=="boolean")throw new Error("JSON allDay is a boolean.");const allDay=item.allDay??item.start.length===10,normalize=value=>value?.length===10?value+"T00:00:00Z":value;return{id:identity(id),external:source,cells:{},fields:{title:item.title,start:normalize(item.start),end:normalize(item.end),allDay,description:item.description||"",location:item.location||"",resource:item.resource||null,resourceIds:calResourceIds(item.resourceIds),recurrence:item.recurrence,exceptions:item.exceptions,series:item.series?identity(item.series):null,recurrenceId:normalize(item.recurrenceId)}}})}
161
163
  const CAL_LANE=22,CAL_NUMBER=26;function calMonthLanes(items,columns,limit){const bar=item=>calInAllDayRow(item.event)||item.event.ed>item.event.sd;const ordered=items.slice().sort((a,b)=>Number(bar(b))- Number(bar(a))||(bar(a)?(b.to-b.from)-(a.to-a.from):0));const reserved=new Array(columns).fill(false);let visible,counts,busy,changed;do{visible=[];counts=new Array(columns).fill(0);busy=Array.from({length:columns},()=>[]);changed=false;const shown=new Set();for(const item of ordered){const someColumn=predicate=>{for(let col=item.from;col<=item.to;col++)if(predicate(col))return true;return false};let lane=0;while(someColumn(col=>busy[col][lane]))lane++;if(someColumn(col=>lane>=limit-Number(reserved[col])))continue;visible.push({...item,lane});shown.add(item.event);for(let col=item.from;col<=item.to;col++){busy[col][lane]=true;counts[col]++}}
162
164
  for(const item of items)for(let col=item.from;col<=item.to;col++){if(!reserved[col]&&!shown.has(item.event)){reserved[col]=true;changed=true}}}while(changed);return{visible,counts,more:busy.map(lanes=>lanes.length)}}
163
165
  const calDayOrder=(a,b)=>(b.allDay-a.allDay)||a.start-b.start||(a.id<b.id?-1:1);Object.assign(DataGrid.prototype,{calWeekdays(){const days=[];for(let i=0;i<7;i++){const dow=(this.cal.firstDay+i)%7;if(!this.cal.hidden.has(dow))days.push(dow)}
@@ -300,11 +302,11 @@ return overrides}
300
302
  Object.assign(DataGrid.prototype,{calInlineOverrides(rows,from,to){const masters=calSeriesMasters(this,rows,from,to);return masters.length?calOverrideMetadata(this,masters,this.calEdited(this.view.rows)):new Map()},async calHostedOverrides(answer,from,to,signal){const rows=this.calEdited(answer.rows,true),masters=calSeriesMasters(this,rows,from,to);if(!masters.length)return{...answer,rows,overrides:new Map()};if(typeof answer.revision!=="string"||!answer.revision)throw new Error("CanopyX: calendar replacement metadata needs the range revision.");const budget={pages:CAL_FALLBACK_PAGES,rows:this.cal.limit},overrides=new Map(),withheld=new Set();for(let at=0;at<masters.length;at +=1000){const batch=masters.slice(at,at+1000);if(!budget.pages||!budget.rows){for(const master of batch)withheld.add(master.id);continue}
301
303
  const lower=Math.min(...batch.map(master=>master.from));const query={search:"",revision:answer.revision,sort:[],filters:[{column:this.cal.series.id,operator:"in",values:batch.map(master=>master.id)},{column:this.cal.recurrenceId.id,operator:"ge",values:[calIso(lower)]},{column:this.cal.recurrenceId.id,operator:"lt",values:[calIso(to)]}]};const support=await this.calQueryPages(query,signal,budget);if(support.truncated){for(const master of batch)withheld.add(master.id);continue}
302
304
  for(const[id,starts]of calOverrideMetadata(this,batch,this.calEdited(support.rows,true)))overrides.set(id,starts)}
303
- return{...answer,rows:withheld.size?rows.filter(row=>!withheld.has(row.id)):rows,overrides,truncated:answer.truncated||withheld.size>0}}});Object.assign(DataGrid.prototype,{editCalendarOccurrence(){return Promise.resolve(false)},calParts(){const input=this.view.calendar||{},ranges=Array.isArray(input.ranges)?input.ranges:[],sources=Array.isArray(input.sources)?input.sources:[];const ics=sources.some(source=>source&&source.ics!==undefined),needs=[];if(input.recurrence!==undefined||ics||sources.some(source=>source?.url)||ranges.some(range=>range&&range.recurrence!==undefined))needs.push("calendar-recurrence");if(input.editable||input.create||input.drop)needs.push("calendar-edit");if(ics)needs.push("calendar-ics");return Promise.all(needs.map(name=>this.calLoadPart(name)))},calLoadPart(name){return loadPart(DataGrid.prototype.parts[name])},calExportFormat(){const grid=this;const write=this.calIcsFormatWriter=async(capture,context)=>{await grid.calLoadPart("calendar-ics");return grid.calIcsWrite(capture,context)};return{id:"ics",label:this.calLabels.calendarExport,extension:"ics",mime:"text/calendar",write}},calIcsExportColumns(explicit){const mapped=new Set(Object.values(this.cal)),columns=this.columns.filter(column=>mapped.has(column));if(columns.some(column=>column.exportable===false))throw new Error("CanopyX: iCalendar export needs every mapped calendar column to allow export.");const ids=columns.map(column=>column.id);if(explicit!==undefined&&(!Array.isArray(explicit)||ids.some(id=>!explicit.includes(id))))
305
+ return{...answer,rows:withheld.size?rows.filter(row=>!withheld.has(row.id)):rows,overrides,truncated:answer.truncated||withheld.size>0}}});Object.assign(DataGrid.prototype,{editCalendarOccurrence(){return Promise.resolve(false)},resetCalendar(){return this.calLoadPart("calendar-screen").then(()=>this.resetCalendar())},calParts(){const input=this.view.calendar||{},ranges=Array.isArray(input.ranges)?input.ranges:[],sources=Array.isArray(input.sources)?input.sources:[];const ics=sources.some(source=>source&&source.ics!==undefined),needs=[];if(input.recurrence!==undefined||ics||sources.some(source=>source?.url)||ranges.some(range=>range&&range.recurrence!==undefined))needs.push("calendar-recurrence");if(input.editable||input.create||input.drop)needs.push("calendar-edit");if(ics)needs.push("calendar-ics");if(CAL_SCREEN.some(name=>input[name]!==undefined)||sources.some(source=>CAL_FACE.some(name=>source?.[name]!==undefined)))needs.push("calendar-screen");return Promise.all(needs.map(name=>this.calLoadPart(name)))},calLoadPart(name){return loadPart(DataGrid.prototype.parts[name])},calExportFormat(){const grid=this;const write=this.calIcsFormatWriter=async(capture,context)=>{await grid.calLoadPart("calendar-ics");return grid.calIcsWrite(capture,context)};return{id:"ics",label:this.calLabels.calendarExport,extension:"ics",mime:"text/calendar",write}},calIcsExportColumns(explicit){const mapped=new Set(Object.values(this.cal)),columns=this.columns.filter(column=>mapped.has(column));if(columns.some(column=>column.exportable===false))throw new Error("CanopyX: iCalendar export needs every mapped calendar column to allow export.");const ids=columns.map(column=>column.id);if(explicit!==undefined&&(!Array.isArray(explicit)||ids.some(id=>!explicit.includes(id))))
304
306
  throw new Error("CanopyX: iCalendar export needs all mapped calendar columns; include their ids in the export columns.");return ids},calPrepareIcsExport(options){const columns=this.calIcsExportColumns(options.columns);return this.prepareExport({...options,columns:options.columns===undefined?columns:options.columns,values:"raw"})},async exportCalendar(options={}){await this.calLoadPart("calendar-ics");return this.calIcsExport(options)}});Object.assign(DataGrid.prototype,{startCalendar(){if(this.cal)return;this.cal=calSettings(this);this.calVersion=1;this.calEpoch=0;this.calRuleErrors=new Set();this.calEvents=[];this.calRanges=[];this.calLabels=calLabelsFor(this.labels);this.calZone=calZone(this.cal.zoneName);this.calFmt=calFormats(this.lang,this.calZone);this.calSeriesZone=calZone(this.cal.zoneFixed&&this.cal.zoneName!=="local"?this.cal.zoneName:"utc");this.calMinSegment=Math.max(15,this.cal.slotMinutes*0.75);this.calView=this.cal.view;this.calZoom=this.cal.zoom;this.calDate=this.calClampDay(this.cal.date??this.calZone.day(Date.now()));this.calCollapsed=new Set();this.defaultState.calendar={view:this.cal.view,date:null,zoom:this.cal.zoom};const signal=this.lifetime.signal,host=this.host;host.classList.add("cx-calendar");if(this.cal.toolbar===false)host.classList.add("cx-cal-bare");else if(this.cal.toolbar!==true){for(const item of CAL_TOOLBAR)if(!this.cal.toolbar.has(item))host.classList.add("cx-cal-no-"+item);if(!this.cal.toolbar.has("more")&&this.overflow){this.placeMenus?.(false);this.overflow.details.remove();this.overflow=null}}
305
307
  host.setAttribute("data-cx-event-style",this.cal.eventStyle);const root=this.calRoot=h("div","cx-cal");root.setAttribute("role","region");root.setAttribute("aria-label",this.view.label);this.calNoticeElement=h("div","cx-cal-notice");this.calNoticeElement.hidden=true;this.calNoticeElement.setAttribute("role","status");this.calBody=h("div","cx-cal-body");this.calLive=h("div","cx-live cx-sr-only");this.calLive.setAttribute("aria-live","polite");root.append(...[this.calBuildBar(),this.calBuildLegend(),this.calNoticeElement,this.calBody,this.calLive].filter(Boolean));this.grid.before(root);this.calRtl=getComputedStyle(host).direction==="rtl";host.classList.toggle("cx-cal-rtl",this.calRtl);this.calPhone=host.clientWidth>0&&host.clientWidth<=640;if(this.calPhone&&!this.initialState?.calendar)this.calView=this.cal.phone||(this.cal.views.includes("agenda")?"agenda":this.calView);this.calBody.addEventListener("keydown",event=>this.calKey(event),{signal});this.calBody.addEventListener("click",event=>this.calClick(event),{signal});this.calBody.addEventListener("focusin",event=>this.calFocusIn(event),{signal});this.calBody.addEventListener("pointerover",event=>this.calHoverOver(event),{signal});this.calBody.addEventListener("pointerout",event=>this.calHoverOut(event),{signal});for(const type of["pointerdown","keydown","wheel"])this.calBody.addEventListener(type,()=>this.calHideHover(),{signal,passive:true});this.calMenuStart();host.addEventListener("canopyx:query",()=>{const shape=gridResultShape(this.acceptedQuery||{}),same=this.calQueryShape===shape;this.calQueryShape=shape;this.calCache?.clear();this.calJsonCache?.clear();this.calReload(same?{keep:true}:{})},{signal});host.addEventListener("canopyx:rowsChanged",()=>{this.calCache?.clear();this.calVersion++;this.calReload({keep:true})},{signal});host.addEventListener("canopyx:commit",()=>{this.calCache?.clear();this.calVersion++;this.calReload({keep:true})},{signal});host.addEventListener("canopyx:cellValueChanged",()=>{this.calVersion++;this.calReload({keep:true})},{signal});if(this.cal.editable||this.cal.create||this.cal.drop){host.setAttribute("data-cx-calendar-editable","true");this.calEditStart?.();this.calBody.addEventListener("pointerdown",event=>this.calDragStart(event),{signal});this.calBody.addEventListener("pointermove",event=>this.calDragMove(event),{signal});this.calBody.addEventListener("pointerup",event=>this.calDragEnd(event,false),{signal});this.calBody.addEventListener("pointercancel",event=>this.calDragEnd(event,true),{signal});this.calBody.addEventListener("lostpointercapture",event=>{if(this.calDrag?.id===event.pointerId&&!this.calDrag.started)this.calDrag=null},{signal})}
306
308
  let width=0,height=0,resizeFrame=0;const resize=()=>{resizeFrame=0;if(this.destroyed||!root.clientWidth)return;if(root.querySelector(":active")){resizeFrame=requestAnimationFrame(resize);return}
307
- this.updateGridPhone();const phone=host.clientWidth<=640,changed=phone!==this.calPhone||Math.abs(root.clientWidth-width)>1||Math.abs(this.calBody.clientHeight-height)>1;width=root.clientWidth;height=this.calBody.clientHeight;const switched=phone!==this.calPhone;if(switched){this.calPhone=phone;host.classList.toggle("cx-cal-phone",phone);this.calSyncBar(false)}
309
+ this.updateGridPhone();this.calFitLegend();const phone=host.clientWidth<=640,changed=phone!==this.calPhone||Math.abs(root.clientWidth-width)>1||Math.abs(this.calBody.clientHeight-height)>1;width=root.clientWidth;height=this.calBody.clientHeight;const switched=phone!==this.calPhone;if(switched){this.calPhone=phone;host.classList.toggle("cx-cal-phone",phone);this.calSyncBar(false)}
308
310
  if(!changed||!this.calRange)return;if(switched||this.calView==="month"||this.calTimeWindow||this.view.plan&&this.calView==="timeline"&&Math.abs((this.planFitWidth||0)-this.tlMain.clientWidth)>1)this.calPaint({keep:true,resize:true});else if(this.calView==="timeline")this.tlPaintLanes?.();else if(this.calScroller?.isConnected)this.calGrid.querySelector(".cx-cal-thead").style.paddingInlineEnd=Math.max(0,this.calScroller.offsetWidth-this.calScroller.clientWidth)+ "px"};const observer=new ResizeObserver(()=>{if(!resizeFrame)resizeFrame=requestAnimationFrame(resize)});observer.observe(root);host.classList.toggle("cx-cal-phone",this.calPhone);const timer=setInterval(()=>{if(!this.destroyed&&this.cal.now)this.calTick?.()},60000);const print=on=>{if(this.destroyed||!this.calRange)return;this.calPrinting=on;host.classList.toggle("cx-cal-printing",on);this.tlPrint?.(on);if(this.calView!=="timeline")this.calPaint({keep:true,resize:true})};global.addEventListener("beforeprint",()=>print(true),{signal});global.addEventListener("afterprint",()=>print(false),{signal});signal.addEventListener("abort",()=>{observer.disconnect();cancelAnimationFrame(resizeFrame);clearInterval(timer);clearTimeout(this.calAnnounceTimer);this.calPrevLifetime?.abort();this.calCancelGesture?.();this.calDragEnd?.(null,true);this.calStopMoving?.();if(this.calDropDrag)this.calDropClear?.();this.calDisposeEventRenderers();this.calMenuBinding?.();this.calMenuBinding=null;root.remove();host.classList.remove("cx-calendar","cx-cal-phone","cx-cal-bare","cx-cal-rtl",...CAL_TOOLBAR.map(item=>"cx-cal-no-"+item));this.calHideHover();this.calCloseDetails(false);this.calCloseCreate?.(false);this.calCloseAsk?.(null);this.calCloseOccurrence?.(false);host.removeAttribute("data-cx-event-style");host.removeAttribute("data-cx-calendar-ready")},{once:true});calWrapHighlight();const plugin={name:"calendar-export",exportFormats:[this.calExportFormat()]};this.plugins=[...this.plugins,plugin];this.opts={...this.opts,plugins:[...this.opts.plugins||[],plugin]};this.calRange=this.calRangeOf(this.calView,this.calDate);this.calSyncBar(false);if(this.cal.resources||this.calView==="timeline")return this.calLoadTimeline()},calRangeOf(view,date){const cal=this.cal;if(view==="month"||view==="mini"){const month=calMonthStart(date),end=calAddMonths(month,1)- 1,first=calWeekStart(month,cal.firstDay);return{firstDay:first,lastDay:view==="mini"||cal.fixedWeeks?first+41:calWeekStart(end,cal.firstDay)+ 6,month}}
309
311
  if(view==="months"){const month=calMonthStart(date);return{firstDay:month,lastDay:calAddMonths(month,cal.months)- 1,month}}
310
312
  if(view==="week"||view==="weekList"){const first=calWeekStart(date,cal.firstDay);return{firstDay:first,lastDay:first+6}}
@@ -317,7 +319,7 @@ return this.calTimelineRange(date)},calShownDays(first,last){const days=[];for(l
317
319
  else next=this.calTimelineStep(date,direction);return next},calStepBack(date){let day=date;for(let shown=0;shown<this.calDaysCount();){day--;if(!this.cal.hidden.has(calDow(day)))shown++}
318
320
  return day},calendarToday(){return this.calGo(this.calClampDay(this.calZone.day(Date.now())),this.calView,true)},setCalendarDate(date){const day=typeof date==="number"?date:calParseDay(String(date).slice(0,10));if(!Number.isFinite(day))throw new Error("CanopyX: a calendar date is yyyy-MM-dd.");return this.calGo(this.calClampDay(day),this.calView,true)},setCalendarView(view){if(!this.cal.views.includes(view))throw new Error("CanopyX: the calendar has no view '"+view+"'.");const date=this.calFocus?.day??this.calDate;return this.calGo(view==="day"||view==="days"?this.calShownDay(date,1):date,view,true)},setCalendarZoom(zoom){if(!this.cal.zooms.includes(zoom))throw new Error("CanopyX: the calendar has no zoom '"+zoom+"'.");this.calZoom=zoom;return this.calGo(this.calDate,this.calView,true)},async calGo(date,view,focus){date=this.calClampDay(date);if(typeof focus==="number")focus=this.calClampDay(focus);const changed=view!==this.calView||date!==this.calDate,shift=date-this.calDate;const day=typeof focus==="number"?focus:!focus&&this.calFocus&&view===this.calView?this.calFocus.day+shift:date;this.calView=view;this.calDate=date;this.calFocus={day,minutes:this.calFocus?.minutes??null,event:null,resource:this.calFocus?.resource??null};if(view==="timeline")await this.calLoadTimeline();await this.calReload({announce:changed,keep:true});if(changed)this.stateChanged();return this.getCalendar()},getCalendar(){calNeed(this);const range=this.calRange||this.calRangeOf(this.calView,this.calDate);return gridFreeze({view:this.calView,date:calDayText(this.calDate),zoom:this.calZoom,from:calDayText(range.firstDay),to:calDayText(range.lastDay),timeZone:this.calZone.name,events:this.calEvents.length,collapsed:[...this.calCollapsed]})},calSnapshot(){return this.getCalendar()},getCalendarEvents(){return gridFreeze(this.calEvents.map(event=>gridFreeze({id:event.id,record:event.key,start:calIso(event.start),end:calIso(event.end),allDay:event.allDay,title:event.title,resource:event.resource,resourceIds:this.calEventResources(event),recurring:event.recurring,background:event.background,source:event.base.source,external:event.base.external})))},calApplyState(input){const state=input&&typeof input==="object"&&!Array.isArray(input)?input:{};const view=this.cal.views.includes(state.view)?state.view:this.cal.view,zoom=this.cal.zooms.includes(state.zoom)?state.zoom:this.cal.zoom;const saved=typeof state.date==="string"?calParseDay(state.date):NaN,date=this.calClampDay(Number.isFinite(saved)?saved:this.cal.date??this.calZone.day(Date.now()));const collapsed=Array.isArray(state.collapsed)&&state.collapsed.length<=10000?state.collapsed.filter(id=>typeof id==="string"):[];this.calZoom=zoom;this.calCollapsed=new Set(collapsed);this.calApplyCollapsed?.();return this.calGo(date,view,true)}});const CAL_STATE={get:DataGrid.prototype.getState,apply:DataGrid.prototype.applyStatePresentation,zone:DataGrid.prototype.setTimeZone};Object.assign(DataGrid.prototype,{getState(){const state=CAL_STATE.get.call(this);if(this.cal)state.calendar={view:this.calView,date:calDayText(this.calDate),zoom:this.calZoom,...this.calCollapsed.size?{collapsed:[...this.calCollapsed]}:{}};return state},applyStatePresentation(state){const applied=CAL_STATE.apply.call(this,state);if(!this.cal||state.calendar===undefined)return applied;const calendar=this.calApplyState(state.calendar);return Promise.all([applied,calendar]).then(([result])=>result)},setTimeZone(zone){const result=CAL_STATE.zone.call(this,zone);if(this.cal&&!this.cal.zoneFixed&&this.calZone.name!==(this.local?"local":"utc")){this.calZone=calZone(this.local?"local":"utc");this.calFmt=calFormats(this.lang,this.calZone);this.calVersion++;this.calReload({keep:true})}
319
321
  return result}});function calNeed(grid){if(!grid.cal)throw new Error("CanopyX: this grid has no calendar.")}
320
- for(const name of["setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","clearCalendarSelection","setCalendarSource"]){const method=DataGrid.prototype[name];if(method)DataGrid.prototype[name]=function(...args){calNeed(this);return method.apply(this,args)}}
322
+ for(const name of["setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","clearCalendarSelection","setCalendarSource","resetCalendar"]){const method=DataGrid.prototype[name];if(method)DataGrid.prototype[name]=function(...args){calNeed(this);return method.apply(this,args)}}
321
323
  function calWrapHighlight(){for(const name of["setHighlight","clearHighlight"]){const current=DataGrid.prototype[name];if(current._calendar)continue;const wrapped=function(...args){const result=current.apply(this,args);if(this.cal)Promise.resolve(result).then(()=>{calWrapHighlight();this.calMarkHighlights()},()=>{});return result};wrapped._calendar=true;wrapped.linkStub=current.linkStub;DataGrid.prototype[name]=wrapped}}
322
324
  Object.assign(DataGrid.prototype,{calLoadTimeline(){if(!this.cal.resources&&!this.cal.views.includes("timeline"))return Promise.resolve();return this.calTimelineLoad||=loadPart(DataGrid.prototype.parts.timeline).then(()=>this.destroyed||this.startTimeline())
323
- .catch(error=>{this.calTimelineLoad=null;this.emit("error",{error})})},calTimelineRange(date){const first=calWeekStart(date,this.cal.firstDay);return{firstDay:first,lastDay:first+6}},calTimelineStep(date,direction){return date+7*direction},calPaintTimeline(){this.calBody.replaceChildren()}});const CAL_FOCUS_RESULT=DataGrid.prototype.focusResult;DataGrid.prototype.focusResult=function(...args){return this.cal?Promise.resolve():CAL_FOCUS_RESULT.apply(this,args)};DataGrid.prototype.calKit={CAL_DAY,CAL_HOUR,CAL_MINUTE,CAL_GUTTER,CAL_SLOT_PX,calAddMonths,calCount,calDayNumber,calDayParts,calDow,calMonthDays,calMonthStart,calWeekStart,calZone,calIso,calParseDay,calDayText,calLanes,calColumns,calBase,calOverlaps,calInAllDayRow,calDayGrid};installed.add(context.DataGrid.prototype)}};(global.CanopyXParts||=[]).push(["calendar",part])})(typeof window!=="undefined"?window:globalThis);
325
+ .catch(error=>{this.calTimelineLoad=null;this.emit("error",{error})})},calTimelineRange(date){const first=calWeekStart(date,this.cal.firstDay);return{firstDay:first,lastDay:first+6}},calTimelineStep(date,direction){return date+7*direction},calPaintTimeline(){this.calBody.replaceChildren()}});const CAL_FOCUS_RESULT=DataGrid.prototype.focusResult;DataGrid.prototype.focusResult=function(...args){return this.cal?Promise.resolve():CAL_FOCUS_RESULT.apply(this,args)};DataGrid.prototype.calKit={CAL_DAY,CAL_HOUR,CAL_MINUTE,CAL_GUTTER,CAL_SLOT_PX,calAddMonths,calCount,calDayNumber,calDayParts,calDow,calMonthDays,calMonthStart,calWeekStart,calZone,calIso,calParseDay,calDayText,calLanes,calColumns,calBase,calOverlaps,calInAllDayRow,calDayGrid,calSameOrigin,calSafeTone,calInvalid};installed.add(context.DataGrid.prototype)}};(global.CanopyXParts||=[]).push(["calendar",part])})(typeof window!=="undefined"?window:globalThis);
@@ -532,7 +532,7 @@ close()}else{return}
532
532
  e.preventDefault()});input.addEventListener("blur",()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);blurTimer=setTimeout(close,150)});this.cancelSearch=()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);hits=[];close()};box.appendChild(input);box.appendChild(list);box.appendChild(status);bar.appendChild(box);this.searchInput=input}});function watchFlyout(anchorElement,panel,isOpen){const lifetime=new AbortController();let flyout=null,pending=null;const ready=()=>flyout?Promise.resolve(flyout):pending||=loadPart(SHARED_PARTS["ui-overlays"]).then(()=>{if(!lifetime.signal.aborted)flyout=UI_TOOLS.toolbarFlyout(anchorElement,panel,isOpen,lifetime.signal);return flyout}).catch(error=>{pending=null;throw error});const invoke=method=>{if(lifetime.signal.aborted||!isOpen())return;if(flyout){flyout[method]();return}
533
533
  ready().then(value=>{if(!lifetime.signal.aborted&&isOpen())value?.[method]()}).catch(error=>{if(!lifetime.signal.aborted)(anchorElement.closest(".cx-host")||anchorElement)
534
534
  .dispatchEvent(new CustomEvent("canopyx:error",{detail:{error},bubbles:true}))})};return{position:()=>invoke("position"),open:()=>invoke("open"),close:()=>flyout?.close(),dispose:()=>lifetime.abort()}}
535
- const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"ui-overlays":["24afaa117ebf3fb5","canopyx-ui-overlays.dedc42d3a501a387.js","canopyx-ui-overlays.3668a9a74004ea8e.css"],"ui-menu":["352b1ee391133ff0","canopyx-ui-menu.f9abee36db8f6ad2.js","canopyx-ui-menu.2f3478cc5f5c272f.css"],"ui-picker":["d415103478faf52a","canopyx-ui-picker.13e544bd68aca998.js","canopyx-ui-picker.59c85a1988a287a9.css"],"ui-navigation":["2553d01c5276d56a","canopyx-ui-navigation.c4ebc214197f140d.js","canopyx-ui-navigation.0afd07bbdc5aecb5.css"],"ui-tabs":["19ece8184f3daf4a","canopyx-ui-tabs.6cd35b2afd89f530.js","canopyx-ui-tabs.7bb6c6f1341e87e9.css"],"ui-stepper":["5682c49db1b85314","canopyx-ui-stepper.96973189b0f6e0c4.js","canopyx-ui-stepper.1d4a9db373b8d2f2.css"],"ui-accordion":["1424f075b78d0ccd","canopyx-ui-accordion.d0d5daa7f73d0859.js","canopyx-ui-accordion.a3ef9c27cea5b7a4.css"],"tree-tools":["ef0d06c82135ae2e","canopyx-tree-tools.1c4b9e286dde6065.js","canopyx-tree-tools.350dd0ee46757029.css"],"presenters":["d5f9d61bb730974b","canopyx-presenters.d71f9e12d83969d9.js"],"filter-editor":["b760f978327dbab0","canopyx-filter-editor.4851bd579e7d146c.js","canopyx-filter-editor.2e0cf6850cbd3235.css"],"export":["15abf3205094bda6","canopyx-export.68b90138463329fe.js"],"office-export":["4fb7a4d570390ee9","canopyx-office-export.7e62c385b884e75b.js"],"history":["7d9901d2fe04df72","canopyx-history.9432e724bf14c9ed.js"],"pager":["cc30dd4f6d3feeb0","canopyx-pager.2a6f5da8c93de083.js","canopyx-pager.c1e16027780b7fdd.css"],"enhance":["a3b4be5ec19a43a6","canopyx-enhance.4a189cba27c290de.js"],"data":["bab770170bd2cfdd","canopyx-data.34325d1fd693886e.js"],"forms":["381a3edba481660b","canopyx-forms.fa85aa9e8b62876a.js","canopyx-forms.50a5ddb0fcc98bdf.css"],"flow":["02a915fe174e4710","canopyx-flow.2ec165998fe2950d.js","canopyx-flow.347ecd64183ea3a1.css"],"flow-host":["7169c4283cec8b25","canopyx-flow-host.52ccd1a2b6cd53f7.js","canopyx-flow-host.a7c8d3fc930ad3a9.css"],"flow-checks":["53394e75b7d1b0e2","canopyx-flow-checks.76e58f9d05eaa78f.js","canopyx-flow-checks.88dd9f389b249147.css"],"flow-options":["60450342239ded26","canopyx-flow-options.d31458a54aa4b1e7.js"],"flow-pick":["7e0924c72fdd2f74","canopyx-flow-pick.c2e34da944b0edab.js","canopyx-flow-pick.ce7687598d4703f1.css"],"flow-records":["0b652a9789ce4128","canopyx-flow-records.df8aba0a303019e0.js","canopyx-flow-records.393243243aae9a56.css"],"flow-drafts":["fac75bf905a77d0b","canopyx-flow-drafts.c7db634ab651e9fc.js","canopyx-flow-drafts.2c43cff1ce9be700.css"],"flow-preview":["5e8207eed3801f91","canopyx-flow-preview.3924dc8410f9775d.js","canopyx-flow-preview.069c52c33e87ffb4.css"],"flow-command":["a30245a47f6d4530","canopyx-flow-command.b145a234a6ecc8a2.js","canopyx-flow-command.f98b5333af3a0e17.css"],"flow-tasks":["8a4437f5216ac3ee","canopyx-flow-tasks.569d4c40d317472b.js","canopyx-flow-tasks.54857a9f2732048a.css"],"flow-dialog":["8c45e0a8bb6a8ab9","canopyx-flow-dialog.cb4e85bcb7383fe2.js","canopyx-flow-dialog.58bd5d446415e01a.css"],"flow-links":["2c14b19c9236e90d","canopyx-flow-links.7b6cfe42d28b6067.js"],"flow-endpoint":["f5cddfc9545e0920","canopyx-flow-endpoint.b31146202bd76aac.js"],"flow-facts":["385b5e61ed487e16","canopyx-flow-facts.8dad3bc07a71fdb0.js"],"flow-consent":["22121778bc0d07c5","canopyx-flow-consent.749b97f13039bc71.js","canopyx-flow-consent.9f6580d3673ae8bf.css"],"matrix":["002a6d917bb4d638","canopyx-matrix.17ae2d0e03ad1364.js","canopyx-matrix.59fc6920ae000d49.css"],"changes":["7d9a526aa07a8838","canopyx-changes.75f1a61cbba98a4f.js","canopyx-changes.5f0ae1710b8b081c.css"],"editing":["88e4ca705a7eb0c3","canopyx-editing.6a6df811fb4dde54.js","canopyx-editing.4816f6be6f89d794.css"],"column-groups":["91abd99e8ff95b58","canopyx-column-groups.4c71d23375de727c.js","canopyx-column-groups.4e4131c1e2df40b1.css"],"cell-range":["cb29468954702795","canopyx-cell-range.d4f99a024db5d0f8.js","canopyx-cell-range.c790b8f140b1243b.css"],"links":["c6579c9401f0971d","canopyx-links.b25760079f57e6e1.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"formatting":["0feff4e3424599e9","canopyx-formatting.94536547a1d35e9b.js","canopyx-formatting.22b2400c566e25d6.css"],"format-editor":["97085e181fbc1cf7","canopyx-format-editor.a6bc57c48173bfc0.js","canopyx-format-editor.d5aaa8e873d92695.css"],"link":["7485f5c9875e9f9b","canopyx-link.9066770aa822fe0f.js","canopyx-link.997fefec6b85f0c5.css"],"detail-rows":["1892f1fd9d035c0f","canopyx-detail-rows.8be98dbc5721170a.js","canopyx-detail-rows.275076ec8bd9144a.css"],"calculations":["f902dc5856fc7bdd","canopyx-calculations.97e438237ba43f99.js","canopyx-calculations.50432e524dd7d8d9.css"],"pivot":["577443c67c7ed719","canopyx-pivot.3abc630122030933.js","canopyx-pivot.5670e62c0bbf114f.css"],"values":["0d7006b0f7bfca10","canopyx-values.ad4c56fcbcd89cbb.js","canopyx-values.446654b98c62ef1d.css"],"buckets":["cc69c8336c15df83","canopyx-buckets.1f59613f13ee292c.js"],"grouping":["c82705991ff01a4c","canopyx-grouping.239f13b0785a2e30.js","canopyx-grouping.a91801c602d752b3.css"],"highlight":["5ebf0042011ba4fd","canopyx-highlight.ff11a0ca8e30102b.js","canopyx-highlight.9c26291cbcd0962b.css"],"layouts":["90267e35e7edf3a4","canopyx-layouts.058b8a396f909a79.js","canopyx-layouts.ca17f42babc4192a.css"],"facets":["e78c2340a96fa802","canopyx-facets.74b2e520a3c04580.js","canopyx-facets.e2970dd7cf0c3da6.css"],"live":["78791b002a111843","canopyx-live.878dc16d683abb72.js","canopyx-live.9881627f352f59da.css"],"record-panel":["cb6bcd1baf644a51","canopyx-record-panel.557c676822e8624f.js","canopyx-record-panel.174846a640de979f.css"],"calendar":["e11aad6b723ddf23","canopyx-calendar.79518c25ddf28dd7.js","canopyx-calendar.47490d57a6e6c1dc.css"],"calendar-recurrence":["64bcc24d785bd1af","canopyx-calendar-recurrence.4b7f430c2a64de23.js"],"calendar-edit":["09747e191820d94c","canopyx-calendar-edit.174f5125d3e75bd9.js"],"calendar-ics":["ac8b2950fccbfb0f","canopyx-calendar-ics.4a18c1c4a1520418.js"],"timeline":["cb9b9dd33154172c","canopyx-timeline.a3dea165914fa7fd.js","canopyx-timeline.44c3156c218531e2.css"],"grid-options":["ee53e6f124b99d5a","canopyx-grid-options.9f8604806c93bf19.js","canopyx-grid-options.e85648a66d70d5b5.css"],"board":["dd02be00df77f53a","canopyx-board.81de43b6e0f4aec3.js","canopyx-board.b62cc3a0348e758a.css"],"plan":["db07c2eb53541d49","canopyx-plan.f3bf394516b627b7.js","canopyx-plan.743201d95414f399.css"],"path":["c6fa2dbab6a0dbaa","canopyx-path.97c3ee2b076b2db6.js","canopyx-path.efba21adc0bfc372.css"],"stack":["e29298edc07edb6d","canopyx-stack.82a5a0c6383519dc.js","canopyx-stack.b867aa57edf9002c.css"],"time-slider":["5516099a165cc345","canopyx-time-slider.ed59a275671c729f.js","canopyx-time-slider.dfc55326f03e1d4a.css"],"view-intents":["dbd26360f2b90a49","canopyx-view-intents.3adcb56dffca0650.js","canopyx-view-intents.29a5c2de68ce3ba0.css"],"compare":["46245b96483e9c30","canopyx-compare.2a8ddc0ce67e903f.js","canopyx-compare.da0a2dff321e782d.css"]},PART_CODE=new Map(),SHARED_PARTS={},partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
535
+ const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"ui-overlays":["24afaa117ebf3fb5","canopyx-ui-overlays.dedc42d3a501a387.js","canopyx-ui-overlays.3668a9a74004ea8e.css"],"ui-menu":["352b1ee391133ff0","canopyx-ui-menu.f9abee36db8f6ad2.js","canopyx-ui-menu.2f3478cc5f5c272f.css"],"ui-picker":["d415103478faf52a","canopyx-ui-picker.13e544bd68aca998.js","canopyx-ui-picker.59c85a1988a287a9.css"],"ui-navigation":["2553d01c5276d56a","canopyx-ui-navigation.c4ebc214197f140d.js","canopyx-ui-navigation.0afd07bbdc5aecb5.css"],"ui-tabs":["19ece8184f3daf4a","canopyx-ui-tabs.6cd35b2afd89f530.js","canopyx-ui-tabs.7bb6c6f1341e87e9.css"],"ui-stepper":["5682c49db1b85314","canopyx-ui-stepper.96973189b0f6e0c4.js","canopyx-ui-stepper.1d4a9db373b8d2f2.css"],"ui-accordion":["1424f075b78d0ccd","canopyx-ui-accordion.d0d5daa7f73d0859.js","canopyx-ui-accordion.a3ef9c27cea5b7a4.css"],"tree-tools":["ef0d06c82135ae2e","canopyx-tree-tools.1c4b9e286dde6065.js","canopyx-tree-tools.350dd0ee46757029.css"],"presenters":["d5f9d61bb730974b","canopyx-presenters.d71f9e12d83969d9.js"],"filter-editor":["b760f978327dbab0","canopyx-filter-editor.4851bd579e7d146c.js","canopyx-filter-editor.2e0cf6850cbd3235.css"],"export":["15abf3205094bda6","canopyx-export.68b90138463329fe.js"],"office-export":["4fb7a4d570390ee9","canopyx-office-export.7e62c385b884e75b.js"],"history":["7d9901d2fe04df72","canopyx-history.9432e724bf14c9ed.js"],"pager":["cc30dd4f6d3feeb0","canopyx-pager.2a6f5da8c93de083.js","canopyx-pager.c1e16027780b7fdd.css"],"enhance":["a3b4be5ec19a43a6","canopyx-enhance.4a189cba27c290de.js"],"data":["bab770170bd2cfdd","canopyx-data.34325d1fd693886e.js"],"forms":["381a3edba481660b","canopyx-forms.fa85aa9e8b62876a.js","canopyx-forms.50a5ddb0fcc98bdf.css"],"flow":["02a915fe174e4710","canopyx-flow.2ec165998fe2950d.js","canopyx-flow.347ecd64183ea3a1.css"],"flow-host":["7169c4283cec8b25","canopyx-flow-host.52ccd1a2b6cd53f7.js","canopyx-flow-host.a7c8d3fc930ad3a9.css"],"flow-checks":["53394e75b7d1b0e2","canopyx-flow-checks.76e58f9d05eaa78f.js","canopyx-flow-checks.88dd9f389b249147.css"],"flow-options":["60450342239ded26","canopyx-flow-options.d31458a54aa4b1e7.js"],"flow-pick":["7e0924c72fdd2f74","canopyx-flow-pick.c2e34da944b0edab.js","canopyx-flow-pick.ce7687598d4703f1.css"],"flow-records":["0b652a9789ce4128","canopyx-flow-records.df8aba0a303019e0.js","canopyx-flow-records.393243243aae9a56.css"],"flow-drafts":["fac75bf905a77d0b","canopyx-flow-drafts.c7db634ab651e9fc.js","canopyx-flow-drafts.2c43cff1ce9be700.css"],"flow-preview":["5e8207eed3801f91","canopyx-flow-preview.3924dc8410f9775d.js","canopyx-flow-preview.069c52c33e87ffb4.css"],"flow-command":["a30245a47f6d4530","canopyx-flow-command.b145a234a6ecc8a2.js","canopyx-flow-command.f98b5333af3a0e17.css"],"flow-tasks":["8a4437f5216ac3ee","canopyx-flow-tasks.569d4c40d317472b.js","canopyx-flow-tasks.54857a9f2732048a.css"],"flow-dialog":["8c45e0a8bb6a8ab9","canopyx-flow-dialog.cb4e85bcb7383fe2.js","canopyx-flow-dialog.58bd5d446415e01a.css"],"flow-links":["2c14b19c9236e90d","canopyx-flow-links.7b6cfe42d28b6067.js"],"flow-endpoint":["f5cddfc9545e0920","canopyx-flow-endpoint.b31146202bd76aac.js"],"flow-facts":["385b5e61ed487e16","canopyx-flow-facts.8dad3bc07a71fdb0.js"],"flow-consent":["22121778bc0d07c5","canopyx-flow-consent.749b97f13039bc71.js","canopyx-flow-consent.9f6580d3673ae8bf.css"],"matrix":["002a6d917bb4d638","canopyx-matrix.17ae2d0e03ad1364.js","canopyx-matrix.59fc6920ae000d49.css"],"changes":["7d9a526aa07a8838","canopyx-changes.75f1a61cbba98a4f.js","canopyx-changes.5f0ae1710b8b081c.css"],"editing":["88e4ca705a7eb0c3","canopyx-editing.6a6df811fb4dde54.js","canopyx-editing.4816f6be6f89d794.css"],"column-groups":["91abd99e8ff95b58","canopyx-column-groups.4c71d23375de727c.js","canopyx-column-groups.4e4131c1e2df40b1.css"],"cell-range":["cb29468954702795","canopyx-cell-range.d4f99a024db5d0f8.js","canopyx-cell-range.c790b8f140b1243b.css"],"links":["c6579c9401f0971d","canopyx-links.b25760079f57e6e1.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"formatting":["0feff4e3424599e9","canopyx-formatting.94536547a1d35e9b.js","canopyx-formatting.22b2400c566e25d6.css"],"format-editor":["97085e181fbc1cf7","canopyx-format-editor.a6bc57c48173bfc0.js","canopyx-format-editor.d5aaa8e873d92695.css"],"link":["7485f5c9875e9f9b","canopyx-link.9066770aa822fe0f.js","canopyx-link.997fefec6b85f0c5.css"],"detail-rows":["1892f1fd9d035c0f","canopyx-detail-rows.8be98dbc5721170a.js","canopyx-detail-rows.275076ec8bd9144a.css"],"calculations":["f902dc5856fc7bdd","canopyx-calculations.97e438237ba43f99.js","canopyx-calculations.50432e524dd7d8d9.css"],"pivot":["577443c67c7ed719","canopyx-pivot.3abc630122030933.js","canopyx-pivot.5670e62c0bbf114f.css"],"values":["0d7006b0f7bfca10","canopyx-values.ad4c56fcbcd89cbb.js","canopyx-values.446654b98c62ef1d.css"],"buckets":["cc69c8336c15df83","canopyx-buckets.1f59613f13ee292c.js"],"grouping":["c82705991ff01a4c","canopyx-grouping.239f13b0785a2e30.js","canopyx-grouping.a91801c602d752b3.css"],"highlight":["5ebf0042011ba4fd","canopyx-highlight.ff11a0ca8e30102b.js","canopyx-highlight.9c26291cbcd0962b.css"],"layouts":["90267e35e7edf3a4","canopyx-layouts.058b8a396f909a79.js","canopyx-layouts.ca17f42babc4192a.css"],"facets":["e78c2340a96fa802","canopyx-facets.74b2e520a3c04580.js","canopyx-facets.e2970dd7cf0c3da6.css"],"live":["78791b002a111843","canopyx-live.878dc16d683abb72.js","canopyx-live.9881627f352f59da.css"],"record-panel":["cb6bcd1baf644a51","canopyx-record-panel.557c676822e8624f.js","canopyx-record-panel.174846a640de979f.css"],"calendar":["b414f93d261b2b76","canopyx-calendar.b25ab96faed29154.js","canopyx-calendar.e3f3eaca3f05bb03.css"],"calendar-recurrence":["64bcc24d785bd1af","canopyx-calendar-recurrence.4b7f430c2a64de23.js"],"calendar-edit":["09747e191820d94c","canopyx-calendar-edit.174f5125d3e75bd9.js"],"calendar-ics":["ac8b2950fccbfb0f","canopyx-calendar-ics.4a18c1c4a1520418.js"],"calendar-screen":["c2be4b1ddf96a778","canopyx-calendar-screen.00a3a9b445e504f6.js","canopyx-calendar-screen.1f4866e9a24e75f3.css"],"timeline":["cb9b9dd33154172c","canopyx-timeline.a3dea165914fa7fd.js","canopyx-timeline.44c3156c218531e2.css"],"grid-options":["ee53e6f124b99d5a","canopyx-grid-options.9f8604806c93bf19.js","canopyx-grid-options.e85648a66d70d5b5.css"],"board":["dd02be00df77f53a","canopyx-board.81de43b6e0f4aec3.js","canopyx-board.b62cc3a0348e758a.css"],"plan":["db07c2eb53541d49","canopyx-plan.f3bf394516b627b7.js","canopyx-plan.743201d95414f399.css"],"path":["c6fa2dbab6a0dbaa","canopyx-path.97c3ee2b076b2db6.js","canopyx-path.efba21adc0bfc372.css"],"stack":["e29298edc07edb6d","canopyx-stack.82a5a0c6383519dc.js","canopyx-stack.b867aa57edf9002c.css"],"time-slider":["5516099a165cc345","canopyx-time-slider.ed59a275671c729f.js","canopyx-time-slider.dfc55326f03e1d4a.css"],"view-intents":["dbd26360f2b90a49","canopyx-view-intents.3adcb56dffca0650.js","canopyx-view-intents.29a5c2de68ce3ba0.css"],"compare":["46245b96483e9c30","canopyx-compare.2a8ddc0ce67e903f.js","canopyx-compare.da0a2dff321e782d.css"]},PART_CODE=new Map(),SHARED_PARTS={},partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
536
536
  function registerPart(name,part){if(!partName(name)||!part||typeof part.version!=="string"||typeof part.install!=="function"||
537
537
  part.requires!==undefined&&!(Array.isArray(part.requires)&&part.requires.every(partName)))throw new Error("CanopyX: invalid part.");PART_CODE.set(name,part)}
538
538
  function definePart(View,name,label,context){const parts=View.prototype.parts||={};return parts[name]={name,label,context,parts}}
@@ -1067,7 +1067,7 @@ ids.some(id=>!this.columns.some(column=>column.id===id)))throw new Error("Canopy
1067
1067
  catch(_){/* A disabled or full storage leaves the current session usable. */ }
1068
1068
  }});const GRID_HISTORY_IMPL={},GRID_HISTORY=definePart(DataGrid,"history","history presenters",()=>({GRID_HISTORY_IMPL,h,setText,fill,gridSeries,gridPresenterTone,toneColors,toneOf,GRID_TONE_RANK}));const GRID_HISTORY_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.loadHistory=function(){return this.historyLoad||=loadPart(GRID_HISTORY).then(()=>{this.version++;this.scheduleRender()},error=>this.emit("error",{error}))};DataGrid.prototype.initializeState=function(){const ready=GRID_HISTORY_INIT.call(this);return this.columns.some(column=>GRID_HISTORY_KINDS.includes(column.presenter?.kind))?Promise.all([ready,this.loadHistory()]).then(([result])=>result):ready};const GRID_BOARD=definePart(DataGrid,"board","board view",()=>({DataGrid,h,setText,fill,cellValue,cellText,gridScalar,gridQueryRows,gridQuery,validateGridPage,validateGridCursorPage,numberFormat,PROTOCOL}));const GRID_BOARD_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_BOARD_INIT.call(this);return this.view.board?loadPart(GRID_BOARD).then(()=>{if(!this.destroyed)this.startBoard()}).then(start):start()};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridBucket:"Bucket",gridBucketNone:"Exact values",gridBucketDay:"Day",gridBucketWeek:"Week",gridBucketMonth:"Month",gridBucketQuarter:"Quarter",gridBucketYear:"Year",gridBucketHour:"Hour of day",gridBucketWeekday:"Weekday",gridBucketWidth:"Range width",gridBucketEdges:"Range edges",gridBucketOrigin:"Range origin",gridBucketInvalid:"Enter valid bucket settings."}));const BUCKETS_PART=definePart(DataGrid,"buckets","date and range buckets",()=>({GRID_BUCKETS}));const gridUsesBuckets=view=>view.reporting?.groupBy?.some(level=>level.bucket)||view.facets?.columns?.some(facet=>facet?.bucket)||
1069
1069
  view.query?.groupBy?.some(level=>level.bucket)||gridQueryUsesBucketFilters(view.query);function gridQueryUsesBucketFilters(query){const group=node=>!!node&&(node.filters?.some(filter=>filter.bucket)||node.groups?.some(group));return query?.filters?.some(filter=>filter.bucket)||group(query?.filterGroup)||query?.tupleFilters?.some(tuple=>tuple.columns?.some(field=>field.bucket))}
1070
- const BUCKET_REQUEST_PAGE=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=async function(query,signal){if(gridQueryUsesBucketFilters(query))await loadPart(BUCKETS_PART);return BUCKET_REQUEST_PAGE.call(this,query,signal)};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridCalculationAdd:"Add calculated column",gridCalculationTitle:"Column title",gridCalculationId:"Column ID",gridCalculationExpression:"Expression",gridCalculationError:"Calculation error: {error}",gridCalculationInvalid:"Check the expression, column references and result kind.",gridCalculationHelp:"Use [columnId], arithmetic, IF, COALESCE, ROUND, CONCAT, DATEPART or DATEDIFF.",gridCalculationResultType:"Result type",gridCalculationDivideZero:"Division by zero",gridCalculationNumber:"Number",gridCalculationDate:"Date and time"}));const GRID_CALCULATIONS={},CALCULATIONS_PART=definePart(DataGrid,"calculations","calculated columns",()=>({DataGrid,GRID_CALCULATIONS,requireIdentifier,cellValue,h,setText,fill,gridButton,gridQuery,gridQueryStart,inlineGridSource,rowDataSource,loadGridFilterEditor,gridFreeze,gridFitPrepare}));const gridUsesCalculations=view=>view.calculatedColumnsEditable||view.columns.some(column=>column.calculation!==undefined);Object.assign(DataGrid.prototype,{async prepareCalculations(){if(!gridUsesCalculations(this.view))return;await loadPart(CALCULATIONS_PART);GRID_CALCULATIONS.prepare(this)},async setCalculatedColumns(columns){await loadPart(CALCULATIONS_PART);return this.setCalculatedColumns(columns)},getCalculatedColumns(){return GRID_CALCULATIONS.definitions?.(this.view)||[]},async openCalculatedColumn(anchor){await loadPart(CALCULATIONS_PART);return this.openCalculatedColumn(anchor)}});const GRID_CALENDAR=definePart(DataGrid,"calendar","calendar",()=>({DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,loadPart,HostCellContext,disposeHostSlot,PROTOCOL,toneVariable,bindContextMenu}));definePart(DataGrid,"timeline","resource timeline",()=>({DataGrid,TreeGrid,h,setText,fill,numberFormat,toneVariable}));definePart(DataGrid,"calendar-recurrence","calendar recurrence",()=>({DataGrid}));definePart(DataGrid,"calendar-edit","calendar editing",()=>({DataGrid,h,setText,fill,cellValue,GRID_DRAG}));definePart(DataGrid,"calendar-ics","iCalendar",()=>({DataGrid,h,fill,cellText}));const GRID_CALENDAR_API=["getCalendar","setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","editCalendarOccurrence","clearCalendarSelection","setCalendarSource"];for(const name of GRID_CALENDAR_API)DataGrid.prototype[name]=function(...args){return this.loadCalendar().then(()=>this[name](...args))};DataGrid.prototype.loadCalendar=function(){return this.calLoad||=loadPart(GRID_CALENDAR).then(()=>this.destroyed||this.calParts()).then(()=>this.destroyed||this.startCalendar()).catch(error=>{this.calLoad=null;this.emit("error",{error});throw error})};const GRID_CALENDAR_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_CALENDAR_INIT.call(this);return this.view.calendar?this.loadCalendar().then(start,start):start()};const CAL_PRESETS={basic:{toolbar:false,details:"popover",views:["month","week","day","agenda"]},standard:{toolbar:["search","filters","export"],details:"popover",print:true,views:["month","week","day","days","agenda","year"]},scheduler:{toolbar:["search","filters","views","export"],details:"drawer",print:true,editable:true,create:true,views:["month","week","day","agenda"]}};const CAL_FIELDS=["allDay","description","tone","resource","resourceIds","recurrence","exceptions","series","recurrenceId","source"];const CAL_TITLES={allDay:"All day",description:"Description",tone:"Tone",resource:"Resource",resourceIds:"Resources",series:"Series",recurrenceId:"Original start",recurrence:"Repeats",exceptions:"Exceptions",source:"Source"};const CAL_OWN=new Set(["events","preset","id","label","views","view","date","timeZone","firstDay","toolbar","details","editable","create","drop","resources","timeline","live","facets","drawer","export","print","sources","calendar","links"]);const calPad=(value,size=2)=>String(value).padStart(size,"0");function calInstantText(value,field,allDay){if(value instanceof Date&&Number.isFinite(value.getTime()))
1070
+ const BUCKET_REQUEST_PAGE=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=async function(query,signal){if(gridQueryUsesBucketFilters(query))await loadPart(BUCKETS_PART);return BUCKET_REQUEST_PAGE.call(this,query,signal)};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridCalculationAdd:"Add calculated column",gridCalculationTitle:"Column title",gridCalculationId:"Column ID",gridCalculationExpression:"Expression",gridCalculationError:"Calculation error: {error}",gridCalculationInvalid:"Check the expression, column references and result kind.",gridCalculationHelp:"Use [columnId], arithmetic, IF, COALESCE, ROUND, CONCAT, DATEPART or DATEDIFF.",gridCalculationResultType:"Result type",gridCalculationDivideZero:"Division by zero",gridCalculationNumber:"Number",gridCalculationDate:"Date and time"}));const GRID_CALCULATIONS={},CALCULATIONS_PART=definePart(DataGrid,"calculations","calculated columns",()=>({DataGrid,GRID_CALCULATIONS,requireIdentifier,cellValue,h,setText,fill,gridButton,gridQuery,gridQueryStart,inlineGridSource,rowDataSource,loadGridFilterEditor,gridFreeze,gridFitPrepare}));const gridUsesCalculations=view=>view.calculatedColumnsEditable||view.columns.some(column=>column.calculation!==undefined);Object.assign(DataGrid.prototype,{async prepareCalculations(){if(!gridUsesCalculations(this.view))return;await loadPart(CALCULATIONS_PART);GRID_CALCULATIONS.prepare(this)},async setCalculatedColumns(columns){await loadPart(CALCULATIONS_PART);return this.setCalculatedColumns(columns)},getCalculatedColumns(){return GRID_CALCULATIONS.definitions?.(this.view)||[]},async openCalculatedColumn(anchor){await loadPart(CALCULATIONS_PART);return this.openCalculatedColumn(anchor)}});const GRID_CALENDAR=definePart(DataGrid,"calendar","calendar",()=>({DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,loadPart,HostCellContext,disposeHostSlot,PROTOCOL,toneVariable,bindContextMenu}));definePart(DataGrid,"timeline","resource timeline",()=>({DataGrid,TreeGrid,h,setText,fill,numberFormat,toneVariable}));definePart(DataGrid,"calendar-recurrence","calendar recurrence",()=>({DataGrid}));definePart(DataGrid,"calendar-edit","calendar editing",()=>({DataGrid,h,setText,fill,cellValue,GRID_DRAG}));definePart(DataGrid,"calendar-ics","iCalendar",()=>({DataGrid,h,fill,cellText}));definePart(DataGrid,"calendar-screen","calendar shared screens",()=>({DataGrid,h,setText,fill,gridButton,gridFreeze,toneVariable}));const GRID_CALENDAR_API=["getCalendar","setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","editCalendarOccurrence","clearCalendarSelection","setCalendarSource","resetCalendar"];for(const name of GRID_CALENDAR_API)DataGrid.prototype[name]=function(...args){return this.loadCalendar().then(()=>this[name](...args))};DataGrid.prototype.loadCalendar=function(){return this.calLoad||=loadPart(GRID_CALENDAR).then(()=>this.destroyed||this.calParts()).then(()=>this.destroyed||this.startCalendar()).catch(error=>{this.calLoad=null;this.emit("error",{error});throw error})};const GRID_CALENDAR_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_CALENDAR_INIT.call(this);return this.view.calendar?this.loadCalendar().then(start,start):start()};const CAL_PRESETS={basic:{toolbar:false,details:"popover",views:["month","week","day","agenda"]},standard:{toolbar:["search","filters","export"],details:"popover",print:true,views:["month","week","day","days","agenda","year"]},scheduler:{toolbar:["search","filters","views","export"],details:"drawer",print:true,editable:true,create:true,views:["month","week","day","agenda"]}};const CAL_FIELDS=["allDay","description","location","tone","resource","resourceIds","recurrence","exceptions","series","recurrenceId","source"];const CAL_TITLES={allDay:"All day",description:"Description",location:"Location",tone:"Tone",resource:"Resource",resourceIds:"Resources",series:"Series",recurrenceId:"Original start",recurrence:"Repeats",exceptions:"Exceptions",source:"Source"};const CAL_OWN=new Set(["events","preset","id","label","views","view","date","timeZone","firstDay","toolbar","details","editable","create","drop","resources","timeline","live","facets","drawer","export","print","sources","calendar","links"]);const calPad=(value,size=2)=>String(value).padStart(size,"0");function calInstantText(value,field,allDay){if(value instanceof Date&&Number.isFinite(value.getTime()))
1071
1071
  return allDay?calPad(value.getFullYear(),4)+ "-"+calPad(value.getMonth()+ 1)+ "-"+calPad(value.getDate())+ "T00:00:00Z":value.toISOString().replace(".000Z","Z");if(typeof value==="string"&&/^\d{4}-\d\d-\d\d$/.test(value)) return value + "T00:00:00Z";
1072
1072
  if(typeof value==="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d(:\d\d(\.\d+)?)?(Z|[+-]\d\d:\d\d)$/.test(value)) return allDay ? value.slice(0, 10) + "T00:00:00Z" : value;
1073
1073
  const parsed=typeof value==="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d/.test(value) ? new Date(value) : null;
@@ -488,7 +488,7 @@ body .cx-host.cx-chrome{padding:0;}
488
488
  .cx-grid-column-handle{min-width:var(--cx-size-24px);}
489
489
  .cx-grid-column-find{margin-bottom:var(--cx-size-4px);}
490
490
  .cx-data-grid{min-width:0;max-width:100%;box-sizing:border-box;}
491
- .cx-data-grid[data-cx-chrome="embedded"]{--cx-grid-surface:var(--hfx-color-surface-raised,light-dark(#ffffff,#1e2126));--cx-grid-header:color-mix(in srgb,var(--hfx-color-text-primary,var(--hfx-color-text,light-dark(#16181c,#f2f3f5))) 4%,var(--hfx-color-surface-raised,light-dark(#ffffff,#1e2126)));}
491
+ .cx-data-grid[data-cx-chrome="embedded"]{--cx-grid-surface:var(--hfx-color-surface-card,var(--hfx-color-surface-raised,light-dark(#ffffff,#1e2126)));--cx-grid-header:color-mix(in srgb,var(--hfx-color-text-primary,var(--hfx-color-text,light-dark(#16181c,#f2f3f5))) 4%,var(--cx-grid-surface));}
492
492
  .cx-data-grid[data-cx-chrome="embedded"] .cx-hrow{background:var(--cx-grid-header);}
493
493
  .cx-data-grid .cx-grid{min-width:0;max-width:100%;}
494
494
  .cx-data-grid.cx-phone .cx-cell:has(> .cx-phone-primary){display:block;min-width:0;white-space:normal;}
@@ -530,7 +530,7 @@ close()}else{return}
530
530
  e.preventDefault()});input.addEventListener("blur",()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);blurTimer=setTimeout(close,150)});this.cancelSearch=()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);hits=[];close()};box.appendChild(input);box.appendChild(list);box.appendChild(status);bar.appendChild(box);this.searchInput=input}});function watchFlyout(anchorElement,panel,isOpen){const lifetime=new AbortController();let flyout=null,pending=null;const ready=()=>flyout?Promise.resolve(flyout):pending||=loadPart(SHARED_PARTS["ui-overlays"]).then(()=>{if(!lifetime.signal.aborted)flyout=UI_TOOLS.toolbarFlyout(anchorElement,panel,isOpen,lifetime.signal);return flyout}).catch(error=>{pending=null;throw error});const invoke=method=>{if(lifetime.signal.aborted||!isOpen())return;if(flyout){flyout[method]();return}
531
531
  ready().then(value=>{if(!lifetime.signal.aborted&&isOpen())value?.[method]()}).catch(error=>{if(!lifetime.signal.aborted)(anchorElement.closest(".cx-host")||anchorElement)
532
532
  .dispatchEvent(new CustomEvent("canopyx:error",{detail:{error},bubbles:true}))})};return{position:()=>invoke("position"),open:()=>invoke("open"),close:()=>flyout?.close(),dispose:()=>lifetime.abort()}}
533
- const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"ui-overlays":["24afaa117ebf3fb5","canopyx-ui-overlays.dedc42d3a501a387.js","canopyx-ui-overlays.3668a9a74004ea8e.css"],"ui-menu":["352b1ee391133ff0","canopyx-ui-menu.f9abee36db8f6ad2.js","canopyx-ui-menu.2f3478cc5f5c272f.css"],"ui-picker":["d415103478faf52a","canopyx-ui-picker.13e544bd68aca998.js","canopyx-ui-picker.59c85a1988a287a9.css"],"ui-navigation":["2553d01c5276d56a","canopyx-ui-navigation.c4ebc214197f140d.js","canopyx-ui-navigation.0afd07bbdc5aecb5.css"],"ui-tabs":["19ece8184f3daf4a","canopyx-ui-tabs.6cd35b2afd89f530.js","canopyx-ui-tabs.7bb6c6f1341e87e9.css"],"ui-stepper":["5682c49db1b85314","canopyx-ui-stepper.96973189b0f6e0c4.js","canopyx-ui-stepper.1d4a9db373b8d2f2.css"],"ui-accordion":["1424f075b78d0ccd","canopyx-ui-accordion.d0d5daa7f73d0859.js","canopyx-ui-accordion.a3ef9c27cea5b7a4.css"],"tree-tools":["ef0d06c82135ae2e","canopyx-tree-tools.1c4b9e286dde6065.js","canopyx-tree-tools.350dd0ee46757029.css"],"presenters":["d5f9d61bb730974b","canopyx-presenters.d71f9e12d83969d9.js"],"filter-editor":["b760f978327dbab0","canopyx-filter-editor.4851bd579e7d146c.js","canopyx-filter-editor.2e0cf6850cbd3235.css"],"export":["15abf3205094bda6","canopyx-export.68b90138463329fe.js"],"office-export":["4fb7a4d570390ee9","canopyx-office-export.7e62c385b884e75b.js"],"history":["7d9901d2fe04df72","canopyx-history.9432e724bf14c9ed.js"],"pager":["cc30dd4f6d3feeb0","canopyx-pager.2a6f5da8c93de083.js","canopyx-pager.c1e16027780b7fdd.css"],"enhance":["a3b4be5ec19a43a6","canopyx-enhance.4a189cba27c290de.js"],"data":["bab770170bd2cfdd","canopyx-data.34325d1fd693886e.js"],"forms":["381a3edba481660b","canopyx-forms.fa85aa9e8b62876a.js","canopyx-forms.50a5ddb0fcc98bdf.css"],"flow":["02a915fe174e4710","canopyx-flow.2ec165998fe2950d.js","canopyx-flow.347ecd64183ea3a1.css"],"flow-host":["7169c4283cec8b25","canopyx-flow-host.52ccd1a2b6cd53f7.js","canopyx-flow-host.a7c8d3fc930ad3a9.css"],"flow-checks":["53394e75b7d1b0e2","canopyx-flow-checks.76e58f9d05eaa78f.js","canopyx-flow-checks.88dd9f389b249147.css"],"flow-options":["60450342239ded26","canopyx-flow-options.d31458a54aa4b1e7.js"],"flow-pick":["7e0924c72fdd2f74","canopyx-flow-pick.c2e34da944b0edab.js","canopyx-flow-pick.ce7687598d4703f1.css"],"flow-records":["0b652a9789ce4128","canopyx-flow-records.df8aba0a303019e0.js","canopyx-flow-records.393243243aae9a56.css"],"flow-drafts":["fac75bf905a77d0b","canopyx-flow-drafts.c7db634ab651e9fc.js","canopyx-flow-drafts.2c43cff1ce9be700.css"],"flow-preview":["5e8207eed3801f91","canopyx-flow-preview.3924dc8410f9775d.js","canopyx-flow-preview.069c52c33e87ffb4.css"],"flow-command":["a30245a47f6d4530","canopyx-flow-command.b145a234a6ecc8a2.js","canopyx-flow-command.f98b5333af3a0e17.css"],"flow-tasks":["8a4437f5216ac3ee","canopyx-flow-tasks.569d4c40d317472b.js","canopyx-flow-tasks.54857a9f2732048a.css"],"flow-dialog":["8c45e0a8bb6a8ab9","canopyx-flow-dialog.cb4e85bcb7383fe2.js","canopyx-flow-dialog.58bd5d446415e01a.css"],"flow-links":["2c14b19c9236e90d","canopyx-flow-links.7b6cfe42d28b6067.js"],"flow-endpoint":["f5cddfc9545e0920","canopyx-flow-endpoint.b31146202bd76aac.js"],"flow-facts":["385b5e61ed487e16","canopyx-flow-facts.8dad3bc07a71fdb0.js"],"flow-consent":["22121778bc0d07c5","canopyx-flow-consent.749b97f13039bc71.js","canopyx-flow-consent.9f6580d3673ae8bf.css"],"matrix":["002a6d917bb4d638","canopyx-matrix.17ae2d0e03ad1364.js","canopyx-matrix.59fc6920ae000d49.css"],"changes":["7d9a526aa07a8838","canopyx-changes.75f1a61cbba98a4f.js","canopyx-changes.5f0ae1710b8b081c.css"],"editing":["88e4ca705a7eb0c3","canopyx-editing.6a6df811fb4dde54.js","canopyx-editing.4816f6be6f89d794.css"],"column-groups":["91abd99e8ff95b58","canopyx-column-groups.4c71d23375de727c.js","canopyx-column-groups.4e4131c1e2df40b1.css"],"cell-range":["cb29468954702795","canopyx-cell-range.d4f99a024db5d0f8.js","canopyx-cell-range.c790b8f140b1243b.css"],"links":["c6579c9401f0971d","canopyx-links.b25760079f57e6e1.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"formatting":["0feff4e3424599e9","canopyx-formatting.94536547a1d35e9b.js","canopyx-formatting.22b2400c566e25d6.css"],"format-editor":["97085e181fbc1cf7","canopyx-format-editor.a6bc57c48173bfc0.js","canopyx-format-editor.d5aaa8e873d92695.css"],"link":["7485f5c9875e9f9b","canopyx-link.9066770aa822fe0f.js","canopyx-link.997fefec6b85f0c5.css"],"detail-rows":["1892f1fd9d035c0f","canopyx-detail-rows.8be98dbc5721170a.js","canopyx-detail-rows.275076ec8bd9144a.css"],"calculations":["f902dc5856fc7bdd","canopyx-calculations.97e438237ba43f99.js","canopyx-calculations.50432e524dd7d8d9.css"],"pivot":["577443c67c7ed719","canopyx-pivot.3abc630122030933.js","canopyx-pivot.5670e62c0bbf114f.css"],"values":["0d7006b0f7bfca10","canopyx-values.ad4c56fcbcd89cbb.js","canopyx-values.446654b98c62ef1d.css"],"buckets":["cc69c8336c15df83","canopyx-buckets.1f59613f13ee292c.js"],"grouping":["c82705991ff01a4c","canopyx-grouping.239f13b0785a2e30.js","canopyx-grouping.a91801c602d752b3.css"],"highlight":["5ebf0042011ba4fd","canopyx-highlight.ff11a0ca8e30102b.js","canopyx-highlight.9c26291cbcd0962b.css"],"layouts":["90267e35e7edf3a4","canopyx-layouts.058b8a396f909a79.js","canopyx-layouts.ca17f42babc4192a.css"],"facets":["e78c2340a96fa802","canopyx-facets.74b2e520a3c04580.js","canopyx-facets.e2970dd7cf0c3da6.css"],"live":["78791b002a111843","canopyx-live.878dc16d683abb72.js","canopyx-live.9881627f352f59da.css"],"record-panel":["cb6bcd1baf644a51","canopyx-record-panel.557c676822e8624f.js","canopyx-record-panel.174846a640de979f.css"],"calendar":["e11aad6b723ddf23","canopyx-calendar.79518c25ddf28dd7.js","canopyx-calendar.47490d57a6e6c1dc.css"],"calendar-recurrence":["64bcc24d785bd1af","canopyx-calendar-recurrence.4b7f430c2a64de23.js"],"calendar-edit":["09747e191820d94c","canopyx-calendar-edit.174f5125d3e75bd9.js"],"calendar-ics":["ac8b2950fccbfb0f","canopyx-calendar-ics.4a18c1c4a1520418.js"],"timeline":["cb9b9dd33154172c","canopyx-timeline.a3dea165914fa7fd.js","canopyx-timeline.44c3156c218531e2.css"],"grid-options":["ee53e6f124b99d5a","canopyx-grid-options.9f8604806c93bf19.js","canopyx-grid-options.e85648a66d70d5b5.css"],"board":["dd02be00df77f53a","canopyx-board.81de43b6e0f4aec3.js","canopyx-board.b62cc3a0348e758a.css"],"plan":["db07c2eb53541d49","canopyx-plan.f3bf394516b627b7.js","canopyx-plan.743201d95414f399.css"],"path":["c6fa2dbab6a0dbaa","canopyx-path.97c3ee2b076b2db6.js","canopyx-path.efba21adc0bfc372.css"],"stack":["e29298edc07edb6d","canopyx-stack.82a5a0c6383519dc.js","canopyx-stack.b867aa57edf9002c.css"],"time-slider":["5516099a165cc345","canopyx-time-slider.ed59a275671c729f.js","canopyx-time-slider.dfc55326f03e1d4a.css"],"view-intents":["dbd26360f2b90a49","canopyx-view-intents.3adcb56dffca0650.js","canopyx-view-intents.29a5c2de68ce3ba0.css"],"compare":["46245b96483e9c30","canopyx-compare.2a8ddc0ce67e903f.js","canopyx-compare.da0a2dff321e782d.css"]},PART_CODE=new Map(),SHARED_PARTS={},partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
533
+ const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"ui-overlays":["24afaa117ebf3fb5","canopyx-ui-overlays.dedc42d3a501a387.js","canopyx-ui-overlays.3668a9a74004ea8e.css"],"ui-menu":["352b1ee391133ff0","canopyx-ui-menu.f9abee36db8f6ad2.js","canopyx-ui-menu.2f3478cc5f5c272f.css"],"ui-picker":["d415103478faf52a","canopyx-ui-picker.13e544bd68aca998.js","canopyx-ui-picker.59c85a1988a287a9.css"],"ui-navigation":["2553d01c5276d56a","canopyx-ui-navigation.c4ebc214197f140d.js","canopyx-ui-navigation.0afd07bbdc5aecb5.css"],"ui-tabs":["19ece8184f3daf4a","canopyx-ui-tabs.6cd35b2afd89f530.js","canopyx-ui-tabs.7bb6c6f1341e87e9.css"],"ui-stepper":["5682c49db1b85314","canopyx-ui-stepper.96973189b0f6e0c4.js","canopyx-ui-stepper.1d4a9db373b8d2f2.css"],"ui-accordion":["1424f075b78d0ccd","canopyx-ui-accordion.d0d5daa7f73d0859.js","canopyx-ui-accordion.a3ef9c27cea5b7a4.css"],"tree-tools":["ef0d06c82135ae2e","canopyx-tree-tools.1c4b9e286dde6065.js","canopyx-tree-tools.350dd0ee46757029.css"],"presenters":["d5f9d61bb730974b","canopyx-presenters.d71f9e12d83969d9.js"],"filter-editor":["b760f978327dbab0","canopyx-filter-editor.4851bd579e7d146c.js","canopyx-filter-editor.2e0cf6850cbd3235.css"],"export":["15abf3205094bda6","canopyx-export.68b90138463329fe.js"],"office-export":["4fb7a4d570390ee9","canopyx-office-export.7e62c385b884e75b.js"],"history":["7d9901d2fe04df72","canopyx-history.9432e724bf14c9ed.js"],"pager":["cc30dd4f6d3feeb0","canopyx-pager.2a6f5da8c93de083.js","canopyx-pager.c1e16027780b7fdd.css"],"enhance":["a3b4be5ec19a43a6","canopyx-enhance.4a189cba27c290de.js"],"data":["bab770170bd2cfdd","canopyx-data.34325d1fd693886e.js"],"forms":["381a3edba481660b","canopyx-forms.fa85aa9e8b62876a.js","canopyx-forms.50a5ddb0fcc98bdf.css"],"flow":["02a915fe174e4710","canopyx-flow.2ec165998fe2950d.js","canopyx-flow.347ecd64183ea3a1.css"],"flow-host":["7169c4283cec8b25","canopyx-flow-host.52ccd1a2b6cd53f7.js","canopyx-flow-host.a7c8d3fc930ad3a9.css"],"flow-checks":["53394e75b7d1b0e2","canopyx-flow-checks.76e58f9d05eaa78f.js","canopyx-flow-checks.88dd9f389b249147.css"],"flow-options":["60450342239ded26","canopyx-flow-options.d31458a54aa4b1e7.js"],"flow-pick":["7e0924c72fdd2f74","canopyx-flow-pick.c2e34da944b0edab.js","canopyx-flow-pick.ce7687598d4703f1.css"],"flow-records":["0b652a9789ce4128","canopyx-flow-records.df8aba0a303019e0.js","canopyx-flow-records.393243243aae9a56.css"],"flow-drafts":["fac75bf905a77d0b","canopyx-flow-drafts.c7db634ab651e9fc.js","canopyx-flow-drafts.2c43cff1ce9be700.css"],"flow-preview":["5e8207eed3801f91","canopyx-flow-preview.3924dc8410f9775d.js","canopyx-flow-preview.069c52c33e87ffb4.css"],"flow-command":["a30245a47f6d4530","canopyx-flow-command.b145a234a6ecc8a2.js","canopyx-flow-command.f98b5333af3a0e17.css"],"flow-tasks":["8a4437f5216ac3ee","canopyx-flow-tasks.569d4c40d317472b.js","canopyx-flow-tasks.54857a9f2732048a.css"],"flow-dialog":["8c45e0a8bb6a8ab9","canopyx-flow-dialog.cb4e85bcb7383fe2.js","canopyx-flow-dialog.58bd5d446415e01a.css"],"flow-links":["2c14b19c9236e90d","canopyx-flow-links.7b6cfe42d28b6067.js"],"flow-endpoint":["f5cddfc9545e0920","canopyx-flow-endpoint.b31146202bd76aac.js"],"flow-facts":["385b5e61ed487e16","canopyx-flow-facts.8dad3bc07a71fdb0.js"],"flow-consent":["22121778bc0d07c5","canopyx-flow-consent.749b97f13039bc71.js","canopyx-flow-consent.9f6580d3673ae8bf.css"],"matrix":["002a6d917bb4d638","canopyx-matrix.17ae2d0e03ad1364.js","canopyx-matrix.59fc6920ae000d49.css"],"changes":["7d9a526aa07a8838","canopyx-changes.75f1a61cbba98a4f.js","canopyx-changes.5f0ae1710b8b081c.css"],"editing":["88e4ca705a7eb0c3","canopyx-editing.6a6df811fb4dde54.js","canopyx-editing.4816f6be6f89d794.css"],"column-groups":["91abd99e8ff95b58","canopyx-column-groups.4c71d23375de727c.js","canopyx-column-groups.4e4131c1e2df40b1.css"],"cell-range":["cb29468954702795","canopyx-cell-range.d4f99a024db5d0f8.js","canopyx-cell-range.c790b8f140b1243b.css"],"links":["c6579c9401f0971d","canopyx-links.b25760079f57e6e1.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"formatting":["0feff4e3424599e9","canopyx-formatting.94536547a1d35e9b.js","canopyx-formatting.22b2400c566e25d6.css"],"format-editor":["97085e181fbc1cf7","canopyx-format-editor.a6bc57c48173bfc0.js","canopyx-format-editor.d5aaa8e873d92695.css"],"link":["7485f5c9875e9f9b","canopyx-link.9066770aa822fe0f.js","canopyx-link.997fefec6b85f0c5.css"],"detail-rows":["1892f1fd9d035c0f","canopyx-detail-rows.8be98dbc5721170a.js","canopyx-detail-rows.275076ec8bd9144a.css"],"calculations":["f902dc5856fc7bdd","canopyx-calculations.97e438237ba43f99.js","canopyx-calculations.50432e524dd7d8d9.css"],"pivot":["577443c67c7ed719","canopyx-pivot.3abc630122030933.js","canopyx-pivot.5670e62c0bbf114f.css"],"values":["0d7006b0f7bfca10","canopyx-values.ad4c56fcbcd89cbb.js","canopyx-values.446654b98c62ef1d.css"],"buckets":["cc69c8336c15df83","canopyx-buckets.1f59613f13ee292c.js"],"grouping":["c82705991ff01a4c","canopyx-grouping.239f13b0785a2e30.js","canopyx-grouping.a91801c602d752b3.css"],"highlight":["5ebf0042011ba4fd","canopyx-highlight.ff11a0ca8e30102b.js","canopyx-highlight.9c26291cbcd0962b.css"],"layouts":["90267e35e7edf3a4","canopyx-layouts.058b8a396f909a79.js","canopyx-layouts.ca17f42babc4192a.css"],"facets":["e78c2340a96fa802","canopyx-facets.74b2e520a3c04580.js","canopyx-facets.e2970dd7cf0c3da6.css"],"live":["78791b002a111843","canopyx-live.878dc16d683abb72.js","canopyx-live.9881627f352f59da.css"],"record-panel":["cb6bcd1baf644a51","canopyx-record-panel.557c676822e8624f.js","canopyx-record-panel.174846a640de979f.css"],"calendar":["b414f93d261b2b76","canopyx-calendar.b25ab96faed29154.js","canopyx-calendar.e3f3eaca3f05bb03.css"],"calendar-recurrence":["64bcc24d785bd1af","canopyx-calendar-recurrence.4b7f430c2a64de23.js"],"calendar-edit":["09747e191820d94c","canopyx-calendar-edit.174f5125d3e75bd9.js"],"calendar-ics":["ac8b2950fccbfb0f","canopyx-calendar-ics.4a18c1c4a1520418.js"],"calendar-screen":["c2be4b1ddf96a778","canopyx-calendar-screen.00a3a9b445e504f6.js","canopyx-calendar-screen.1f4866e9a24e75f3.css"],"timeline":["cb9b9dd33154172c","canopyx-timeline.a3dea165914fa7fd.js","canopyx-timeline.44c3156c218531e2.css"],"grid-options":["ee53e6f124b99d5a","canopyx-grid-options.9f8604806c93bf19.js","canopyx-grid-options.e85648a66d70d5b5.css"],"board":["dd02be00df77f53a","canopyx-board.81de43b6e0f4aec3.js","canopyx-board.b62cc3a0348e758a.css"],"plan":["db07c2eb53541d49","canopyx-plan.f3bf394516b627b7.js","canopyx-plan.743201d95414f399.css"],"path":["c6fa2dbab6a0dbaa","canopyx-path.97c3ee2b076b2db6.js","canopyx-path.efba21adc0bfc372.css"],"stack":["e29298edc07edb6d","canopyx-stack.82a5a0c6383519dc.js","canopyx-stack.b867aa57edf9002c.css"],"time-slider":["5516099a165cc345","canopyx-time-slider.ed59a275671c729f.js","canopyx-time-slider.dfc55326f03e1d4a.css"],"view-intents":["dbd26360f2b90a49","canopyx-view-intents.3adcb56dffca0650.js","canopyx-view-intents.29a5c2de68ce3ba0.css"],"compare":["46245b96483e9c30","canopyx-compare.2a8ddc0ce67e903f.js","canopyx-compare.da0a2dff321e782d.css"]},PART_CODE=new Map(),SHARED_PARTS={},partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
534
534
  function registerPart(name,part){if(!partName(name)||!part||typeof part.version!=="string"||typeof part.install!=="function"||
535
535
  part.requires!==undefined&&!(Array.isArray(part.requires)&&part.requires.every(partName)))throw new Error("CanopyX: invalid part.");PART_CODE.set(name,part)}
536
536
  function definePart(View,name,label,context){const parts=View.prototype.parts||={};return parts[name]={name,label,context,parts}}
@@ -1065,7 +1065,7 @@ ids.some(id=>!this.columns.some(column=>column.id===id)))throw new Error("Canopy
1065
1065
  catch(_){/* A disabled or full storage leaves the current session usable. */ }
1066
1066
  }});const GRID_HISTORY_IMPL={},GRID_HISTORY=definePart(DataGrid,"history","history presenters",()=>({GRID_HISTORY_IMPL,h,setText,fill,gridSeries,gridPresenterTone,toneColors,toneOf,GRID_TONE_RANK}));const GRID_HISTORY_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.loadHistory=function(){return this.historyLoad||=loadPart(GRID_HISTORY).then(()=>{this.version++;this.scheduleRender()},error=>this.emit("error",{error}))};DataGrid.prototype.initializeState=function(){const ready=GRID_HISTORY_INIT.call(this);return this.columns.some(column=>GRID_HISTORY_KINDS.includes(column.presenter?.kind))?Promise.all([ready,this.loadHistory()]).then(([result])=>result):ready};const GRID_BOARD=definePart(DataGrid,"board","board view",()=>({DataGrid,h,setText,fill,cellValue,cellText,gridScalar,gridQueryRows,gridQuery,validateGridPage,validateGridCursorPage,numberFormat,PROTOCOL}));const GRID_BOARD_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_BOARD_INIT.call(this);return this.view.board?loadPart(GRID_BOARD).then(()=>{if(!this.destroyed)this.startBoard()}).then(start):start()};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridBucket:"Bucket",gridBucketNone:"Exact values",gridBucketDay:"Day",gridBucketWeek:"Week",gridBucketMonth:"Month",gridBucketQuarter:"Quarter",gridBucketYear:"Year",gridBucketHour:"Hour of day",gridBucketWeekday:"Weekday",gridBucketWidth:"Range width",gridBucketEdges:"Range edges",gridBucketOrigin:"Range origin",gridBucketInvalid:"Enter valid bucket settings."}));const BUCKETS_PART=definePart(DataGrid,"buckets","date and range buckets",()=>({GRID_BUCKETS}));const gridUsesBuckets=view=>view.reporting?.groupBy?.some(level=>level.bucket)||view.facets?.columns?.some(facet=>facet?.bucket)||
1067
1067
  view.query?.groupBy?.some(level=>level.bucket)||gridQueryUsesBucketFilters(view.query);function gridQueryUsesBucketFilters(query){const group=node=>!!node&&(node.filters?.some(filter=>filter.bucket)||node.groups?.some(group));return query?.filters?.some(filter=>filter.bucket)||group(query?.filterGroup)||query?.tupleFilters?.some(tuple=>tuple.columns?.some(field=>field.bucket))}
1068
- const BUCKET_REQUEST_PAGE=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=async function(query,signal){if(gridQueryUsesBucketFilters(query))await loadPart(BUCKETS_PART);return BUCKET_REQUEST_PAGE.call(this,query,signal)};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridCalculationAdd:"Add calculated column",gridCalculationTitle:"Column title",gridCalculationId:"Column ID",gridCalculationExpression:"Expression",gridCalculationError:"Calculation error: {error}",gridCalculationInvalid:"Check the expression, column references and result kind.",gridCalculationHelp:"Use [columnId], arithmetic, IF, COALESCE, ROUND, CONCAT, DATEPART or DATEDIFF.",gridCalculationResultType:"Result type",gridCalculationDivideZero:"Division by zero",gridCalculationNumber:"Number",gridCalculationDate:"Date and time"}));const GRID_CALCULATIONS={},CALCULATIONS_PART=definePart(DataGrid,"calculations","calculated columns",()=>({DataGrid,GRID_CALCULATIONS,requireIdentifier,cellValue,h,setText,fill,gridButton,gridQuery,gridQueryStart,inlineGridSource,rowDataSource,loadGridFilterEditor,gridFreeze,gridFitPrepare}));const gridUsesCalculations=view=>view.calculatedColumnsEditable||view.columns.some(column=>column.calculation!==undefined);Object.assign(DataGrid.prototype,{async prepareCalculations(){if(!gridUsesCalculations(this.view))return;await loadPart(CALCULATIONS_PART);GRID_CALCULATIONS.prepare(this)},async setCalculatedColumns(columns){await loadPart(CALCULATIONS_PART);return this.setCalculatedColumns(columns)},getCalculatedColumns(){return GRID_CALCULATIONS.definitions?.(this.view)||[]},async openCalculatedColumn(anchor){await loadPart(CALCULATIONS_PART);return this.openCalculatedColumn(anchor)}});const GRID_CALENDAR=definePart(DataGrid,"calendar","calendar",()=>({DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,loadPart,HostCellContext,disposeHostSlot,PROTOCOL,toneVariable,bindContextMenu}));definePart(DataGrid,"timeline","resource timeline",()=>({DataGrid,TreeGrid,h,setText,fill,numberFormat,toneVariable}));definePart(DataGrid,"calendar-recurrence","calendar recurrence",()=>({DataGrid}));definePart(DataGrid,"calendar-edit","calendar editing",()=>({DataGrid,h,setText,fill,cellValue,GRID_DRAG}));definePart(DataGrid,"calendar-ics","iCalendar",()=>({DataGrid,h,fill,cellText}));const GRID_CALENDAR_API=["getCalendar","setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","editCalendarOccurrence","clearCalendarSelection","setCalendarSource"];for(const name of GRID_CALENDAR_API)DataGrid.prototype[name]=function(...args){return this.loadCalendar().then(()=>this[name](...args))};DataGrid.prototype.loadCalendar=function(){return this.calLoad||=loadPart(GRID_CALENDAR).then(()=>this.destroyed||this.calParts()).then(()=>this.destroyed||this.startCalendar()).catch(error=>{this.calLoad=null;this.emit("error",{error});throw error})};const GRID_CALENDAR_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_CALENDAR_INIT.call(this);return this.view.calendar?this.loadCalendar().then(start,start):start()};const CAL_PRESETS={basic:{toolbar:false,details:"popover",views:["month","week","day","agenda"]},standard:{toolbar:["search","filters","export"],details:"popover",print:true,views:["month","week","day","days","agenda","year"]},scheduler:{toolbar:["search","filters","views","export"],details:"drawer",print:true,editable:true,create:true,views:["month","week","day","agenda"]}};const CAL_FIELDS=["allDay","description","tone","resource","resourceIds","recurrence","exceptions","series","recurrenceId","source"];const CAL_TITLES={allDay:"All day",description:"Description",tone:"Tone",resource:"Resource",resourceIds:"Resources",series:"Series",recurrenceId:"Original start",recurrence:"Repeats",exceptions:"Exceptions",source:"Source"};const CAL_OWN=new Set(["events","preset","id","label","views","view","date","timeZone","firstDay","toolbar","details","editable","create","drop","resources","timeline","live","facets","drawer","export","print","sources","calendar","links"]);const calPad=(value,size=2)=>String(value).padStart(size,"0");function calInstantText(value,field,allDay){if(value instanceof Date&&Number.isFinite(value.getTime()))
1068
+ const BUCKET_REQUEST_PAGE=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=async function(query,signal){if(gridQueryUsesBucketFilters(query))await loadPart(BUCKETS_PART);return BUCKET_REQUEST_PAGE.call(this,query,signal)};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridCalculationAdd:"Add calculated column",gridCalculationTitle:"Column title",gridCalculationId:"Column ID",gridCalculationExpression:"Expression",gridCalculationError:"Calculation error: {error}",gridCalculationInvalid:"Check the expression, column references and result kind.",gridCalculationHelp:"Use [columnId], arithmetic, IF, COALESCE, ROUND, CONCAT, DATEPART or DATEDIFF.",gridCalculationResultType:"Result type",gridCalculationDivideZero:"Division by zero",gridCalculationNumber:"Number",gridCalculationDate:"Date and time"}));const GRID_CALCULATIONS={},CALCULATIONS_PART=definePart(DataGrid,"calculations","calculated columns",()=>({DataGrid,GRID_CALCULATIONS,requireIdentifier,cellValue,h,setText,fill,gridButton,gridQuery,gridQueryStart,inlineGridSource,rowDataSource,loadGridFilterEditor,gridFreeze,gridFitPrepare}));const gridUsesCalculations=view=>view.calculatedColumnsEditable||view.columns.some(column=>column.calculation!==undefined);Object.assign(DataGrid.prototype,{async prepareCalculations(){if(!gridUsesCalculations(this.view))return;await loadPart(CALCULATIONS_PART);GRID_CALCULATIONS.prepare(this)},async setCalculatedColumns(columns){await loadPart(CALCULATIONS_PART);return this.setCalculatedColumns(columns)},getCalculatedColumns(){return GRID_CALCULATIONS.definitions?.(this.view)||[]},async openCalculatedColumn(anchor){await loadPart(CALCULATIONS_PART);return this.openCalculatedColumn(anchor)}});const GRID_CALENDAR=definePart(DataGrid,"calendar","calendar",()=>({DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,loadPart,HostCellContext,disposeHostSlot,PROTOCOL,toneVariable,bindContextMenu}));definePart(DataGrid,"timeline","resource timeline",()=>({DataGrid,TreeGrid,h,setText,fill,numberFormat,toneVariable}));definePart(DataGrid,"calendar-recurrence","calendar recurrence",()=>({DataGrid}));definePart(DataGrid,"calendar-edit","calendar editing",()=>({DataGrid,h,setText,fill,cellValue,GRID_DRAG}));definePart(DataGrid,"calendar-ics","iCalendar",()=>({DataGrid,h,fill,cellText}));definePart(DataGrid,"calendar-screen","calendar shared screens",()=>({DataGrid,h,setText,fill,gridButton,gridFreeze,toneVariable}));const GRID_CALENDAR_API=["getCalendar","setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","editCalendarOccurrence","clearCalendarSelection","setCalendarSource","resetCalendar"];for(const name of GRID_CALENDAR_API)DataGrid.prototype[name]=function(...args){return this.loadCalendar().then(()=>this[name](...args))};DataGrid.prototype.loadCalendar=function(){return this.calLoad||=loadPart(GRID_CALENDAR).then(()=>this.destroyed||this.calParts()).then(()=>this.destroyed||this.startCalendar()).catch(error=>{this.calLoad=null;this.emit("error",{error});throw error})};const GRID_CALENDAR_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_CALENDAR_INIT.call(this);return this.view.calendar?this.loadCalendar().then(start,start):start()};const CAL_PRESETS={basic:{toolbar:false,details:"popover",views:["month","week","day","agenda"]},standard:{toolbar:["search","filters","export"],details:"popover",print:true,views:["month","week","day","days","agenda","year"]},scheduler:{toolbar:["search","filters","views","export"],details:"drawer",print:true,editable:true,create:true,views:["month","week","day","agenda"]}};const CAL_FIELDS=["allDay","description","location","tone","resource","resourceIds","recurrence","exceptions","series","recurrenceId","source"];const CAL_TITLES={allDay:"All day",description:"Description",location:"Location",tone:"Tone",resource:"Resource",resourceIds:"Resources",series:"Series",recurrenceId:"Original start",recurrence:"Repeats",exceptions:"Exceptions",source:"Source"};const CAL_OWN=new Set(["events","preset","id","label","views","view","date","timeZone","firstDay","toolbar","details","editable","create","drop","resources","timeline","live","facets","drawer","export","print","sources","calendar","links"]);const calPad=(value,size=2)=>String(value).padStart(size,"0");function calInstantText(value,field,allDay){if(value instanceof Date&&Number.isFinite(value.getTime()))
1069
1069
  return allDay?calPad(value.getFullYear(),4)+ "-"+calPad(value.getMonth()+ 1)+ "-"+calPad(value.getDate())+ "T00:00:00Z":value.toISOString().replace(".000Z","Z");if(typeof value==="string"&&/^\d{4}-\d\d-\d\d$/.test(value)) return value + "T00:00:00Z";
1070
1070
  if(typeof value==="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d(:\d\d(\.\d+)?)?(Z|[+-]\d\d:\d\d)$/.test(value)) return allDay ? value.slice(0, 10) + "T00:00:00Z" : value;
1071
1071
  const parsed=typeof value==="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d/.test(value) ? new Date(value) : null;
@@ -525,6 +525,9 @@ const labels = Object.freeze({
525
525
  calendarOutsideRange: "Außerhalb des Zeitraums dieses Kalenders",
526
526
  calendarClose: "Schließen",
527
527
  calendarDetailsOf: "Details zu {title}",
528
+ calendarReset: "Zurücksetzen",
529
+ calendarSharedBy: "Geteilt von {names}",
530
+ calendarSourcesShown: "{shown} von {total}",
528
531
  flowSteps: "Schritte",
529
532
  flowStepOf: "Schritt {current} von {count}",
530
533
  flowStepAnnounce: "Schritt {current} von {count}, {title}",
@@ -525,6 +525,9 @@ const labels = Object.freeze({
525
525
  calendarOutsideRange: "Fuera de las fechas que muestra este calendario",
526
526
  calendarClose: "Cerrar",
527
527
  calendarDetailsOf: "Detalles de {title}",
528
+ calendarReset: "Restablecer",
529
+ calendarSharedBy: "Compartido por {names}",
530
+ calendarSourcesShown: "{shown} de {total}",
528
531
  flowSteps: "Pasos",
529
532
  flowStepOf: "Paso {current} de {count}",
530
533
  flowStepAnnounce: "Paso {current} de {count}, {title}",
@@ -525,6 +525,9 @@ const labels = Object.freeze({
525
525
  calendarOutsideRange: "En dehors des dates de ce calendrier",
526
526
  calendarClose: "Fermer",
527
527
  calendarDetailsOf: "Détails de {title}",
528
+ calendarReset: "Réinitialiser",
529
+ calendarSharedBy: "Partagé par {names}",
530
+ calendarSourcesShown: "{shown} sur {total}",
528
531
  flowSteps: "Étapes",
529
532
  flowStepOf: "Étape {current} sur {count}",
530
533
  flowStepAnnounce: "Étape {current} sur {count}, {title}",
@@ -525,6 +525,9 @@ const labels = Object.freeze({
525
525
  calendarOutsideRange: "Al di fuori delle date di questo calendario",
526
526
  calendarClose: "Chiudi",
527
527
  calendarDetailsOf: "Dettagli di {title}",
528
+ calendarReset: "Ripristina",
529
+ calendarSharedBy: "Condiviso da {names}",
530
+ calendarSourcesShown: "{shown} di {total}",
528
531
  flowSteps: "Passaggi",
529
532
  flowStepOf: "Passaggio {current} di {count}",
530
533
  flowStepAnnounce: "Passaggio {current} di {count}, {title}",
@@ -525,6 +525,9 @@ const labels = Object.freeze({
525
525
  calendarOutsideRange: "Poza datami, które pokazuje ten kalendarz",
526
526
  calendarClose: "Zamknij",
527
527
  calendarDetailsOf: "Szczegóły: {title}",
528
+ calendarReset: "Resetuj",
529
+ calendarSharedBy: "Wspólne: {names}",
530
+ calendarSourcesShown: "{shown} z {total}",
528
531
  flowSteps: "Kroki",
529
532
  flowStepOf: "Krok {current} z {count}",
530
533
  flowStepAnnounce: "Krok {current} z {count}: {title}",
@@ -532,7 +532,7 @@ close()}else{return}
532
532
  e.preventDefault()});input.addEventListener("blur",()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);blurTimer=setTimeout(close,150)});this.cancelSearch=()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);hits=[];close()};box.appendChild(input);box.appendChild(list);box.appendChild(status);bar.appendChild(box);this.searchInput=input}});function watchFlyout(anchorElement,panel,isOpen){const lifetime=new AbortController();let flyout=null,pending=null;const ready=()=>flyout?Promise.resolve(flyout):pending||=loadPart(SHARED_PARTS["ui-overlays"]).then(()=>{if(!lifetime.signal.aborted)flyout=UI_TOOLS.toolbarFlyout(anchorElement,panel,isOpen,lifetime.signal);return flyout}).catch(error=>{pending=null;throw error});const invoke=method=>{if(lifetime.signal.aborted||!isOpen())return;if(flyout){flyout[method]();return}
533
533
  ready().then(value=>{if(!lifetime.signal.aborted&&isOpen())value?.[method]()}).catch(error=>{if(!lifetime.signal.aborted)(anchorElement.closest(".cx-host")||anchorElement)
534
534
  .dispatchEvent(new CustomEvent("canopyx:error",{detail:{error},bubbles:true}))})};return{position:()=>invoke("position"),open:()=>invoke("open"),close:()=>flyout?.close(),dispose:()=>lifetime.abort()}}
535
- const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"ui-overlays":["24afaa117ebf3fb5","canopyx-ui-overlays.dedc42d3a501a387.js","canopyx-ui-overlays.3668a9a74004ea8e.css"],"ui-menu":["352b1ee391133ff0","canopyx-ui-menu.f9abee36db8f6ad2.js","canopyx-ui-menu.2f3478cc5f5c272f.css"],"ui-picker":["d415103478faf52a","canopyx-ui-picker.13e544bd68aca998.js","canopyx-ui-picker.59c85a1988a287a9.css"],"ui-navigation":["2553d01c5276d56a","canopyx-ui-navigation.c4ebc214197f140d.js","canopyx-ui-navigation.0afd07bbdc5aecb5.css"],"ui-tabs":["19ece8184f3daf4a","canopyx-ui-tabs.6cd35b2afd89f530.js","canopyx-ui-tabs.7bb6c6f1341e87e9.css"],"ui-stepper":["5682c49db1b85314","canopyx-ui-stepper.96973189b0f6e0c4.js","canopyx-ui-stepper.1d4a9db373b8d2f2.css"],"ui-accordion":["1424f075b78d0ccd","canopyx-ui-accordion.d0d5daa7f73d0859.js","canopyx-ui-accordion.a3ef9c27cea5b7a4.css"],"tree-tools":["ef0d06c82135ae2e","canopyx-tree-tools.1c4b9e286dde6065.js","canopyx-tree-tools.350dd0ee46757029.css"],"presenters":["d5f9d61bb730974b","canopyx-presenters.d71f9e12d83969d9.js"],"filter-editor":["b760f978327dbab0","canopyx-filter-editor.4851bd579e7d146c.js","canopyx-filter-editor.2e0cf6850cbd3235.css"],"export":["15abf3205094bda6","canopyx-export.68b90138463329fe.js"],"office-export":["4fb7a4d570390ee9","canopyx-office-export.7e62c385b884e75b.js"],"history":["7d9901d2fe04df72","canopyx-history.9432e724bf14c9ed.js"],"pager":["cc30dd4f6d3feeb0","canopyx-pager.2a6f5da8c93de083.js","canopyx-pager.c1e16027780b7fdd.css"],"enhance":["a3b4be5ec19a43a6","canopyx-enhance.4a189cba27c290de.js"],"data":["bab770170bd2cfdd","canopyx-data.34325d1fd693886e.js"],"forms":["381a3edba481660b","canopyx-forms.fa85aa9e8b62876a.js","canopyx-forms.50a5ddb0fcc98bdf.css"],"flow":["02a915fe174e4710","canopyx-flow.2ec165998fe2950d.js","canopyx-flow.347ecd64183ea3a1.css"],"flow-host":["7169c4283cec8b25","canopyx-flow-host.52ccd1a2b6cd53f7.js","canopyx-flow-host.a7c8d3fc930ad3a9.css"],"flow-checks":["53394e75b7d1b0e2","canopyx-flow-checks.76e58f9d05eaa78f.js","canopyx-flow-checks.88dd9f389b249147.css"],"flow-options":["60450342239ded26","canopyx-flow-options.d31458a54aa4b1e7.js"],"flow-pick":["7e0924c72fdd2f74","canopyx-flow-pick.c2e34da944b0edab.js","canopyx-flow-pick.ce7687598d4703f1.css"],"flow-records":["0b652a9789ce4128","canopyx-flow-records.df8aba0a303019e0.js","canopyx-flow-records.393243243aae9a56.css"],"flow-drafts":["fac75bf905a77d0b","canopyx-flow-drafts.c7db634ab651e9fc.js","canopyx-flow-drafts.2c43cff1ce9be700.css"],"flow-preview":["5e8207eed3801f91","canopyx-flow-preview.3924dc8410f9775d.js","canopyx-flow-preview.069c52c33e87ffb4.css"],"flow-command":["a30245a47f6d4530","canopyx-flow-command.b145a234a6ecc8a2.js","canopyx-flow-command.f98b5333af3a0e17.css"],"flow-tasks":["8a4437f5216ac3ee","canopyx-flow-tasks.569d4c40d317472b.js","canopyx-flow-tasks.54857a9f2732048a.css"],"flow-dialog":["8c45e0a8bb6a8ab9","canopyx-flow-dialog.cb4e85bcb7383fe2.js","canopyx-flow-dialog.58bd5d446415e01a.css"],"flow-links":["2c14b19c9236e90d","canopyx-flow-links.7b6cfe42d28b6067.js"],"flow-endpoint":["f5cddfc9545e0920","canopyx-flow-endpoint.b31146202bd76aac.js"],"flow-facts":["385b5e61ed487e16","canopyx-flow-facts.8dad3bc07a71fdb0.js"],"flow-consent":["22121778bc0d07c5","canopyx-flow-consent.749b97f13039bc71.js","canopyx-flow-consent.9f6580d3673ae8bf.css"],"matrix":["002a6d917bb4d638","canopyx-matrix.17ae2d0e03ad1364.js","canopyx-matrix.59fc6920ae000d49.css"],"changes":["7d9a526aa07a8838","canopyx-changes.75f1a61cbba98a4f.js","canopyx-changes.5f0ae1710b8b081c.css"],"editing":["88e4ca705a7eb0c3","canopyx-editing.6a6df811fb4dde54.js","canopyx-editing.4816f6be6f89d794.css"],"column-groups":["91abd99e8ff95b58","canopyx-column-groups.4c71d23375de727c.js","canopyx-column-groups.4e4131c1e2df40b1.css"],"cell-range":["cb29468954702795","canopyx-cell-range.d4f99a024db5d0f8.js","canopyx-cell-range.c790b8f140b1243b.css"],"links":["c6579c9401f0971d","canopyx-links.b25760079f57e6e1.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"formatting":["0feff4e3424599e9","canopyx-formatting.94536547a1d35e9b.js","canopyx-formatting.22b2400c566e25d6.css"],"format-editor":["97085e181fbc1cf7","canopyx-format-editor.a6bc57c48173bfc0.js","canopyx-format-editor.d5aaa8e873d92695.css"],"link":["7485f5c9875e9f9b","canopyx-link.9066770aa822fe0f.js","canopyx-link.997fefec6b85f0c5.css"],"detail-rows":["1892f1fd9d035c0f","canopyx-detail-rows.8be98dbc5721170a.js","canopyx-detail-rows.275076ec8bd9144a.css"],"calculations":["f902dc5856fc7bdd","canopyx-calculations.97e438237ba43f99.js","canopyx-calculations.50432e524dd7d8d9.css"],"pivot":["577443c67c7ed719","canopyx-pivot.3abc630122030933.js","canopyx-pivot.5670e62c0bbf114f.css"],"values":["0d7006b0f7bfca10","canopyx-values.ad4c56fcbcd89cbb.js","canopyx-values.446654b98c62ef1d.css"],"buckets":["cc69c8336c15df83","canopyx-buckets.1f59613f13ee292c.js"],"grouping":["c82705991ff01a4c","canopyx-grouping.239f13b0785a2e30.js","canopyx-grouping.a91801c602d752b3.css"],"highlight":["5ebf0042011ba4fd","canopyx-highlight.ff11a0ca8e30102b.js","canopyx-highlight.9c26291cbcd0962b.css"],"layouts":["90267e35e7edf3a4","canopyx-layouts.058b8a396f909a79.js","canopyx-layouts.ca17f42babc4192a.css"],"facets":["e78c2340a96fa802","canopyx-facets.74b2e520a3c04580.js","canopyx-facets.e2970dd7cf0c3da6.css"],"live":["78791b002a111843","canopyx-live.878dc16d683abb72.js","canopyx-live.9881627f352f59da.css"],"record-panel":["cb6bcd1baf644a51","canopyx-record-panel.557c676822e8624f.js","canopyx-record-panel.174846a640de979f.css"],"calendar":["e11aad6b723ddf23","canopyx-calendar.79518c25ddf28dd7.js","canopyx-calendar.47490d57a6e6c1dc.css"],"calendar-recurrence":["64bcc24d785bd1af","canopyx-calendar-recurrence.4b7f430c2a64de23.js"],"calendar-edit":["09747e191820d94c","canopyx-calendar-edit.174f5125d3e75bd9.js"],"calendar-ics":["ac8b2950fccbfb0f","canopyx-calendar-ics.4a18c1c4a1520418.js"],"timeline":["cb9b9dd33154172c","canopyx-timeline.a3dea165914fa7fd.js","canopyx-timeline.44c3156c218531e2.css"],"grid-options":["ee53e6f124b99d5a","canopyx-grid-options.9f8604806c93bf19.js","canopyx-grid-options.e85648a66d70d5b5.css"],"board":["dd02be00df77f53a","canopyx-board.81de43b6e0f4aec3.js","canopyx-board.b62cc3a0348e758a.css"],"plan":["db07c2eb53541d49","canopyx-plan.f3bf394516b627b7.js","canopyx-plan.743201d95414f399.css"],"path":["c6fa2dbab6a0dbaa","canopyx-path.97c3ee2b076b2db6.js","canopyx-path.efba21adc0bfc372.css"],"stack":["e29298edc07edb6d","canopyx-stack.82a5a0c6383519dc.js","canopyx-stack.b867aa57edf9002c.css"],"time-slider":["5516099a165cc345","canopyx-time-slider.ed59a275671c729f.js","canopyx-time-slider.dfc55326f03e1d4a.css"],"view-intents":["dbd26360f2b90a49","canopyx-view-intents.3adcb56dffca0650.js","canopyx-view-intents.29a5c2de68ce3ba0.css"],"compare":["46245b96483e9c30","canopyx-compare.2a8ddc0ce67e903f.js","canopyx-compare.da0a2dff321e782d.css"]},PART_CODE=new Map(),SHARED_PARTS={},partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
535
+ const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"ui-overlays":["24afaa117ebf3fb5","canopyx-ui-overlays.dedc42d3a501a387.js","canopyx-ui-overlays.3668a9a74004ea8e.css"],"ui-menu":["352b1ee391133ff0","canopyx-ui-menu.f9abee36db8f6ad2.js","canopyx-ui-menu.2f3478cc5f5c272f.css"],"ui-picker":["d415103478faf52a","canopyx-ui-picker.13e544bd68aca998.js","canopyx-ui-picker.59c85a1988a287a9.css"],"ui-navigation":["2553d01c5276d56a","canopyx-ui-navigation.c4ebc214197f140d.js","canopyx-ui-navigation.0afd07bbdc5aecb5.css"],"ui-tabs":["19ece8184f3daf4a","canopyx-ui-tabs.6cd35b2afd89f530.js","canopyx-ui-tabs.7bb6c6f1341e87e9.css"],"ui-stepper":["5682c49db1b85314","canopyx-ui-stepper.96973189b0f6e0c4.js","canopyx-ui-stepper.1d4a9db373b8d2f2.css"],"ui-accordion":["1424f075b78d0ccd","canopyx-ui-accordion.d0d5daa7f73d0859.js","canopyx-ui-accordion.a3ef9c27cea5b7a4.css"],"tree-tools":["ef0d06c82135ae2e","canopyx-tree-tools.1c4b9e286dde6065.js","canopyx-tree-tools.350dd0ee46757029.css"],"presenters":["d5f9d61bb730974b","canopyx-presenters.d71f9e12d83969d9.js"],"filter-editor":["b760f978327dbab0","canopyx-filter-editor.4851bd579e7d146c.js","canopyx-filter-editor.2e0cf6850cbd3235.css"],"export":["15abf3205094bda6","canopyx-export.68b90138463329fe.js"],"office-export":["4fb7a4d570390ee9","canopyx-office-export.7e62c385b884e75b.js"],"history":["7d9901d2fe04df72","canopyx-history.9432e724bf14c9ed.js"],"pager":["cc30dd4f6d3feeb0","canopyx-pager.2a6f5da8c93de083.js","canopyx-pager.c1e16027780b7fdd.css"],"enhance":["a3b4be5ec19a43a6","canopyx-enhance.4a189cba27c290de.js"],"data":["bab770170bd2cfdd","canopyx-data.34325d1fd693886e.js"],"forms":["381a3edba481660b","canopyx-forms.fa85aa9e8b62876a.js","canopyx-forms.50a5ddb0fcc98bdf.css"],"flow":["02a915fe174e4710","canopyx-flow.2ec165998fe2950d.js","canopyx-flow.347ecd64183ea3a1.css"],"flow-host":["7169c4283cec8b25","canopyx-flow-host.52ccd1a2b6cd53f7.js","canopyx-flow-host.a7c8d3fc930ad3a9.css"],"flow-checks":["53394e75b7d1b0e2","canopyx-flow-checks.76e58f9d05eaa78f.js","canopyx-flow-checks.88dd9f389b249147.css"],"flow-options":["60450342239ded26","canopyx-flow-options.d31458a54aa4b1e7.js"],"flow-pick":["7e0924c72fdd2f74","canopyx-flow-pick.c2e34da944b0edab.js","canopyx-flow-pick.ce7687598d4703f1.css"],"flow-records":["0b652a9789ce4128","canopyx-flow-records.df8aba0a303019e0.js","canopyx-flow-records.393243243aae9a56.css"],"flow-drafts":["fac75bf905a77d0b","canopyx-flow-drafts.c7db634ab651e9fc.js","canopyx-flow-drafts.2c43cff1ce9be700.css"],"flow-preview":["5e8207eed3801f91","canopyx-flow-preview.3924dc8410f9775d.js","canopyx-flow-preview.069c52c33e87ffb4.css"],"flow-command":["a30245a47f6d4530","canopyx-flow-command.b145a234a6ecc8a2.js","canopyx-flow-command.f98b5333af3a0e17.css"],"flow-tasks":["8a4437f5216ac3ee","canopyx-flow-tasks.569d4c40d317472b.js","canopyx-flow-tasks.54857a9f2732048a.css"],"flow-dialog":["8c45e0a8bb6a8ab9","canopyx-flow-dialog.cb4e85bcb7383fe2.js","canopyx-flow-dialog.58bd5d446415e01a.css"],"flow-links":["2c14b19c9236e90d","canopyx-flow-links.7b6cfe42d28b6067.js"],"flow-endpoint":["f5cddfc9545e0920","canopyx-flow-endpoint.b31146202bd76aac.js"],"flow-facts":["385b5e61ed487e16","canopyx-flow-facts.8dad3bc07a71fdb0.js"],"flow-consent":["22121778bc0d07c5","canopyx-flow-consent.749b97f13039bc71.js","canopyx-flow-consent.9f6580d3673ae8bf.css"],"matrix":["002a6d917bb4d638","canopyx-matrix.17ae2d0e03ad1364.js","canopyx-matrix.59fc6920ae000d49.css"],"changes":["7d9a526aa07a8838","canopyx-changes.75f1a61cbba98a4f.js","canopyx-changes.5f0ae1710b8b081c.css"],"editing":["88e4ca705a7eb0c3","canopyx-editing.6a6df811fb4dde54.js","canopyx-editing.4816f6be6f89d794.css"],"column-groups":["91abd99e8ff95b58","canopyx-column-groups.4c71d23375de727c.js","canopyx-column-groups.4e4131c1e2df40b1.css"],"cell-range":["cb29468954702795","canopyx-cell-range.d4f99a024db5d0f8.js","canopyx-cell-range.c790b8f140b1243b.css"],"links":["c6579c9401f0971d","canopyx-links.b25760079f57e6e1.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"formatting":["0feff4e3424599e9","canopyx-formatting.94536547a1d35e9b.js","canopyx-formatting.22b2400c566e25d6.css"],"format-editor":["97085e181fbc1cf7","canopyx-format-editor.a6bc57c48173bfc0.js","canopyx-format-editor.d5aaa8e873d92695.css"],"link":["7485f5c9875e9f9b","canopyx-link.9066770aa822fe0f.js","canopyx-link.997fefec6b85f0c5.css"],"detail-rows":["1892f1fd9d035c0f","canopyx-detail-rows.8be98dbc5721170a.js","canopyx-detail-rows.275076ec8bd9144a.css"],"calculations":["f902dc5856fc7bdd","canopyx-calculations.97e438237ba43f99.js","canopyx-calculations.50432e524dd7d8d9.css"],"pivot":["577443c67c7ed719","canopyx-pivot.3abc630122030933.js","canopyx-pivot.5670e62c0bbf114f.css"],"values":["0d7006b0f7bfca10","canopyx-values.ad4c56fcbcd89cbb.js","canopyx-values.446654b98c62ef1d.css"],"buckets":["cc69c8336c15df83","canopyx-buckets.1f59613f13ee292c.js"],"grouping":["c82705991ff01a4c","canopyx-grouping.239f13b0785a2e30.js","canopyx-grouping.a91801c602d752b3.css"],"highlight":["5ebf0042011ba4fd","canopyx-highlight.ff11a0ca8e30102b.js","canopyx-highlight.9c26291cbcd0962b.css"],"layouts":["90267e35e7edf3a4","canopyx-layouts.058b8a396f909a79.js","canopyx-layouts.ca17f42babc4192a.css"],"facets":["e78c2340a96fa802","canopyx-facets.74b2e520a3c04580.js","canopyx-facets.e2970dd7cf0c3da6.css"],"live":["78791b002a111843","canopyx-live.878dc16d683abb72.js","canopyx-live.9881627f352f59da.css"],"record-panel":["cb6bcd1baf644a51","canopyx-record-panel.557c676822e8624f.js","canopyx-record-panel.174846a640de979f.css"],"calendar":["b414f93d261b2b76","canopyx-calendar.b25ab96faed29154.js","canopyx-calendar.e3f3eaca3f05bb03.css"],"calendar-recurrence":["64bcc24d785bd1af","canopyx-calendar-recurrence.4b7f430c2a64de23.js"],"calendar-edit":["09747e191820d94c","canopyx-calendar-edit.174f5125d3e75bd9.js"],"calendar-ics":["ac8b2950fccbfb0f","canopyx-calendar-ics.4a18c1c4a1520418.js"],"calendar-screen":["c2be4b1ddf96a778","canopyx-calendar-screen.00a3a9b445e504f6.js","canopyx-calendar-screen.1f4866e9a24e75f3.css"],"timeline":["cb9b9dd33154172c","canopyx-timeline.a3dea165914fa7fd.js","canopyx-timeline.44c3156c218531e2.css"],"grid-options":["ee53e6f124b99d5a","canopyx-grid-options.9f8604806c93bf19.js","canopyx-grid-options.e85648a66d70d5b5.css"],"board":["dd02be00df77f53a","canopyx-board.81de43b6e0f4aec3.js","canopyx-board.b62cc3a0348e758a.css"],"plan":["db07c2eb53541d49","canopyx-plan.f3bf394516b627b7.js","canopyx-plan.743201d95414f399.css"],"path":["c6fa2dbab6a0dbaa","canopyx-path.97c3ee2b076b2db6.js","canopyx-path.efba21adc0bfc372.css"],"stack":["e29298edc07edb6d","canopyx-stack.82a5a0c6383519dc.js","canopyx-stack.b867aa57edf9002c.css"],"time-slider":["5516099a165cc345","canopyx-time-slider.ed59a275671c729f.js","canopyx-time-slider.dfc55326f03e1d4a.css"],"view-intents":["dbd26360f2b90a49","canopyx-view-intents.3adcb56dffca0650.js","canopyx-view-intents.29a5c2de68ce3ba0.css"],"compare":["46245b96483e9c30","canopyx-compare.2a8ddc0ce67e903f.js","canopyx-compare.da0a2dff321e782d.css"]},PART_CODE=new Map(),SHARED_PARTS={},partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
536
536
  function registerPart(name,part){if(!partName(name)||!part||typeof part.version!=="string"||typeof part.install!=="function"||
537
537
  part.requires!==undefined&&!(Array.isArray(part.requires)&&part.requires.every(partName)))throw new Error("CanopyX: invalid part.");PART_CODE.set(name,part)}
538
538
  function definePart(View,name,label,context){const parts=View.prototype.parts||={};return parts[name]={name,label,context,parts}}
@@ -1067,7 +1067,7 @@ ids.some(id=>!this.columns.some(column=>column.id===id)))throw new Error("Canopy
1067
1067
  catch(_){/* A disabled or full storage leaves the current session usable. */ }
1068
1068
  }});const GRID_HISTORY_IMPL={},GRID_HISTORY=definePart(DataGrid,"history","history presenters",()=>({GRID_HISTORY_IMPL,h,setText,fill,gridSeries,gridPresenterTone,toneColors,toneOf,GRID_TONE_RANK}));const GRID_HISTORY_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.loadHistory=function(){return this.historyLoad||=loadPart(GRID_HISTORY).then(()=>{this.version++;this.scheduleRender()},error=>this.emit("error",{error}))};DataGrid.prototype.initializeState=function(){const ready=GRID_HISTORY_INIT.call(this);return this.columns.some(column=>GRID_HISTORY_KINDS.includes(column.presenter?.kind))?Promise.all([ready,this.loadHistory()]).then(([result])=>result):ready};const GRID_BOARD=definePart(DataGrid,"board","board view",()=>({DataGrid,h,setText,fill,cellValue,cellText,gridScalar,gridQueryRows,gridQuery,validateGridPage,validateGridCursorPage,numberFormat,PROTOCOL}));const GRID_BOARD_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_BOARD_INIT.call(this);return this.view.board?loadPart(GRID_BOARD).then(()=>{if(!this.destroyed)this.startBoard()}).then(start):start()};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridBucket:"Bucket",gridBucketNone:"Exact values",gridBucketDay:"Day",gridBucketWeek:"Week",gridBucketMonth:"Month",gridBucketQuarter:"Quarter",gridBucketYear:"Year",gridBucketHour:"Hour of day",gridBucketWeekday:"Weekday",gridBucketWidth:"Range width",gridBucketEdges:"Range edges",gridBucketOrigin:"Range origin",gridBucketInvalid:"Enter valid bucket settings."}));const BUCKETS_PART=definePart(DataGrid,"buckets","date and range buckets",()=>({GRID_BUCKETS}));const gridUsesBuckets=view=>view.reporting?.groupBy?.some(level=>level.bucket)||view.facets?.columns?.some(facet=>facet?.bucket)||
1069
1069
  view.query?.groupBy?.some(level=>level.bucket)||gridQueryUsesBucketFilters(view.query);function gridQueryUsesBucketFilters(query){const group=node=>!!node&&(node.filters?.some(filter=>filter.bucket)||node.groups?.some(group));return query?.filters?.some(filter=>filter.bucket)||group(query?.filterGroup)||query?.tupleFilters?.some(tuple=>tuple.columns?.some(field=>field.bucket))}
1070
- const BUCKET_REQUEST_PAGE=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=async function(query,signal){if(gridQueryUsesBucketFilters(query))await loadPart(BUCKETS_PART);return BUCKET_REQUEST_PAGE.call(this,query,signal)};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridCalculationAdd:"Add calculated column",gridCalculationTitle:"Column title",gridCalculationId:"Column ID",gridCalculationExpression:"Expression",gridCalculationError:"Calculation error: {error}",gridCalculationInvalid:"Check the expression, column references and result kind.",gridCalculationHelp:"Use [columnId], arithmetic, IF, COALESCE, ROUND, CONCAT, DATEPART or DATEDIFF.",gridCalculationResultType:"Result type",gridCalculationDivideZero:"Division by zero",gridCalculationNumber:"Number",gridCalculationDate:"Date and time"}));const GRID_CALCULATIONS={},CALCULATIONS_PART=definePart(DataGrid,"calculations","calculated columns",()=>({DataGrid,GRID_CALCULATIONS,requireIdentifier,cellValue,h,setText,fill,gridButton,gridQuery,gridQueryStart,inlineGridSource,rowDataSource,loadGridFilterEditor,gridFreeze,gridFitPrepare}));const gridUsesCalculations=view=>view.calculatedColumnsEditable||view.columns.some(column=>column.calculation!==undefined);Object.assign(DataGrid.prototype,{async prepareCalculations(){if(!gridUsesCalculations(this.view))return;await loadPart(CALCULATIONS_PART);GRID_CALCULATIONS.prepare(this)},async setCalculatedColumns(columns){await loadPart(CALCULATIONS_PART);return this.setCalculatedColumns(columns)},getCalculatedColumns(){return GRID_CALCULATIONS.definitions?.(this.view)||[]},async openCalculatedColumn(anchor){await loadPart(CALCULATIONS_PART);return this.openCalculatedColumn(anchor)}});const GRID_CALENDAR=definePart(DataGrid,"calendar","calendar",()=>({DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,loadPart,HostCellContext,disposeHostSlot,PROTOCOL,toneVariable,bindContextMenu}));definePart(DataGrid,"timeline","resource timeline",()=>({DataGrid,TreeGrid,h,setText,fill,numberFormat,toneVariable}));definePart(DataGrid,"calendar-recurrence","calendar recurrence",()=>({DataGrid}));definePart(DataGrid,"calendar-edit","calendar editing",()=>({DataGrid,h,setText,fill,cellValue,GRID_DRAG}));definePart(DataGrid,"calendar-ics","iCalendar",()=>({DataGrid,h,fill,cellText}));const GRID_CALENDAR_API=["getCalendar","setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","editCalendarOccurrence","clearCalendarSelection","setCalendarSource"];for(const name of GRID_CALENDAR_API)DataGrid.prototype[name]=function(...args){return this.loadCalendar().then(()=>this[name](...args))};DataGrid.prototype.loadCalendar=function(){return this.calLoad||=loadPart(GRID_CALENDAR).then(()=>this.destroyed||this.calParts()).then(()=>this.destroyed||this.startCalendar()).catch(error=>{this.calLoad=null;this.emit("error",{error});throw error})};const GRID_CALENDAR_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_CALENDAR_INIT.call(this);return this.view.calendar?this.loadCalendar().then(start,start):start()};const CAL_PRESETS={basic:{toolbar:false,details:"popover",views:["month","week","day","agenda"]},standard:{toolbar:["search","filters","export"],details:"popover",print:true,views:["month","week","day","days","agenda","year"]},scheduler:{toolbar:["search","filters","views","export"],details:"drawer",print:true,editable:true,create:true,views:["month","week","day","agenda"]}};const CAL_FIELDS=["allDay","description","tone","resource","resourceIds","recurrence","exceptions","series","recurrenceId","source"];const CAL_TITLES={allDay:"All day",description:"Description",tone:"Tone",resource:"Resource",resourceIds:"Resources",series:"Series",recurrenceId:"Original start",recurrence:"Repeats",exceptions:"Exceptions",source:"Source"};const CAL_OWN=new Set(["events","preset","id","label","views","view","date","timeZone","firstDay","toolbar","details","editable","create","drop","resources","timeline","live","facets","drawer","export","print","sources","calendar","links"]);const calPad=(value,size=2)=>String(value).padStart(size,"0");function calInstantText(value,field,allDay){if(value instanceof Date&&Number.isFinite(value.getTime()))
1070
+ const BUCKET_REQUEST_PAGE=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=async function(query,signal){if(gridQueryUsesBucketFilters(query))await loadPart(BUCKETS_PART);return BUCKET_REQUEST_PAGE.call(this,query,signal)};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridCalculationAdd:"Add calculated column",gridCalculationTitle:"Column title",gridCalculationId:"Column ID",gridCalculationExpression:"Expression",gridCalculationError:"Calculation error: {error}",gridCalculationInvalid:"Check the expression, column references and result kind.",gridCalculationHelp:"Use [columnId], arithmetic, IF, COALESCE, ROUND, CONCAT, DATEPART or DATEDIFF.",gridCalculationResultType:"Result type",gridCalculationDivideZero:"Division by zero",gridCalculationNumber:"Number",gridCalculationDate:"Date and time"}));const GRID_CALCULATIONS={},CALCULATIONS_PART=definePart(DataGrid,"calculations","calculated columns",()=>({DataGrid,GRID_CALCULATIONS,requireIdentifier,cellValue,h,setText,fill,gridButton,gridQuery,gridQueryStart,inlineGridSource,rowDataSource,loadGridFilterEditor,gridFreeze,gridFitPrepare}));const gridUsesCalculations=view=>view.calculatedColumnsEditable||view.columns.some(column=>column.calculation!==undefined);Object.assign(DataGrid.prototype,{async prepareCalculations(){if(!gridUsesCalculations(this.view))return;await loadPart(CALCULATIONS_PART);GRID_CALCULATIONS.prepare(this)},async setCalculatedColumns(columns){await loadPart(CALCULATIONS_PART);return this.setCalculatedColumns(columns)},getCalculatedColumns(){return GRID_CALCULATIONS.definitions?.(this.view)||[]},async openCalculatedColumn(anchor){await loadPart(CALCULATIONS_PART);return this.openCalculatedColumn(anchor)}});const GRID_CALENDAR=definePart(DataGrid,"calendar","calendar",()=>({DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,loadPart,HostCellContext,disposeHostSlot,PROTOCOL,toneVariable,bindContextMenu}));definePart(DataGrid,"timeline","resource timeline",()=>({DataGrid,TreeGrid,h,setText,fill,numberFormat,toneVariable}));definePart(DataGrid,"calendar-recurrence","calendar recurrence",()=>({DataGrid}));definePart(DataGrid,"calendar-edit","calendar editing",()=>({DataGrid,h,setText,fill,cellValue,GRID_DRAG}));definePart(DataGrid,"calendar-ics","iCalendar",()=>({DataGrid,h,fill,cellText}));definePart(DataGrid,"calendar-screen","calendar shared screens",()=>({DataGrid,h,setText,fill,gridButton,gridFreeze,toneVariable}));const GRID_CALENDAR_API=["getCalendar","setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","editCalendarOccurrence","clearCalendarSelection","setCalendarSource","resetCalendar"];for(const name of GRID_CALENDAR_API)DataGrid.prototype[name]=function(...args){return this.loadCalendar().then(()=>this[name](...args))};DataGrid.prototype.loadCalendar=function(){return this.calLoad||=loadPart(GRID_CALENDAR).then(()=>this.destroyed||this.calParts()).then(()=>this.destroyed||this.startCalendar()).catch(error=>{this.calLoad=null;this.emit("error",{error});throw error})};const GRID_CALENDAR_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_CALENDAR_INIT.call(this);return this.view.calendar?this.loadCalendar().then(start,start):start()};const CAL_PRESETS={basic:{toolbar:false,details:"popover",views:["month","week","day","agenda"]},standard:{toolbar:["search","filters","export"],details:"popover",print:true,views:["month","week","day","days","agenda","year"]},scheduler:{toolbar:["search","filters","views","export"],details:"drawer",print:true,editable:true,create:true,views:["month","week","day","agenda"]}};const CAL_FIELDS=["allDay","description","location","tone","resource","resourceIds","recurrence","exceptions","series","recurrenceId","source"];const CAL_TITLES={allDay:"All day",description:"Description",location:"Location",tone:"Tone",resource:"Resource",resourceIds:"Resources",series:"Series",recurrenceId:"Original start",recurrence:"Repeats",exceptions:"Exceptions",source:"Source"};const CAL_OWN=new Set(["events","preset","id","label","views","view","date","timeZone","firstDay","toolbar","details","editable","create","drop","resources","timeline","live","facets","drawer","export","print","sources","calendar","links"]);const calPad=(value,size=2)=>String(value).padStart(size,"0");function calInstantText(value,field,allDay){if(value instanceof Date&&Number.isFinite(value.getTime()))
1071
1071
  return allDay?calPad(value.getFullYear(),4)+ "-"+calPad(value.getMonth()+ 1)+ "-"+calPad(value.getDate())+ "T00:00:00Z":value.toISOString().replace(".000Z","Z");if(typeof value==="string"&&/^\d{4}-\d\d-\d\d$/.test(value)) return value + "T00:00:00Z";
1072
1072
  if(typeof value==="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d(:\d\d(\.\d+)?)?(Z|[+-]\d\d:\d\d)$/.test(value)) return allDay ? value.slice(0, 10) + "T00:00:00Z" : value;
1073
1073
  const parsed=typeof value==="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d/.test(value) ? new Date(value) : null;
@@ -488,7 +488,7 @@ body .cx-host.cx-chrome{padding:0;}
488
488
  .cx-grid-column-handle{min-width:var(--cx-size-24px);}
489
489
  .cx-grid-column-find{margin-bottom:var(--cx-size-4px);}
490
490
  .cx-data-grid{min-width:0;max-width:100%;box-sizing:border-box;}
491
- .cx-data-grid[data-cx-chrome="embedded"]{--cx-grid-surface:var(--hfx-color-surface-raised,light-dark(#ffffff,#1e2126));--cx-grid-header:color-mix(in srgb,var(--hfx-color-text-primary,var(--hfx-color-text,light-dark(#16181c,#f2f3f5))) 4%,var(--hfx-color-surface-raised,light-dark(#ffffff,#1e2126)));}
491
+ .cx-data-grid[data-cx-chrome="embedded"]{--cx-grid-surface:var(--hfx-color-surface-card,var(--hfx-color-surface-raised,light-dark(#ffffff,#1e2126)));--cx-grid-header:color-mix(in srgb,var(--hfx-color-text-primary,var(--hfx-color-text,light-dark(#16181c,#f2f3f5))) 4%,var(--cx-grid-surface));}
492
492
  .cx-data-grid[data-cx-chrome="embedded"] .cx-hrow{background:var(--cx-grid-header);}
493
493
  .cx-data-grid .cx-grid{min-width:0;max-width:100%;}
494
494
  .cx-data-grid.cx-phone .cx-cell:has(> .cx-phone-primary){display:block;min-width:0;white-space:normal;}
@@ -530,7 +530,7 @@ close()}else{return}
530
530
  e.preventDefault()});input.addEventListener("blur",()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);blurTimer=setTimeout(close,150)});this.cancelSearch=()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);hits=[];close()};box.appendChild(input);box.appendChild(list);box.appendChild(status);bar.appendChild(box);this.searchInput=input}});function watchFlyout(anchorElement,panel,isOpen){const lifetime=new AbortController();let flyout=null,pending=null;const ready=()=>flyout?Promise.resolve(flyout):pending||=loadPart(SHARED_PARTS["ui-overlays"]).then(()=>{if(!lifetime.signal.aborted)flyout=UI_TOOLS.toolbarFlyout(anchorElement,panel,isOpen,lifetime.signal);return flyout}).catch(error=>{pending=null;throw error});const invoke=method=>{if(lifetime.signal.aborted||!isOpen())return;if(flyout){flyout[method]();return}
531
531
  ready().then(value=>{if(!lifetime.signal.aborted&&isOpen())value?.[method]()}).catch(error=>{if(!lifetime.signal.aborted)(anchorElement.closest(".cx-host")||anchorElement)
532
532
  .dispatchEvent(new CustomEvent("canopyx:error",{detail:{error},bubbles:true}))})};return{position:()=>invoke("position"),open:()=>invoke("open"),close:()=>flyout?.close(),dispose:()=>lifetime.abort()}}
533
- const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"ui-overlays":["24afaa117ebf3fb5","canopyx-ui-overlays.dedc42d3a501a387.js","canopyx-ui-overlays.3668a9a74004ea8e.css"],"ui-menu":["352b1ee391133ff0","canopyx-ui-menu.f9abee36db8f6ad2.js","canopyx-ui-menu.2f3478cc5f5c272f.css"],"ui-picker":["d415103478faf52a","canopyx-ui-picker.13e544bd68aca998.js","canopyx-ui-picker.59c85a1988a287a9.css"],"ui-navigation":["2553d01c5276d56a","canopyx-ui-navigation.c4ebc214197f140d.js","canopyx-ui-navigation.0afd07bbdc5aecb5.css"],"ui-tabs":["19ece8184f3daf4a","canopyx-ui-tabs.6cd35b2afd89f530.js","canopyx-ui-tabs.7bb6c6f1341e87e9.css"],"ui-stepper":["5682c49db1b85314","canopyx-ui-stepper.96973189b0f6e0c4.js","canopyx-ui-stepper.1d4a9db373b8d2f2.css"],"ui-accordion":["1424f075b78d0ccd","canopyx-ui-accordion.d0d5daa7f73d0859.js","canopyx-ui-accordion.a3ef9c27cea5b7a4.css"],"tree-tools":["ef0d06c82135ae2e","canopyx-tree-tools.1c4b9e286dde6065.js","canopyx-tree-tools.350dd0ee46757029.css"],"presenters":["d5f9d61bb730974b","canopyx-presenters.d71f9e12d83969d9.js"],"filter-editor":["b760f978327dbab0","canopyx-filter-editor.4851bd579e7d146c.js","canopyx-filter-editor.2e0cf6850cbd3235.css"],"export":["15abf3205094bda6","canopyx-export.68b90138463329fe.js"],"office-export":["4fb7a4d570390ee9","canopyx-office-export.7e62c385b884e75b.js"],"history":["7d9901d2fe04df72","canopyx-history.9432e724bf14c9ed.js"],"pager":["cc30dd4f6d3feeb0","canopyx-pager.2a6f5da8c93de083.js","canopyx-pager.c1e16027780b7fdd.css"],"enhance":["a3b4be5ec19a43a6","canopyx-enhance.4a189cba27c290de.js"],"data":["bab770170bd2cfdd","canopyx-data.34325d1fd693886e.js"],"forms":["381a3edba481660b","canopyx-forms.fa85aa9e8b62876a.js","canopyx-forms.50a5ddb0fcc98bdf.css"],"flow":["02a915fe174e4710","canopyx-flow.2ec165998fe2950d.js","canopyx-flow.347ecd64183ea3a1.css"],"flow-host":["7169c4283cec8b25","canopyx-flow-host.52ccd1a2b6cd53f7.js","canopyx-flow-host.a7c8d3fc930ad3a9.css"],"flow-checks":["53394e75b7d1b0e2","canopyx-flow-checks.76e58f9d05eaa78f.js","canopyx-flow-checks.88dd9f389b249147.css"],"flow-options":["60450342239ded26","canopyx-flow-options.d31458a54aa4b1e7.js"],"flow-pick":["7e0924c72fdd2f74","canopyx-flow-pick.c2e34da944b0edab.js","canopyx-flow-pick.ce7687598d4703f1.css"],"flow-records":["0b652a9789ce4128","canopyx-flow-records.df8aba0a303019e0.js","canopyx-flow-records.393243243aae9a56.css"],"flow-drafts":["fac75bf905a77d0b","canopyx-flow-drafts.c7db634ab651e9fc.js","canopyx-flow-drafts.2c43cff1ce9be700.css"],"flow-preview":["5e8207eed3801f91","canopyx-flow-preview.3924dc8410f9775d.js","canopyx-flow-preview.069c52c33e87ffb4.css"],"flow-command":["a30245a47f6d4530","canopyx-flow-command.b145a234a6ecc8a2.js","canopyx-flow-command.f98b5333af3a0e17.css"],"flow-tasks":["8a4437f5216ac3ee","canopyx-flow-tasks.569d4c40d317472b.js","canopyx-flow-tasks.54857a9f2732048a.css"],"flow-dialog":["8c45e0a8bb6a8ab9","canopyx-flow-dialog.cb4e85bcb7383fe2.js","canopyx-flow-dialog.58bd5d446415e01a.css"],"flow-links":["2c14b19c9236e90d","canopyx-flow-links.7b6cfe42d28b6067.js"],"flow-endpoint":["f5cddfc9545e0920","canopyx-flow-endpoint.b31146202bd76aac.js"],"flow-facts":["385b5e61ed487e16","canopyx-flow-facts.8dad3bc07a71fdb0.js"],"flow-consent":["22121778bc0d07c5","canopyx-flow-consent.749b97f13039bc71.js","canopyx-flow-consent.9f6580d3673ae8bf.css"],"matrix":["002a6d917bb4d638","canopyx-matrix.17ae2d0e03ad1364.js","canopyx-matrix.59fc6920ae000d49.css"],"changes":["7d9a526aa07a8838","canopyx-changes.75f1a61cbba98a4f.js","canopyx-changes.5f0ae1710b8b081c.css"],"editing":["88e4ca705a7eb0c3","canopyx-editing.6a6df811fb4dde54.js","canopyx-editing.4816f6be6f89d794.css"],"column-groups":["91abd99e8ff95b58","canopyx-column-groups.4c71d23375de727c.js","canopyx-column-groups.4e4131c1e2df40b1.css"],"cell-range":["cb29468954702795","canopyx-cell-range.d4f99a024db5d0f8.js","canopyx-cell-range.c790b8f140b1243b.css"],"links":["c6579c9401f0971d","canopyx-links.b25760079f57e6e1.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"formatting":["0feff4e3424599e9","canopyx-formatting.94536547a1d35e9b.js","canopyx-formatting.22b2400c566e25d6.css"],"format-editor":["97085e181fbc1cf7","canopyx-format-editor.a6bc57c48173bfc0.js","canopyx-format-editor.d5aaa8e873d92695.css"],"link":["7485f5c9875e9f9b","canopyx-link.9066770aa822fe0f.js","canopyx-link.997fefec6b85f0c5.css"],"detail-rows":["1892f1fd9d035c0f","canopyx-detail-rows.8be98dbc5721170a.js","canopyx-detail-rows.275076ec8bd9144a.css"],"calculations":["f902dc5856fc7bdd","canopyx-calculations.97e438237ba43f99.js","canopyx-calculations.50432e524dd7d8d9.css"],"pivot":["577443c67c7ed719","canopyx-pivot.3abc630122030933.js","canopyx-pivot.5670e62c0bbf114f.css"],"values":["0d7006b0f7bfca10","canopyx-values.ad4c56fcbcd89cbb.js","canopyx-values.446654b98c62ef1d.css"],"buckets":["cc69c8336c15df83","canopyx-buckets.1f59613f13ee292c.js"],"grouping":["c82705991ff01a4c","canopyx-grouping.239f13b0785a2e30.js","canopyx-grouping.a91801c602d752b3.css"],"highlight":["5ebf0042011ba4fd","canopyx-highlight.ff11a0ca8e30102b.js","canopyx-highlight.9c26291cbcd0962b.css"],"layouts":["90267e35e7edf3a4","canopyx-layouts.058b8a396f909a79.js","canopyx-layouts.ca17f42babc4192a.css"],"facets":["e78c2340a96fa802","canopyx-facets.74b2e520a3c04580.js","canopyx-facets.e2970dd7cf0c3da6.css"],"live":["78791b002a111843","canopyx-live.878dc16d683abb72.js","canopyx-live.9881627f352f59da.css"],"record-panel":["cb6bcd1baf644a51","canopyx-record-panel.557c676822e8624f.js","canopyx-record-panel.174846a640de979f.css"],"calendar":["e11aad6b723ddf23","canopyx-calendar.79518c25ddf28dd7.js","canopyx-calendar.47490d57a6e6c1dc.css"],"calendar-recurrence":["64bcc24d785bd1af","canopyx-calendar-recurrence.4b7f430c2a64de23.js"],"calendar-edit":["09747e191820d94c","canopyx-calendar-edit.174f5125d3e75bd9.js"],"calendar-ics":["ac8b2950fccbfb0f","canopyx-calendar-ics.4a18c1c4a1520418.js"],"timeline":["cb9b9dd33154172c","canopyx-timeline.a3dea165914fa7fd.js","canopyx-timeline.44c3156c218531e2.css"],"grid-options":["ee53e6f124b99d5a","canopyx-grid-options.9f8604806c93bf19.js","canopyx-grid-options.e85648a66d70d5b5.css"],"board":["dd02be00df77f53a","canopyx-board.81de43b6e0f4aec3.js","canopyx-board.b62cc3a0348e758a.css"],"plan":["db07c2eb53541d49","canopyx-plan.f3bf394516b627b7.js","canopyx-plan.743201d95414f399.css"],"path":["c6fa2dbab6a0dbaa","canopyx-path.97c3ee2b076b2db6.js","canopyx-path.efba21adc0bfc372.css"],"stack":["e29298edc07edb6d","canopyx-stack.82a5a0c6383519dc.js","canopyx-stack.b867aa57edf9002c.css"],"time-slider":["5516099a165cc345","canopyx-time-slider.ed59a275671c729f.js","canopyx-time-slider.dfc55326f03e1d4a.css"],"view-intents":["dbd26360f2b90a49","canopyx-view-intents.3adcb56dffca0650.js","canopyx-view-intents.29a5c2de68ce3ba0.css"],"compare":["46245b96483e9c30","canopyx-compare.2a8ddc0ce67e903f.js","canopyx-compare.da0a2dff321e782d.css"]},PART_CODE=new Map(),SHARED_PARTS={},partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
533
+ const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"ui-overlays":["24afaa117ebf3fb5","canopyx-ui-overlays.dedc42d3a501a387.js","canopyx-ui-overlays.3668a9a74004ea8e.css"],"ui-menu":["352b1ee391133ff0","canopyx-ui-menu.f9abee36db8f6ad2.js","canopyx-ui-menu.2f3478cc5f5c272f.css"],"ui-picker":["d415103478faf52a","canopyx-ui-picker.13e544bd68aca998.js","canopyx-ui-picker.59c85a1988a287a9.css"],"ui-navigation":["2553d01c5276d56a","canopyx-ui-navigation.c4ebc214197f140d.js","canopyx-ui-navigation.0afd07bbdc5aecb5.css"],"ui-tabs":["19ece8184f3daf4a","canopyx-ui-tabs.6cd35b2afd89f530.js","canopyx-ui-tabs.7bb6c6f1341e87e9.css"],"ui-stepper":["5682c49db1b85314","canopyx-ui-stepper.96973189b0f6e0c4.js","canopyx-ui-stepper.1d4a9db373b8d2f2.css"],"ui-accordion":["1424f075b78d0ccd","canopyx-ui-accordion.d0d5daa7f73d0859.js","canopyx-ui-accordion.a3ef9c27cea5b7a4.css"],"tree-tools":["ef0d06c82135ae2e","canopyx-tree-tools.1c4b9e286dde6065.js","canopyx-tree-tools.350dd0ee46757029.css"],"presenters":["d5f9d61bb730974b","canopyx-presenters.d71f9e12d83969d9.js"],"filter-editor":["b760f978327dbab0","canopyx-filter-editor.4851bd579e7d146c.js","canopyx-filter-editor.2e0cf6850cbd3235.css"],"export":["15abf3205094bda6","canopyx-export.68b90138463329fe.js"],"office-export":["4fb7a4d570390ee9","canopyx-office-export.7e62c385b884e75b.js"],"history":["7d9901d2fe04df72","canopyx-history.9432e724bf14c9ed.js"],"pager":["cc30dd4f6d3feeb0","canopyx-pager.2a6f5da8c93de083.js","canopyx-pager.c1e16027780b7fdd.css"],"enhance":["a3b4be5ec19a43a6","canopyx-enhance.4a189cba27c290de.js"],"data":["bab770170bd2cfdd","canopyx-data.34325d1fd693886e.js"],"forms":["381a3edba481660b","canopyx-forms.fa85aa9e8b62876a.js","canopyx-forms.50a5ddb0fcc98bdf.css"],"flow":["02a915fe174e4710","canopyx-flow.2ec165998fe2950d.js","canopyx-flow.347ecd64183ea3a1.css"],"flow-host":["7169c4283cec8b25","canopyx-flow-host.52ccd1a2b6cd53f7.js","canopyx-flow-host.a7c8d3fc930ad3a9.css"],"flow-checks":["53394e75b7d1b0e2","canopyx-flow-checks.76e58f9d05eaa78f.js","canopyx-flow-checks.88dd9f389b249147.css"],"flow-options":["60450342239ded26","canopyx-flow-options.d31458a54aa4b1e7.js"],"flow-pick":["7e0924c72fdd2f74","canopyx-flow-pick.c2e34da944b0edab.js","canopyx-flow-pick.ce7687598d4703f1.css"],"flow-records":["0b652a9789ce4128","canopyx-flow-records.df8aba0a303019e0.js","canopyx-flow-records.393243243aae9a56.css"],"flow-drafts":["fac75bf905a77d0b","canopyx-flow-drafts.c7db634ab651e9fc.js","canopyx-flow-drafts.2c43cff1ce9be700.css"],"flow-preview":["5e8207eed3801f91","canopyx-flow-preview.3924dc8410f9775d.js","canopyx-flow-preview.069c52c33e87ffb4.css"],"flow-command":["a30245a47f6d4530","canopyx-flow-command.b145a234a6ecc8a2.js","canopyx-flow-command.f98b5333af3a0e17.css"],"flow-tasks":["8a4437f5216ac3ee","canopyx-flow-tasks.569d4c40d317472b.js","canopyx-flow-tasks.54857a9f2732048a.css"],"flow-dialog":["8c45e0a8bb6a8ab9","canopyx-flow-dialog.cb4e85bcb7383fe2.js","canopyx-flow-dialog.58bd5d446415e01a.css"],"flow-links":["2c14b19c9236e90d","canopyx-flow-links.7b6cfe42d28b6067.js"],"flow-endpoint":["f5cddfc9545e0920","canopyx-flow-endpoint.b31146202bd76aac.js"],"flow-facts":["385b5e61ed487e16","canopyx-flow-facts.8dad3bc07a71fdb0.js"],"flow-consent":["22121778bc0d07c5","canopyx-flow-consent.749b97f13039bc71.js","canopyx-flow-consent.9f6580d3673ae8bf.css"],"matrix":["002a6d917bb4d638","canopyx-matrix.17ae2d0e03ad1364.js","canopyx-matrix.59fc6920ae000d49.css"],"changes":["7d9a526aa07a8838","canopyx-changes.75f1a61cbba98a4f.js","canopyx-changes.5f0ae1710b8b081c.css"],"editing":["88e4ca705a7eb0c3","canopyx-editing.6a6df811fb4dde54.js","canopyx-editing.4816f6be6f89d794.css"],"column-groups":["91abd99e8ff95b58","canopyx-column-groups.4c71d23375de727c.js","canopyx-column-groups.4e4131c1e2df40b1.css"],"cell-range":["cb29468954702795","canopyx-cell-range.d4f99a024db5d0f8.js","canopyx-cell-range.c790b8f140b1243b.css"],"links":["c6579c9401f0971d","canopyx-links.b25760079f57e6e1.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"formatting":["0feff4e3424599e9","canopyx-formatting.94536547a1d35e9b.js","canopyx-formatting.22b2400c566e25d6.css"],"format-editor":["97085e181fbc1cf7","canopyx-format-editor.a6bc57c48173bfc0.js","canopyx-format-editor.d5aaa8e873d92695.css"],"link":["7485f5c9875e9f9b","canopyx-link.9066770aa822fe0f.js","canopyx-link.997fefec6b85f0c5.css"],"detail-rows":["1892f1fd9d035c0f","canopyx-detail-rows.8be98dbc5721170a.js","canopyx-detail-rows.275076ec8bd9144a.css"],"calculations":["f902dc5856fc7bdd","canopyx-calculations.97e438237ba43f99.js","canopyx-calculations.50432e524dd7d8d9.css"],"pivot":["577443c67c7ed719","canopyx-pivot.3abc630122030933.js","canopyx-pivot.5670e62c0bbf114f.css"],"values":["0d7006b0f7bfca10","canopyx-values.ad4c56fcbcd89cbb.js","canopyx-values.446654b98c62ef1d.css"],"buckets":["cc69c8336c15df83","canopyx-buckets.1f59613f13ee292c.js"],"grouping":["c82705991ff01a4c","canopyx-grouping.239f13b0785a2e30.js","canopyx-grouping.a91801c602d752b3.css"],"highlight":["5ebf0042011ba4fd","canopyx-highlight.ff11a0ca8e30102b.js","canopyx-highlight.9c26291cbcd0962b.css"],"layouts":["90267e35e7edf3a4","canopyx-layouts.058b8a396f909a79.js","canopyx-layouts.ca17f42babc4192a.css"],"facets":["e78c2340a96fa802","canopyx-facets.74b2e520a3c04580.js","canopyx-facets.e2970dd7cf0c3da6.css"],"live":["78791b002a111843","canopyx-live.878dc16d683abb72.js","canopyx-live.9881627f352f59da.css"],"record-panel":["cb6bcd1baf644a51","canopyx-record-panel.557c676822e8624f.js","canopyx-record-panel.174846a640de979f.css"],"calendar":["b414f93d261b2b76","canopyx-calendar.b25ab96faed29154.js","canopyx-calendar.e3f3eaca3f05bb03.css"],"calendar-recurrence":["64bcc24d785bd1af","canopyx-calendar-recurrence.4b7f430c2a64de23.js"],"calendar-edit":["09747e191820d94c","canopyx-calendar-edit.174f5125d3e75bd9.js"],"calendar-ics":["ac8b2950fccbfb0f","canopyx-calendar-ics.4a18c1c4a1520418.js"],"calendar-screen":["c2be4b1ddf96a778","canopyx-calendar-screen.00a3a9b445e504f6.js","canopyx-calendar-screen.1f4866e9a24e75f3.css"],"timeline":["cb9b9dd33154172c","canopyx-timeline.a3dea165914fa7fd.js","canopyx-timeline.44c3156c218531e2.css"],"grid-options":["ee53e6f124b99d5a","canopyx-grid-options.9f8604806c93bf19.js","canopyx-grid-options.e85648a66d70d5b5.css"],"board":["dd02be00df77f53a","canopyx-board.81de43b6e0f4aec3.js","canopyx-board.b62cc3a0348e758a.css"],"plan":["db07c2eb53541d49","canopyx-plan.f3bf394516b627b7.js","canopyx-plan.743201d95414f399.css"],"path":["c6fa2dbab6a0dbaa","canopyx-path.97c3ee2b076b2db6.js","canopyx-path.efba21adc0bfc372.css"],"stack":["e29298edc07edb6d","canopyx-stack.82a5a0c6383519dc.js","canopyx-stack.b867aa57edf9002c.css"],"time-slider":["5516099a165cc345","canopyx-time-slider.ed59a275671c729f.js","canopyx-time-slider.dfc55326f03e1d4a.css"],"view-intents":["dbd26360f2b90a49","canopyx-view-intents.3adcb56dffca0650.js","canopyx-view-intents.29a5c2de68ce3ba0.css"],"compare":["46245b96483e9c30","canopyx-compare.2a8ddc0ce67e903f.js","canopyx-compare.da0a2dff321e782d.css"]},PART_CODE=new Map(),SHARED_PARTS={},partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
534
534
  function registerPart(name,part){if(!partName(name)||!part||typeof part.version!=="string"||typeof part.install!=="function"||
535
535
  part.requires!==undefined&&!(Array.isArray(part.requires)&&part.requires.every(partName)))throw new Error("CanopyX: invalid part.");PART_CODE.set(name,part)}
536
536
  function definePart(View,name,label,context){const parts=View.prototype.parts||={};return parts[name]={name,label,context,parts}}
@@ -1065,7 +1065,7 @@ ids.some(id=>!this.columns.some(column=>column.id===id)))throw new Error("Canopy
1065
1065
  catch(_){/* A disabled or full storage leaves the current session usable. */ }
1066
1066
  }});const GRID_HISTORY_IMPL={},GRID_HISTORY=definePart(DataGrid,"history","history presenters",()=>({GRID_HISTORY_IMPL,h,setText,fill,gridSeries,gridPresenterTone,toneColors,toneOf,GRID_TONE_RANK}));const GRID_HISTORY_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.loadHistory=function(){return this.historyLoad||=loadPart(GRID_HISTORY).then(()=>{this.version++;this.scheduleRender()},error=>this.emit("error",{error}))};DataGrid.prototype.initializeState=function(){const ready=GRID_HISTORY_INIT.call(this);return this.columns.some(column=>GRID_HISTORY_KINDS.includes(column.presenter?.kind))?Promise.all([ready,this.loadHistory()]).then(([result])=>result):ready};const GRID_BOARD=definePart(DataGrid,"board","board view",()=>({DataGrid,h,setText,fill,cellValue,cellText,gridScalar,gridQueryRows,gridQuery,validateGridPage,validateGridCursorPage,numberFormat,PROTOCOL}));const GRID_BOARD_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_BOARD_INIT.call(this);return this.view.board?loadPart(GRID_BOARD).then(()=>{if(!this.destroyed)this.startBoard()}).then(start):start()};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridBucket:"Bucket",gridBucketNone:"Exact values",gridBucketDay:"Day",gridBucketWeek:"Week",gridBucketMonth:"Month",gridBucketQuarter:"Quarter",gridBucketYear:"Year",gridBucketHour:"Hour of day",gridBucketWeekday:"Weekday",gridBucketWidth:"Range width",gridBucketEdges:"Range edges",gridBucketOrigin:"Range origin",gridBucketInvalid:"Enter valid bucket settings."}));const BUCKETS_PART=definePart(DataGrid,"buckets","date and range buckets",()=>({GRID_BUCKETS}));const gridUsesBuckets=view=>view.reporting?.groupBy?.some(level=>level.bucket)||view.facets?.columns?.some(facet=>facet?.bucket)||
1067
1067
  view.query?.groupBy?.some(level=>level.bucket)||gridQueryUsesBucketFilters(view.query);function gridQueryUsesBucketFilters(query){const group=node=>!!node&&(node.filters?.some(filter=>filter.bucket)||node.groups?.some(group));return query?.filters?.some(filter=>filter.bucket)||group(query?.filterGroup)||query?.tupleFilters?.some(tuple=>tuple.columns?.some(field=>field.bucket))}
1068
- const BUCKET_REQUEST_PAGE=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=async function(query,signal){if(gridQueryUsesBucketFilters(query))await loadPart(BUCKETS_PART);return BUCKET_REQUEST_PAGE.call(this,query,signal)};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridCalculationAdd:"Add calculated column",gridCalculationTitle:"Column title",gridCalculationId:"Column ID",gridCalculationExpression:"Expression",gridCalculationError:"Calculation error: {error}",gridCalculationInvalid:"Check the expression, column references and result kind.",gridCalculationHelp:"Use [columnId], arithmetic, IF, COALESCE, ROUND, CONCAT, DATEPART or DATEDIFF.",gridCalculationResultType:"Result type",gridCalculationDivideZero:"Division by zero",gridCalculationNumber:"Number",gridCalculationDate:"Date and time"}));const GRID_CALCULATIONS={},CALCULATIONS_PART=definePart(DataGrid,"calculations","calculated columns",()=>({DataGrid,GRID_CALCULATIONS,requireIdentifier,cellValue,h,setText,fill,gridButton,gridQuery,gridQueryStart,inlineGridSource,rowDataSource,loadGridFilterEditor,gridFreeze,gridFitPrepare}));const gridUsesCalculations=view=>view.calculatedColumnsEditable||view.columns.some(column=>column.calculation!==undefined);Object.assign(DataGrid.prototype,{async prepareCalculations(){if(!gridUsesCalculations(this.view))return;await loadPart(CALCULATIONS_PART);GRID_CALCULATIONS.prepare(this)},async setCalculatedColumns(columns){await loadPart(CALCULATIONS_PART);return this.setCalculatedColumns(columns)},getCalculatedColumns(){return GRID_CALCULATIONS.definitions?.(this.view)||[]},async openCalculatedColumn(anchor){await loadPart(CALCULATIONS_PART);return this.openCalculatedColumn(anchor)}});const GRID_CALENDAR=definePart(DataGrid,"calendar","calendar",()=>({DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,loadPart,HostCellContext,disposeHostSlot,PROTOCOL,toneVariable,bindContextMenu}));definePart(DataGrid,"timeline","resource timeline",()=>({DataGrid,TreeGrid,h,setText,fill,numberFormat,toneVariable}));definePart(DataGrid,"calendar-recurrence","calendar recurrence",()=>({DataGrid}));definePart(DataGrid,"calendar-edit","calendar editing",()=>({DataGrid,h,setText,fill,cellValue,GRID_DRAG}));definePart(DataGrid,"calendar-ics","iCalendar",()=>({DataGrid,h,fill,cellText}));const GRID_CALENDAR_API=["getCalendar","setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","editCalendarOccurrence","clearCalendarSelection","setCalendarSource"];for(const name of GRID_CALENDAR_API)DataGrid.prototype[name]=function(...args){return this.loadCalendar().then(()=>this[name](...args))};DataGrid.prototype.loadCalendar=function(){return this.calLoad||=loadPart(GRID_CALENDAR).then(()=>this.destroyed||this.calParts()).then(()=>this.destroyed||this.startCalendar()).catch(error=>{this.calLoad=null;this.emit("error",{error});throw error})};const GRID_CALENDAR_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_CALENDAR_INIT.call(this);return this.view.calendar?this.loadCalendar().then(start,start):start()};const CAL_PRESETS={basic:{toolbar:false,details:"popover",views:["month","week","day","agenda"]},standard:{toolbar:["search","filters","export"],details:"popover",print:true,views:["month","week","day","days","agenda","year"]},scheduler:{toolbar:["search","filters","views","export"],details:"drawer",print:true,editable:true,create:true,views:["month","week","day","agenda"]}};const CAL_FIELDS=["allDay","description","tone","resource","resourceIds","recurrence","exceptions","series","recurrenceId","source"];const CAL_TITLES={allDay:"All day",description:"Description",tone:"Tone",resource:"Resource",resourceIds:"Resources",series:"Series",recurrenceId:"Original start",recurrence:"Repeats",exceptions:"Exceptions",source:"Source"};const CAL_OWN=new Set(["events","preset","id","label","views","view","date","timeZone","firstDay","toolbar","details","editable","create","drop","resources","timeline","live","facets","drawer","export","print","sources","calendar","links"]);const calPad=(value,size=2)=>String(value).padStart(size,"0");function calInstantText(value,field,allDay){if(value instanceof Date&&Number.isFinite(value.getTime()))
1068
+ const BUCKET_REQUEST_PAGE=DataGrid.prototype.requestPage;DataGrid.prototype.requestPage=async function(query,signal){if(gridQueryUsesBucketFilters(query))await loadPart(BUCKETS_PART);return BUCKET_REQUEST_PAGE.call(this,query,signal)};DEFAULT_LABELS=Object.freeze(Object.assign({},DEFAULT_LABELS,{gridCalculationAdd:"Add calculated column",gridCalculationTitle:"Column title",gridCalculationId:"Column ID",gridCalculationExpression:"Expression",gridCalculationError:"Calculation error: {error}",gridCalculationInvalid:"Check the expression, column references and result kind.",gridCalculationHelp:"Use [columnId], arithmetic, IF, COALESCE, ROUND, CONCAT, DATEPART or DATEDIFF.",gridCalculationResultType:"Result type",gridCalculationDivideZero:"Division by zero",gridCalculationNumber:"Number",gridCalculationDate:"Date and time"}));const GRID_CALCULATIONS={},CALCULATIONS_PART=definePart(DataGrid,"calculations","calculated columns",()=>({DataGrid,GRID_CALCULATIONS,requireIdentifier,cellValue,h,setText,fill,gridButton,gridQuery,gridQueryStart,inlineGridSource,rowDataSource,loadGridFilterEditor,gridFreeze,gridFitPrepare}));const gridUsesCalculations=view=>view.calculatedColumnsEditable||view.columns.some(column=>column.calculation!==undefined);Object.assign(DataGrid.prototype,{async prepareCalculations(){if(!gridUsesCalculations(this.view))return;await loadPart(CALCULATIONS_PART);GRID_CALCULATIONS.prepare(this)},async setCalculatedColumns(columns){await loadPart(CALCULATIONS_PART);return this.setCalculatedColumns(columns)},getCalculatedColumns(){return GRID_CALCULATIONS.definitions?.(this.view)||[]},async openCalculatedColumn(anchor){await loadPart(CALCULATIONS_PART);return this.openCalculatedColumn(anchor)}});const GRID_CALENDAR=definePart(DataGrid,"calendar","calendar",()=>({DataGrid,h,setText,fill,plural,gridButton,gridIcon,gridFreeze,cellText,cellValue,isCellObject,gridQuery,gridQueryRows,gridResultShape,gridPresenterTone,validateGridRows,repairGridCell,validateGridPage,validateGridCursorPage,validStructuralCount,checkDocument,numberFormat,loadPart,HostCellContext,disposeHostSlot,PROTOCOL,toneVariable,bindContextMenu}));definePart(DataGrid,"timeline","resource timeline",()=>({DataGrid,TreeGrid,h,setText,fill,numberFormat,toneVariable}));definePart(DataGrid,"calendar-recurrence","calendar recurrence",()=>({DataGrid}));definePart(DataGrid,"calendar-edit","calendar editing",()=>({DataGrid,h,setText,fill,cellValue,GRID_DRAG}));definePart(DataGrid,"calendar-ics","iCalendar",()=>({DataGrid,h,fill,cellText}));definePart(DataGrid,"calendar-screen","calendar shared screens",()=>({DataGrid,h,setText,fill,gridButton,gridFreeze,toneVariable}));const GRID_CALENDAR_API=["getCalendar","setCalendarView","setCalendarDate","setCalendarZoom","calendarStep","calendarToday","getCalendarEvents","exportCalendar","openCalendarEvent","editCalendarOccurrence","clearCalendarSelection","setCalendarSource","resetCalendar"];for(const name of GRID_CALENDAR_API)DataGrid.prototype[name]=function(...args){return this.loadCalendar().then(()=>this[name](...args))};DataGrid.prototype.loadCalendar=function(){return this.calLoad||=loadPart(GRID_CALENDAR).then(()=>this.destroyed||this.calParts()).then(()=>this.destroyed||this.startCalendar()).catch(error=>{this.calLoad=null;this.emit("error",{error});throw error})};const GRID_CALENDAR_INIT=DataGrid.prototype.initializeState;DataGrid.prototype.initializeState=function(){const start=()=>GRID_CALENDAR_INIT.call(this);return this.view.calendar?this.loadCalendar().then(start,start):start()};const CAL_PRESETS={basic:{toolbar:false,details:"popover",views:["month","week","day","agenda"]},standard:{toolbar:["search","filters","export"],details:"popover",print:true,views:["month","week","day","days","agenda","year"]},scheduler:{toolbar:["search","filters","views","export"],details:"drawer",print:true,editable:true,create:true,views:["month","week","day","agenda"]}};const CAL_FIELDS=["allDay","description","location","tone","resource","resourceIds","recurrence","exceptions","series","recurrenceId","source"];const CAL_TITLES={allDay:"All day",description:"Description",location:"Location",tone:"Tone",resource:"Resource",resourceIds:"Resources",series:"Series",recurrenceId:"Original start",recurrence:"Repeats",exceptions:"Exceptions",source:"Source"};const CAL_OWN=new Set(["events","preset","id","label","views","view","date","timeZone","firstDay","toolbar","details","editable","create","drop","resources","timeline","live","facets","drawer","export","print","sources","calendar","links"]);const calPad=(value,size=2)=>String(value).padStart(size,"0");function calInstantText(value,field,allDay){if(value instanceof Date&&Number.isFinite(value.getTime()))
1069
1069
  return allDay?calPad(value.getFullYear(),4)+ "-"+calPad(value.getMonth()+ 1)+ "-"+calPad(value.getDate())+ "T00:00:00Z":value.toISOString().replace(".000Z","Z");if(typeof value==="string"&&/^\d{4}-\d\d-\d\d$/.test(value)) return value + "T00:00:00Z";
1070
1070
  if(typeof value==="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d(:\d\d(\.\d+)?)?(Z|[+-]\d\d:\d\d)$/.test(value)) return allDay ? value.slice(0, 10) + "T00:00:00Z" : value;
1071
1071
  const parsed=typeof value==="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d/.test(value) ? new Date(value) : null;
@@ -26,6 +26,19 @@ export interface GridCalendarSource {
26
26
  color?: string;
27
27
  /** Starts switched off. */
28
28
  hidden?: boolean;
29
+ /** A face drawn in front of the source's events and in its legend switch: a same-origin or base64 data:image URL. */
30
+ avatar?: string;
31
+ /** 1..3 characters, also shown when the avatar fails. */
32
+ initials?: string;
33
+ /** 1..4 characters such as an emoji, when there is neither an avatar nor initials. */
34
+ icon?: string;
35
+ }
36
+ /** The face of a resource, drawn in front of its events. */
37
+ export interface GridCalendarFace {
38
+ resource: string;
39
+ avatar?: string;
40
+ initials?: string;
41
+ icon?: string;
29
42
  }
30
43
  /** The resource timeline's zoom levels. */
31
44
  export type GridCalendarZoom = "hour" | "day" | "week" | "month" | "quarter";
@@ -182,6 +195,24 @@ export interface GridCalendarDefinition<Row extends GridRow = GridRow> {
182
195
  months?: number;
183
196
  /** A print button in the calendar bar. */
184
197
  print?: boolean;
198
+ /** A text column with each event's location (details; merged copies match on it). */
199
+ location?: GridColumnId<Row>;
200
+ /** Copies of one event in several sources (same title, start, end, all-day flag and location) draw once; tone colours them. */
201
+ merge?: boolean | { tone?: string };
202
+ /** How strongly finished events fade in week, day, N-day, list and agenda views, 0.1..0.9. */
203
+ fadePast?: number;
204
+ /** Short notes in day headers, at most 1000. */
205
+ dayNotes?: readonly { date: string; text: string; tone?: string }[];
206
+ /** Faces of resources, one per resource. */
207
+ faces?: readonly GridCalendarFace[];
208
+ /** Days the week list shows from its date, 2..14, instead of the calendar week. */
209
+ listDays?: number;
210
+ /** The narrowest day column, 60..400 pixels: narrower calendars show fewer days, keeping today. */
211
+ dayWidth?: number;
212
+ /** The week list stacks its days when fewer than this many columns (2..7) fit. */
213
+ listBelow?: number;
214
+ /** A Reset button that appears once the calendar differs from its defaults. */
215
+ reset?: boolean;
185
216
  }
186
217
 
187
218
  /** An occurrence as the calendar shows it. */
@@ -201,6 +232,8 @@ export interface GridCalendarEvent {
201
232
  readonly source?: string | null;
202
233
  /** An event of an iCalendar source: read-only, and its record id is not a record of the grid. */
203
234
  readonly external?: boolean;
235
+ /** The sources of a merged event, in source order (merge). */
236
+ readonly owners?: readonly string[];
204
237
  }
205
238
 
206
239
  /** The template hook: draws an event's content into a fresh element; return true to own it. Text is the host's to escape. */
@@ -237,6 +270,8 @@ export interface GridCalendarOptions {
237
270
  menu?: (context: GridCalendarMenuContext, defaults: readonly { readonly id: string; readonly label: string }[]) => readonly GridCalendarMenuItem[] | null | false | void;
238
271
  /** Decides how an occurrence change applies before the calendar asks: a mode, false to cancel, or nothing to keep the setting. */
239
272
  occurrence?: (change: GridOccurrenceChange) => "this" | "following" | "all" | false | void | PromiseLike<"this" | "following" | "all" | false | void>;
273
+ /** Content for a day's header: return text, or write into element with DOM methods and return true. Its text joins the day's name. */
274
+ dayHeader?: (context: { readonly day: string; readonly events: number; readonly view: GridCalendarView; readonly element: HTMLElement; readonly labels: Readonly<Record<string, string>> }) => string | boolean | void;
240
275
  }
241
276
 
242
277
  /** canopyx:eventCreate (cancelable; cancel it to open your own form): the proposed new event. */
@@ -268,6 +303,8 @@ export interface CalendarEventInput {
268
303
  recurrence?: string;
269
304
  exceptions?: string;
270
305
  source?: string;
306
+ /** Where it takes place (details); merged copies of one event match on it. */
307
+ location?: string;
271
308
  }
272
309
  /** The options of CanopyX.createCalendar: a preset's defaults, each overridden by its own option. */
273
310
  export interface CalendarOptions {
@@ -374,4 +411,6 @@ export interface GridCalendarApi {
374
411
  clearCalendarSelection(): void | Promise<void>;
375
412
  /** Shows (true) or hides a source's events; omitted switches it. Resolves with whether they show. */
376
413
  setCalendarSource(id: string, visible?: boolean): boolean | Promise<boolean>;
414
+ /** Puts back the configured view, date, zoom and sources (the Reset button of reset: true). */
415
+ resetCalendar(): Promise<GridCalendarState>;
377
416
  }
@@ -524,6 +524,9 @@ const labels = Object.freeze({
524
524
  calendarOutsideRange: "Außerhalb des Zeitraums dieses Kalenders",
525
525
  calendarClose: "Schließen",
526
526
  calendarDetailsOf: "Details zu {title}",
527
+ calendarReset: "Zurücksetzen",
528
+ calendarSharedBy: "Geteilt von {names}",
529
+ calendarSourcesShown: "{shown} von {total}",
527
530
  flowSteps: "Schritte",
528
531
  flowStepOf: "Schritt {current} von {count}",
529
532
  flowStepAnnounce: "Schritt {current} von {count}, {title}",
@@ -524,6 +524,9 @@ const labels = Object.freeze({
524
524
  calendarOutsideRange: "Fuera de las fechas que muestra este calendario",
525
525
  calendarClose: "Cerrar",
526
526
  calendarDetailsOf: "Detalles de {title}",
527
+ calendarReset: "Restablecer",
528
+ calendarSharedBy: "Compartido por {names}",
529
+ calendarSourcesShown: "{shown} de {total}",
527
530
  flowSteps: "Pasos",
528
531
  flowStepOf: "Paso {current} de {count}",
529
532
  flowStepAnnounce: "Paso {current} de {count}, {title}",
@@ -524,6 +524,9 @@ const labels = Object.freeze({
524
524
  calendarOutsideRange: "En dehors des dates de ce calendrier",
525
525
  calendarClose: "Fermer",
526
526
  calendarDetailsOf: "Détails de {title}",
527
+ calendarReset: "Réinitialiser",
528
+ calendarSharedBy: "Partagé par {names}",
529
+ calendarSourcesShown: "{shown} sur {total}",
527
530
  flowSteps: "Étapes",
528
531
  flowStepOf: "Étape {current} sur {count}",
529
532
  flowStepAnnounce: "Étape {current} sur {count}, {title}",
@@ -524,6 +524,9 @@ const labels = Object.freeze({
524
524
  calendarOutsideRange: "Al di fuori delle date di questo calendario",
525
525
  calendarClose: "Chiudi",
526
526
  calendarDetailsOf: "Dettagli di {title}",
527
+ calendarReset: "Ripristina",
528
+ calendarSharedBy: "Condiviso da {names}",
529
+ calendarSourcesShown: "{shown} di {total}",
527
530
  flowSteps: "Passaggi",
528
531
  flowStepOf: "Passaggio {current} di {count}",
529
532
  flowStepAnnounce: "Passaggio {current} di {count}, {title}",
@@ -524,6 +524,9 @@ const labels = Object.freeze({
524
524
  calendarOutsideRange: "Poza datami, które pokazuje ten kalendarz",
525
525
  calendarClose: "Zamknij",
526
526
  calendarDetailsOf: "Szczegóły: {title}",
527
+ calendarReset: "Resetuj",
528
+ calendarSharedBy: "Wspólne: {names}",
529
+ calendarSourcesShown: "{shown} z {total}",
527
530
  flowSteps: "Kroki",
528
531
  flowStepOf: "Krok {current} z {count}",
529
532
  flowStepAnnounce: "Krok {current} z {count}: {title}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evotecit/canopyx",
3
- "version": "0.3.21",
3
+ "version": "0.3.23",
4
4
  "description": "Interactive tree grids and data tables with virtual rows, search, filters and offline HTML reports.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -102,6 +102,8 @@
102
102
  "./calendar-recurrence.js": "./CanopyX.Html/Assets/canopyx-calendar-recurrence.js",
103
103
  "./calendar-edit.js": "./CanopyX.Html/Assets/canopyx-calendar-edit.js",
104
104
  "./calendar-ics.js": "./CanopyX.Html/Assets/canopyx-calendar-ics.js",
105
+ "./calendar-screen.js": "./CanopyX.Html/Assets/canopyx-calendar-screen.js",
106
+ "./calendar-screen.css": "./CanopyX.Html/Assets/canopyx-calendar-screen.css",
105
107
  "./timeline.js": "./CanopyX.Html/Assets/canopyx-timeline.js",
106
108
  "./timeline.css": "./CanopyX.Html/Assets/canopyx-timeline.css",
107
109
  "./ui-overlays.js": "./CanopyX.Html/Assets/canopyx-ui-overlays.js",
@@ -250,6 +252,8 @@
250
252
  "CanopyX.Html/Assets/canopyx-calendar-recurrence.js",
251
253
  "CanopyX.Html/Assets/canopyx-calendar-edit.js",
252
254
  "CanopyX.Html/Assets/canopyx-calendar-ics.js",
255
+ "CanopyX.Html/Assets/canopyx-calendar-screen.js",
256
+ "CanopyX.Html/Assets/canopyx-calendar-screen.css",
253
257
  "CanopyX.Html/Assets/canopyx-timeline.js",
254
258
  "CanopyX.Html/Assets/canopyx-timeline.css",
255
259
  "CanopyX.Html/Assets/canopyx-ui-overlays.js",