@zealicsolutions/web-ui 1.0.60-test.2 → 1.0.60-test.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +247 -247
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/molecules/Calendar/CalendarMolecule.d.ts +0 -7
- package/dist/cjs/molecules/Calendar/ResourceTimelineCalendar.d.ts +95 -2
- package/dist/cjs/molecules/Calendar/SimpleCalendar.d.ts +98 -2
- package/dist/cjs/molecules/Calendar/YearViewCalendar.d.ts +84 -2
- package/dist/cjs/molecules/Calendar/hooks/useCalendarCore.d.ts +14 -0
- package/dist/cjs/molecules/Calendar/hooks/useCalendarStyling.d.ts +229 -0
- package/dist/esm/molecules/Calendar/CalendarMolecule.d.ts +0 -7
- package/dist/esm/molecules/Calendar/ResourceTimelineCalendar.d.ts +95 -2
- package/dist/esm/molecules/Calendar/ResourceTimelineCalendar.js +1 -1
- package/dist/esm/molecules/Calendar/ResourceTimelineCalendar.js.map +1 -1
- package/dist/esm/molecules/Calendar/SimpleCalendar.d.ts +98 -2
- package/dist/esm/molecules/Calendar/SimpleCalendar.js +1 -1
- package/dist/esm/molecules/Calendar/SimpleCalendar.js.map +1 -1
- package/dist/esm/molecules/Calendar/YearViewCalendar.d.ts +84 -2
- package/dist/esm/molecules/Calendar/YearViewCalendar.js +1 -1
- package/dist/esm/molecules/Calendar/YearViewCalendar.js.map +1 -1
- package/dist/esm/molecules/Calendar/hooks/useCalendarCore.d.ts +14 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarCore.js +2 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarCore.js.map +1 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarStyling.d.ts +229 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarStyling.js +2 -0
- package/dist/esm/molecules/Calendar/hooks/useCalendarStyling.js.map +1 -0
- package/dist/esm/node_modules/@fullcalendar/premium-common/index.js +1 -1
- package/dist/esm/node_modules/@fullcalendar/premium-common/index.js.map +1 -1
- package/dist/esm/node_modules/@fullcalendar/timeline/internal.js +1 -1
- package/dist/esm/node_modules/@fullcalendar/timeline/internal.js.map +1 -1
- package/dist/index.d.ts +0 -7
- package/package.json +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js +0 -2
- package/dist/esm/molecules/Calendar/CalendarMolecule.js.map +0 -1
@@ -0,0 +1,2 @@
|
|
1
|
+
import{__assign as o}from"../../../node_modules/tslib/tslib.es6.js";import{useMemo as r}from"react";var p=function(p){var x=function(o){if(!o||o<0)return"none";var r={0:"none",1:"0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12)",2:"0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12)",3:"0px 3px 3px -2px rgba(0,0,0,0.2), 0px 3px 4px 0px rgba(0,0,0,0.14), 0px 1px 8px 0px rgba(0,0,0,0.12)",4:"0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12)",5:"0px 3px 5px -1px rgba(0,0,0,0.2), 0px 5px 8px 0px rgba(0,0,0,0.14), 0px 1px 14px 0px rgba(0,0,0,0.12)",6:"0px 3px 5px -1px rgba(0,0,0,0.2), 0px 6px 10px 0px rgba(0,0,0,0.14), 0px 1px 18px 0px rgba(0,0,0,0.12)",7:"0px 4px 5px -2px rgba(0,0,0,0.2), 0px 7px 10px 1px rgba(0,0,0,0.14), 0px 2px 16px 1px rgba(0,0,0,0.12)",8:"0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)",9:"0px 5px 6px -3px rgba(0,0,0,0.2), 0px 9px 12px 1px rgba(0,0,0,0.14), 0px 3px 16px 2px rgba(0,0,0,0.12)",10:"0px 6px 6px -3px rgba(0,0,0,0.2), 0px 10px 14px 1px rgba(0,0,0,0.14), 0px 4px 18px 3px rgba(0,0,0,0.12)",11:"0px 6px 7px -4px rgba(0,0,0,0.2), 0px 11px 15px 1px rgba(0,0,0,0.14), 0px 4px 20px 3px rgba(0,0,0,0.12)",12:"0px 7px 8px -4px rgba(0,0,0,0.2), 0px 12px 17px 2px rgba(0,0,0,0.14), 0px 5px 22px 4px rgba(0,0,0,0.12)",13:"0px 7px 8px -4px rgba(0,0,0,0.2), 0px 13px 19px 2px rgba(0,0,0,0.14), 0px 5px 24px 4px rgba(0,0,0,0.12)",14:"0px 7px 9px -4px rgba(0,0,0,0.2), 0px 14px 21px 2px rgba(0,0,0,0.14), 0px 5px 26px 4px rgba(0,0,0,0.12)",15:"0px 8px 9px -5px rgba(0,0,0,0.2), 0px 15px 22px 2px rgba(0,0,0,0.14), 0px 6px 28px 5px rgba(0,0,0,0.12)",16:"0px 8px 10px -5px rgba(0,0,0,0.2), 0px 16px 24px 2px rgba(0,0,0,0.14), 0px 6px 30px 5px rgba(0,0,0,0.12)",17:"0px 8px 11px -5px rgba(0,0,0,0.2), 0px 17px 26px 2px rgba(0,0,0,0.14), 0px 6px 32px 5px rgba(0,0,0,0.12)",18:"0px 9px 11px -5px rgba(0,0,0,0.2), 0px 18px 28px 2px rgba(0,0,0,0.14), 0px 7px 34px 6px rgba(0,0,0,0.12)",19:"0px 9px 12px -6px rgba(0,0,0,0.2), 0px 19px 29px 2px rgba(0,0,0,0.14), 0px 7px 36px 6px rgba(0,0,0,0.12)",20:"0px 10px 13px -6px rgba(0,0,0,0.2), 0px 20px 31px 3px rgba(0,0,0,0.14), 0px 8px 38px 7px rgba(0,0,0,0.12)",21:"0px 10px 13px -6px rgba(0,0,0,0.2), 0px 21px 33px 3px rgba(0,0,0,0.14), 0px 8px 40px 7px rgba(0,0,0,0.12)",22:"0px 10px 14px -6px rgba(0,0,0,0.2), 0px 22px 35px 3px rgba(0,0,0,0.14), 0px 8px 42px 7px rgba(0,0,0,0.12)",23:"0px 11px 14px -7px rgba(0,0,0,0.2), 0px 23px 36px 3px rgba(0,0,0,0.14), 0px 9px 44px 8px rgba(0,0,0,0.12)",24:"0px 11px 15px -7px rgba(0,0,0,0.2), 0px 24px 38px 3px rgba(0,0,0,0.14), 0px 9px 46px 8px rgba(0,0,0,0.12)"};return r[Math.min(Math.max(Math.round(o),0),24)]||r[0]};return{sx:r((function(){var r=p.width,e=p.marginLeft,a=p.marginTop,t=p.marginRight,n=p.marginBottom,d=p.paddingLeft,l=p.paddingTop,i=p.paddingRight,g=p.paddingBottom,c=p.buttonFontSize,b=p.buttonPaddingY,f=p.buttonPaddingX,u=p.buttonColor,s=p.buttonTextColor,h=p.buttonBorderColor,C=p.buttonFontWeight,m=p.buttonElevation,v=p.buttonHeight,y=p.buttonMinWidth,S=p.buttonMarginY,k=p.buttonMarginX,B=p.buttonBorderRadius,W=p.buttonHoverColor,F=p.buttonHoverTextColor,w=p.buttonHoverBorderColor,z=p.headerBackgroundColor,T=p.headerBorderColor,H=p.headerPadding,R=p.headerHeight,Y=p.headerFontSize,L=p.headerFontWeight,M=p.headerTextColor,G=p.dayHeaderColor,P=p.dayHeaderFontWeight,E=p.eventBackgroundColor,A=p.eventBorderColor,D=p.eventTextColor,I=p.eventBorderRadius,X=p.eventOpacity,j=p.eventElevation,N=p.eventPadding,O=p.eventFontSize,_=p.eventFontFamily,q=p.eventFontWeight,J=p.cellBackgroundColor,K=p.cellHoverBackgroundColor,Q=p.cellTodayBackgroundColor,U=p.cellBorderColor,V=p.cellTextColor,Z=p.cellFontSize,$=p.cellPadding,oo=p.cellHeight,ro=p.timeGridSlotHeight,po=p.timeGridSlotBorderColor,xo=p.timeGridNowIndicatorColor,eo=p.timeGridLabelFontSize,ao=p.timeGridLabelColor,to=p.nowIndicatorColor,no=p.allDayBackgroundColor,lo=p.allDayTextColor,io=p.resourceAreaWidth,go=p.resourceBackgroundColor,co=p.resourceTextColor,bo=p.resourceBorderColor,fo=p.resourceFontSize,uo=p.resourcePadding,so=p.borderStyle,ho=p.borderWidth,Co=p.borderColor,mo=p.borderRadius,vo=p.backgroundColor,yo=p.fontFamily,So=p.elevation,ko=p.enableAnimations,Bo=p.animationSpeed,Wo=p.hoverEffect,Fo=p.showGridLines;return o(o({width:r,marginLeft:e,marginTop:a,marginRight:t,marginBottom:n,paddingLeft:d,paddingTop:l,paddingRight:i,paddingBottom:g,"& .fc .fc-toolbar":{backgroundColor:z,color:M,borderColor:T,padding:H,height:R,"& .fc-toolbar-title":{fontSize:Y,fontWeight:L,color:M}},"& .fc .fc-col-header-cell-cushion":{color:G,fontWeight:P},"& .fc .fc-timegrid-slot-label-cushion":{color:ao,fontSize:eo},"& .fc .fc-event":{color:D},"& .fc .fc-event:hover":{backgroundColor:E},"& .fc .fc-event-title":{fontSize:O,fontFamily:_,fontWeight:q},"& .fc .fc-now-indicator":{backgroundColor:to},"& .fc .fc-timegrid-now-indicator-line":{backgroundColor:xo||to},"& .fc .fc-timegrid-slot":{height:ro,borderColor:po},"& .fc .fc-resource-area":{backgroundColor:go,width:io,borderColor:bo,"& .fc-resource-cell":{color:co,fontSize:fo,padding:uo}},"& .fc .fc-resource .fc-resource-title":{color:co},"& .fc .fc-resource-area-cell":{borderColor:bo}},Fo?{}:{"& .fc .fc-scrollgrid-shim, & .fc .fc-timegrid-divider":{display:"none"}}),{"& .fc":{borderRadius:mo,borderColor:Co,borderWidth:ho,borderStyle:so||"none",boxShadow:x(So),fontFamily:yo,backgroundColor:vo},"& .fc .fc-button":o({fontSize:c,padding:b||f?"".concat(b||"0"," ").concat(f||"0"):void 0,borderRadius:B,backgroundColor:u,color:s,borderColor:h,fontWeight:C,boxShadow:x(m),height:v,minWidth:y,margin:S||k?"".concat(S||"0"," ").concat(k||"0"):void 0},ko&&{transition:"all ".concat(Bo||"0.3s"," ease"),"&:hover":{backgroundColor:W,color:F,borderColor:w,transform:"lift"===Wo?"translateY(-2px)":"scale"===Wo?"scale(1.05)":"bounce"===Wo?"translateY(-1px) scale(1.02)":"none"}}),"& .fc-event":o({backgroundColor:E,color:D,borderColor:A,borderRadius:I,fontSize:O,fontWeight:q,opacity:X,boxShadow:x(j),padding:N,borderWidth:ho,borderStyle:so||"none"},ko&&{transition:"all ".concat(Bo||"0.3s"," ease"),"&:hover":{transform:"lift"===Wo?"translateY(-3px)":"scale"===Wo?"scale(1.02)":"glow"===Wo?"translateY(-1px)":"bounce"===Wo?"translateY(-2px) scale(1.01)":"none",boxShadow:"".concat(x(j)||"","glow"===Wo?", 0 0 20px rgba(103, 58, 183, 0.4)":", 0 8px 25px rgba(0, 0, 0, 0.15)")}}),"& .fc .fc-daygrid-day, & .fc .fc-timegrid-slot, & .fc .fc-col-header-cell":o({backgroundColor:J,borderColor:U,borderWidth:ho,borderStyle:so||"none",padding:$,height:oo,color:V,fontSize:Z},ko&&{transition:"all ".concat(Bo||"0.3s"," ease"),"&:hover":{backgroundColor:K,transform:"scale"===Wo?"scale(1.02)":"lift"===Wo?"translateY(-1px)":"none"}}),"& .fc .fc-day-today":{backgroundColor:Q},"& .fc .fc-timegrid-all-day-slot":{backgroundColor:no},"& .fc .fc-timegrid-all-day-slot .fc-event":{color:lo},'& .fc .fc-daygrid-day .fc-event[data-all-day="true"]':{color:lo,backgroundColor:no}})}),[p]),getMaterialElevation:x}};export{p as useCalendarStyling};
|
2
|
+
//# sourceMappingURL=useCalendarStyling.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useCalendarStyling.js","sources":["../../../../../../src/molecules/Calendar/hooks/useCalendarStyling.ts"],"sourcesContent":[null],"names":["useCalendarStyling","props","getMaterialElevation","elevation","shadows","Math","min","max","round","sx","useMemo","width","marginLeft","marginTop","marginRight","marginBottom","paddingLeft","paddingTop","paddingRight","paddingBottom","buttonFontSize","buttonPaddingY","buttonPaddingX","buttonColor","buttonTextColor","buttonBorderColor","buttonFontWeight","buttonElevation","buttonHeight","buttonMinWidth","buttonMarginY","buttonMarginX","buttonBorderRadius","buttonHoverColor","buttonHoverTextColor","buttonHoverBorderColor","headerBackgroundColor","headerBorderColor","headerPadding","headerHeight","headerFontSize","headerFontWeight","headerTextColor","dayHeaderColor","dayHeaderFontWeight","eventBackgroundColor","eventBorderColor","eventTextColor","eventBorderRadius","eventOpacity","eventElevation","eventPadding","eventFontSize","eventFontFamily","eventFontWeight","cellBackgroundColor","cellHoverBackgroundColor","cellTodayBackgroundColor","cellBorderColor","cellTextColor","cellFontSize","cellPadding","cellHeight","timeGridSlotHeight","timeGridSlotBorderColor","timeGridNowIndicatorColor","timeGridLabelFontSize","timeGridLabelColor","nowIndicatorColor","allDayBackgroundColor","allDayTextColor","resourceAreaWidth","resourceBackgroundColor","resourceTextColor","resourceBorderColor","resourceFontSize","resourcePadding","borderStyle","borderWidth","borderColor","borderRadius","backgroundColor","fontFamily","enableAnimations","animationSpeed","hoverEffect","showGridLines","__assign","color","padding","height","fontSize","fontWeight","display","boxShadow","concat","undefined","minWidth","margin","transition","transform","opacity"],"mappings":"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"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{createPlugin as e}from"../core/index.js";import{
|
1
|
+
import{createPlugin as e}from"../core/index.js";import{createElement as o,Fragment as t}from"../../preact/dist/preact.mjs.js";import{bk as i,t as n,bG as r}from"../core/internal-common.js";const s=["GPL-My-Project-Is-Open-Source","CC-Attribution-NonCommercial-NoDerivatives"],a={position:"absolute",zIndex:99999,bottom:"1px",left:"1px",background:"#eee",borderColor:"#ddd",borderStyle:"solid",borderWidth:"1px 1px 0 0",padding:"2px 4px",fontSize:"12px",borderTopRightRadius:"3px"};var l=e({name:"@fullcalendar/premium-common",premiumReleaseDate:"2025-04-02",optionRefiners:{schedulerLicenseKey:String},viewContainerAppends:[function(e){let l=e.options.schedulerLicenseKey,d="undefined"!=typeof window?window.location.href:"";if(!/\w+:\/\/fullcalendar\.io\/|\/examples\/[\w-]+\.html$/.test(d)){let d=function(e,o){if(-1!==s.indexOf(e))return"valid";const t=(e||"").match(/^(\d+)-fcs-(\d+)$/);if(t&&10===t[1].length){const e=new Date(1e3*parseInt(t[2],10)),s=r.mockSchedulerReleaseDate||o;if(i(s)){return n(s,-372)<e?"valid":"outdated"}}return"invalid"}(l,e.pluginHooks.premiumReleaseDate);if("valid"!==d)return o("div",{className:"fc-license-message",style:a},"outdated"===d?o(t,null,"Your license key is too old to work with this version. ",o("a",{href:"https://fullcalendar.io/docs/schedulerLicenseKey#outdated"},"More Info")):o(t,null,"Your license key is invalid. ",o("a",{href:"https://fullcalendar.io/docs/schedulerLicenseKey#invalid"},"More Info")))}return null}]});export{l as default};
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@fullcalendar/premium-common/index.js"],"sourcesContent":["import { createPlugin } from '@fullcalendar/core/index.js';\nimport { config, isValidDate, addDays } from '@fullcalendar/core/internal.js';\nimport { createElement, Fragment } from '@fullcalendar/core/preact.js';\n\nconst UPGRADE_WINDOW = 365 + 7; // days. 1 week leeway, for tz shift reasons too\nconst INVALID_LICENSE_URL = 'https://fullcalendar.io/docs/schedulerLicenseKey#invalid';\nconst OUTDATED_LICENSE_URL = 'https://fullcalendar.io/docs/schedulerLicenseKey#outdated';\nconst PRESET_LICENSE_KEYS = [\n 'GPL-My-Project-Is-Open-Source',\n 'CC-Attribution-NonCommercial-NoDerivatives',\n];\nconst CSS = {\n position: 'absolute',\n zIndex: 99999,\n bottom: '1px',\n left: '1px',\n background: '#eee',\n borderColor: '#ddd',\n borderStyle: 'solid',\n borderWidth: '1px 1px 0 0',\n padding: '2px 4px',\n fontSize: '12px',\n borderTopRightRadius: '3px',\n};\nfunction buildLicenseWarning(context) {\n let key = context.options.schedulerLicenseKey;\n let currentUrl = typeof window !== 'undefined' ? window.location.href : '';\n if (!isImmuneUrl(currentUrl)) {\n let status = processLicenseKey(key, context.pluginHooks.premiumReleaseDate);\n if (status !== 'valid') {\n return (createElement(\"div\", { className: \"fc-license-message\", style: CSS }, (status === 'outdated') ? (createElement(Fragment, null,\n 'Your license key is too old to work with this version. ',\n createElement(\"a\", { href: OUTDATED_LICENSE_URL }, \"More Info\"))) : (createElement(Fragment, null,\n 'Your license key is invalid. ',\n createElement(\"a\", { href: INVALID_LICENSE_URL }, \"More Info\")))));\n }\n }\n return null;\n}\n/*\nThis decryption is not meant to be bulletproof. Just a way to remind about an upgrade.\n*/\nfunction processLicenseKey(key, premiumReleaseDate) {\n if (PRESET_LICENSE_KEYS.indexOf(key) !== -1) {\n return 'valid';\n }\n const parts = (key || '').match(/^(\\d+)-fcs-(\\d+)$/);\n if (parts && (parts[1].length === 10)) {\n const purchaseDate = new Date(parseInt(parts[2], 10) * 1000);\n const releaseDate = config.mockSchedulerReleaseDate || premiumReleaseDate;\n if (isValidDate(releaseDate)) { // token won't be replaced in dev mode\n const minPurchaseDate = addDays(releaseDate, -UPGRADE_WINDOW);\n if (minPurchaseDate < purchaseDate) {\n return 'valid';\n }\n return 'outdated';\n }\n }\n return 'invalid';\n}\nfunction isImmuneUrl(url) {\n return /\\w+:\\/\\/fullcalendar\\.io\\/|\\/examples\\/[\\w-]+\\.html$/.test(url);\n}\n\nconst OPTION_REFINERS = {\n schedulerLicenseKey: String,\n};\n\nvar index = createPlugin({\n name: '@fullcalendar/premium-common',\n premiumReleaseDate: '2025-04-02',\n optionRefiners: OPTION_REFINERS,\n viewContainerAppends: [buildLicenseWarning],\n});\n\nexport { index as default };\n"],"names":["PRESET_LICENSE_KEYS","CSS","position","zIndex","bottom","left","background","borderColor","borderStyle","borderWidth","padding","fontSize","borderTopRightRadius","index","createPlugin","name","premiumReleaseDate","optionRefiners","schedulerLicenseKey","String","viewContainerAppends","context","key","options","currentUrl","window","location","href","test","status","indexOf","parts","match","length","purchaseDate","Date","parseInt","releaseDate","config","mockSchedulerReleaseDate","isValidDate","addDays","processLicenseKey","pluginHooks","createElement","className","style","Fragment"],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@fullcalendar/premium-common/index.js"],"sourcesContent":["import { createPlugin } from '@fullcalendar/core/index.js';\nimport { config, isValidDate, addDays } from '@fullcalendar/core/internal.js';\nimport { createElement, Fragment } from '@fullcalendar/core/preact.js';\n\nconst UPGRADE_WINDOW = 365 + 7; // days. 1 week leeway, for tz shift reasons too\nconst INVALID_LICENSE_URL = 'https://fullcalendar.io/docs/schedulerLicenseKey#invalid';\nconst OUTDATED_LICENSE_URL = 'https://fullcalendar.io/docs/schedulerLicenseKey#outdated';\nconst PRESET_LICENSE_KEYS = [\n 'GPL-My-Project-Is-Open-Source',\n 'CC-Attribution-NonCommercial-NoDerivatives',\n];\nconst CSS = {\n position: 'absolute',\n zIndex: 99999,\n bottom: '1px',\n left: '1px',\n background: '#eee',\n borderColor: '#ddd',\n borderStyle: 'solid',\n borderWidth: '1px 1px 0 0',\n padding: '2px 4px',\n fontSize: '12px',\n borderTopRightRadius: '3px',\n};\nfunction buildLicenseWarning(context) {\n let key = context.options.schedulerLicenseKey;\n let currentUrl = typeof window !== 'undefined' ? window.location.href : '';\n if (!isImmuneUrl(currentUrl)) {\n let status = processLicenseKey(key, context.pluginHooks.premiumReleaseDate);\n if (status !== 'valid') {\n return (createElement(\"div\", { className: \"fc-license-message\", style: CSS }, (status === 'outdated') ? (createElement(Fragment, null,\n 'Your license key is too old to work with this version. ',\n createElement(\"a\", { href: OUTDATED_LICENSE_URL }, \"More Info\"))) : (createElement(Fragment, null,\n 'Your license key is invalid. ',\n createElement(\"a\", { href: INVALID_LICENSE_URL }, \"More Info\")))));\n }\n }\n return null;\n}\n/*\nThis decryption is not meant to be bulletproof. Just a way to remind about an upgrade.\n*/\nfunction processLicenseKey(key, premiumReleaseDate) {\n if (PRESET_LICENSE_KEYS.indexOf(key) !== -1) {\n return 'valid';\n }\n const parts = (key || '').match(/^(\\d+)-fcs-(\\d+)$/);\n if (parts && (parts[1].length === 10)) {\n const purchaseDate = new Date(parseInt(parts[2], 10) * 1000);\n const releaseDate = config.mockSchedulerReleaseDate || premiumReleaseDate;\n if (isValidDate(releaseDate)) { // token won't be replaced in dev mode\n const minPurchaseDate = addDays(releaseDate, -UPGRADE_WINDOW);\n if (minPurchaseDate < purchaseDate) {\n return 'valid';\n }\n return 'outdated';\n }\n }\n return 'invalid';\n}\nfunction isImmuneUrl(url) {\n return /\\w+:\\/\\/fullcalendar\\.io\\/|\\/examples\\/[\\w-]+\\.html$/.test(url);\n}\n\nconst OPTION_REFINERS = {\n schedulerLicenseKey: String,\n};\n\nvar index = createPlugin({\n name: '@fullcalendar/premium-common',\n premiumReleaseDate: '2025-04-02',\n optionRefiners: OPTION_REFINERS,\n viewContainerAppends: [buildLicenseWarning],\n});\n\nexport { index as default };\n"],"names":["PRESET_LICENSE_KEYS","CSS","position","zIndex","bottom","left","background","borderColor","borderStyle","borderWidth","padding","fontSize","borderTopRightRadius","index","createPlugin","name","premiumReleaseDate","optionRefiners","schedulerLicenseKey","String","viewContainerAppends","context","key","options","currentUrl","window","location","href","test","status","indexOf","parts","match","length","purchaseDate","Date","parseInt","releaseDate","config","mockSchedulerReleaseDate","isValidDate","addDays","processLicenseKey","pluginHooks","createElement","className","style","Fragment"],"mappings":"6LAIA,MAGMA,EAAsB,CACxB,gCACA,8CAEEC,EAAM,CACRC,SAAU,WACVC,OAAQ,MACRC,OAAQ,MACRC,KAAM,MACNC,WAAY,OACZC,YAAa,OACbC,YAAa,QACbC,YAAa,cACbC,QAAS,UACTC,SAAU,OACVC,qBAAsB,OA8CvB,IAACC,EAAQC,EAAa,CACrBC,KAAM,+BACNC,mBAAoB,aACpBC,eAPoB,CACpBC,oBAAqBC,QAOrBC,qBAAsB,CAhD1B,SAA6BC,GACzB,IAAIC,EAAMD,EAAQE,QAAQL,oBACtBM,EAA+B,oBAAXC,OAAyBA,OAAOC,SAASC,KAAO,GACxE,IAkCO,uDAAuDC,KAlC7CJ,GAAa,CAC1B,IAAIK,EAcZ,SAA2BP,EAAKN,GAC5B,IAA0C,IAAtChB,EAAoB8B,QAAQR,GAC5B,MAAO,QAEX,MAAMS,GAAST,GAAO,IAAIU,MAAM,qBAChC,GAAID,GAA8B,KAApBA,EAAM,GAAGE,OAAgB,CACnC,MAAMC,EAAe,IAAIC,KAA8B,IAAzBC,SAASL,EAAM,GAAI,KAC3CM,EAAcC,EAAOC,0BAA4BvB,EACvD,GAAIwB,EAAYH,GAAc,CAE1B,OADwBI,EAAQJ,GA/CrB,KAgDWH,EACX,QAEJ,UACV,CACJ,CACD,MAAO,SACX,CA/BqBQ,CAAkBpB,EAAKD,EAAQsB,YAAY3B,oBACxD,GAAe,UAAXa,EACA,OAAQe,EAAc,MAAO,CAAEC,UAAW,qBAAsBC,MAAO7C,GAAmB,aAAX4B,EAA0Be,EAAcG,EAAU,KAC7H,0DACAH,EAAc,IAAK,CAAEjB,KA1BR,6DA0BsC,cAAkBiB,EAAcG,EAAU,KAC7F,gCACAH,EAAc,IAAK,CAAEjB,KA7BT,4DA6BsC,cAE7D,CACD,OAAO,IACX"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{ScrollGrid as e}from"../scrollgrid/internal.js";import{ct as t,bG as n,x as i,E as s,bc as o,z as r,ca as l,c9 as a,cq as d,c,bl as h,d as f,br as u,bq as m,t as p,q as g,bp as v,bo as b,y as S,al as R,B as D,ch as y,a6 as w,aK as C,bP as x,cd as k,a as P,bu as M,cp as T,bQ as E,c8 as I,ak as W,bm as z,bC as L,cm as H,cl as N,bR as O,bU as U,o as A,be as G,cg as j,co as B,aw as q,A as F,aY as _,aZ as Z,aX as X,C as Y,a_ as K,b8 as Q,aL as J,G as V,by as $}from"../core/internal-common.js";import{createRef as ee,createElement as te,Fragment as ne}from"../../preact/dist/preact.mjs.js";t('.fc .fc-timeline-body{min-height:100%;position:relative;z-index:1}.fc .fc-timeline-slots{bottom:0;position:absolute;top:0;z-index:1}.fc .fc-timeline-slots>table{height:100%}.fc .fc-timeline-slot-minor{border-style:dotted}.fc .fc-timeline-slot-frame{align-items:center;display:flex;justify-content:center}.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame{justify-content:flex-start}.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame{overflow:hidden}.fc .fc-timeline-slot-cushion{padding:4px 5px;white-space:nowrap}.fc-direction-ltr .fc-timeline-slot{border-right:0!important}.fc-direction-rtl .fc-timeline-slot{border-left:0!important}.fc .fc-timeline-now-indicator-container{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:4}.fc .fc-timeline-now-indicator-arrow,.fc .fc-timeline-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;pointer-events:none;position:absolute;top:0}.fc .fc-timeline-now-indicator-arrow{border-left-color:transparent;border-right-color:transparent;border-width:6px 5px 0;margin:0 -6px}.fc .fc-timeline-now-indicator-line{border-width:0 0 0 1px;bottom:0;margin:0 -1px}.fc .fc-timeline-events{position:relative;width:0;z-index:3}.fc .fc-timeline-event-harness,.fc .fc-timeline-more-link{position:absolute;top:0}.fc-timeline-event{z-index:1}.fc-timeline-event.fc-event-mirror{z-index:2}.fc-timeline-event{align-items:center;border-radius:0;display:flex;font-size:var(--fc-small-font-size);margin-bottom:1px;padding:2px 1px;position:relative}.fc-timeline-event .fc-event-main{flex-grow:1;flex-shrink:1;min-width:0}.fc-timeline-event .fc-event-time{font-weight:700}.fc-timeline-event .fc-event-time,.fc-timeline-event .fc-event-title{padding:0 2px;white-space:nowrap}.fc-direction-ltr .fc-timeline-event.fc-event-end,.fc-direction-ltr .fc-timeline-more-link{margin-right:1px}.fc-direction-rtl .fc-timeline-event.fc-event-end,.fc-direction-rtl .fc-timeline-more-link{margin-left:1px}.fc-timeline-overlap-disabled .fc-timeline-event{margin-bottom:0;padding-bottom:5px;padding-top:5px}.fc-timeline-event:not(.fc-event-end):after,.fc-timeline-event:not(.fc-event-start):before{border-color:transparent #000;border-style:solid;border-width:5px;content:"";flex-grow:0;flex-shrink:0;height:0;margin:0 1px;opacity:.5;width:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after{border-left:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before{border-right:0}.fc-timeline-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;font-size:var(--fc-small-font-size);padding:1px}.fc-timeline-more-link-inner{display:inline-block;left:0;padding:2px;right:0}.fc .fc-timeline-bg{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:2}.fc .fc-timeline-bg .fc-non-business{z-index:1}.fc .fc-timeline-bg .fc-bg-event{z-index:2}.fc .fc-timeline-bg .fc-highlight{z-index:3}.fc .fc-timeline-bg-harness{bottom:0;position:absolute;top:0}');n.MAX_TIMELINE_SLOTS=1e3;const ie=[{years:1},{months:1},{days:1},{hours:1},{minutes:30},{minutes:15},{minutes:10},{minutes:5},{minutes:1},{seconds:30},{seconds:15},{seconds:10},{seconds:5},{seconds:1},{milliseconds:500},{milliseconds:100},{milliseconds:10},{milliseconds:1}];function se(e,t,s,o){let r={labelInterval:s.slotLabelInterval,slotDuration:s.slotDuration};!function(e,t,i){const{currentRange:s}=t;if(e.labelInterval){i.countDurationsBetween(s.start,s.end,e.labelInterval)>n.MAX_TIMELINE_SLOTS&&(console.warn("slotLabelInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){i.countDurationsBetween(s.start,s.end,e.slotDuration)>n.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){const t=u(e.labelInterval,e.slotDuration);(null===t||t<1)&&(console.warn("slotLabelInterval must be a multiple of slotDuration"),e.slotDuration=null)}}(r,e,t),le(r,e,t),function(e,t,n){const{currentRange:i}=t;let{slotDuration:s}=e;if(!s){const o=le(e,t,n);for(let e of ie){const t=f(e),n=u(o,t);if(null!==n&&n>1&&n<=6){s=t;break}}if(s){n.countDurationsBetween(i.start,i.end,s)>200&&(s=null)}s||(s=o),e.slotDuration=s}}(r,e,t);let l=s.slotLabelFormat,a=Array.isArray(l)?l:null!=l?[l]:function(e,t,n,i){let s,o;const{labelInterval:r}=e;let l=c(r).unit;const a=i.weekNumbers;let d=s=o=null;"week"!==l||a||(l="day");switch(l){case"year":d={year:"numeric"};break;case"month":ae("years",t,n)>1&&(d={year:"numeric"}),s={month:"short"};break;case"week":ae("years",t,n)>1&&(d={year:"numeric"}),s={week:"narrow"};break;case"day":ae("years",t,n)>1?d={year:"numeric",month:"long"}:ae("months",t,n)>1&&(d={month:"long"}),a&&(s={week:"short"}),o={weekday:"narrow",day:"numeric"};break;case"hour":a&&(d={week:"short"}),ae("days",t,n)>1&&(s={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),o={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":b(r)/60>=6?(d={hour:"numeric",meridiem:"short"},s=e=>":"+W(e.date.minute,2)):d={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":v(r)/60>=6?(d={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},s=e=>":"+W(e.date.second,2)):d={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"};break;case"millisecond":d={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"},s=e=>"."+W(e.millisecond,3)}return[].concat(d||[],s||[],o||[])}(r,e,t,s);r.headerFormats=a.map((e=>i(e))),r.isTimeScale=Boolean(r.slotDuration.milliseconds);let d=null;if(!r.isTimeScale){const e=c(r.slotDuration).unit;/year|month|week/.test(e)&&(d=e)}r.largeUnit=d,r.emphasizeWeeks=1===h(r.slotDuration)&&ae("weeks",e,t)>=2&&!s.businessHours;let g,S,D=s.snapDuration;D&&(g=f(D),S=u(r.slotDuration,g)),null==S&&(g=r.slotDuration,S=1),r.snapDuration=g,r.snapsPerSlot=S;let y=m(e.slotMaxTime)-m(e.slotMinTime),w=oe(e.renderRange.start,r,t),C=oe(e.renderRange.end,r,t);r.isTimeScale&&(w=t.add(w,e.slotMinTime),C=t.add(p(C,-1),e.slotMaxTime)),r.timeWindowMs=y,r.normalizedRange={start:w,end:C};let x=[],k=w;for(;k<C;)re(k,r,e,o)&&x.push(k),k=t.add(k,r.slotDuration);r.slotDates=x;let P=-1,M=0;const T=[],E=[];for(k=w;k<C;)re(k,r,e,o)?(P+=1,T.push(P),E.push(M)):T.push(P+.5),k=t.add(k,r.snapDuration),M+=1;return r.snapDiffToIndex=T,r.snapIndexToDiff=E,r.snapCnt=P+1,r.slotCnt=r.snapCnt/r.snapsPerSlot,r.isWeekStarts=function(e,t){let{slotDates:n,emphasizeWeeks:i}=e,s=null,o=[];for(let e of n){let n=t.computeWeekNumber(e),r=i&&null!==s&&s!==n;s=n,o.push(r)}return o}(r,t),r.cellRows=function(e,t){let n=e.slotDates,i=e.headerFormats,s=i.map((()=>[])),o=h(e.slotDuration),r=7===o?"week":1===o?"day":null,l=i.map((e=>e.getSmallestUnit?e.getSmallestUnit():null));for(let o=0;o<n.length;o+=1){let a=n[o],d=e.isWeekStarts[o];for(let n=0;n<i.length;n+=1){let o=i[n],c=s[n],h=c[c.length-1],f=n===i.length-1,u=i.length>1&&!f,m=null,p=l[n]||(f?r:null);if(u){let e=t.format(a,o);h&&h.text===e?h.colspan+=1:m=de(a,e,p)}else if(!h||R(t.countDurationsBetween(e.normalizedRange.start,a,e.labelInterval))){m=de(a,t.format(a,o),p)}else h.colspan+=1;m&&(m.weekStart=d,c.push(m))}}return s}(r,t),r.slotsPerLabel=u(r.labelInterval,r.slotDuration),r}function oe(e,t,n){let i=e;return t.isTimeScale||(i=g(i),t.largeUnit&&(i=n.startOf(i,t.largeUnit))),i}function re(e,t,n,i){if(i.isHiddenDay(e))return!1;if(t.isTimeScale){let i=g(e),s=e.valueOf()-i.valueOf()-m(n.slotMinTime);return s=(s%864e5+864e5)%864e5,s<t.timeWindowMs}return!0}function le(e,t,n){const{currentRange:i}=t;let{labelInterval:s}=e;if(!s){let t;if(e.slotDuration){for(t of ie){const n=f(t),i=u(n,e.slotDuration);if(null!==i&&i<=6){s=n;break}}s||(s=e.slotDuration)}else for(t of ie){s=f(t);if(n.countDurationsBetween(i.start,i.end,s)>=18)break}e.labelInterval=s}return s}function ae(e,t,n){let i=t.currentRange,s=null;return"years"===e?s=n.diffWholeYears(i.start,i.end):"months"===e||"weeks"===e?s=n.diffWholeMonths(i.start,i.end):"days"===e&&(s=S(i.start,i.end)),s||0}function de(e,t,n){return{date:e,text:t,rowUnit:n,colspan:1,isWeekStart:!1}}class ce extends D{constructor(){super(...arguments),this.refineRenderProps=F(ue),this.buildCellNavLinkAttrs=r(he)}render(){let{props:e,context:t}=this,{dateEnv:n,options:i}=t,{cell:s,dateProfile:o,tDateProfile:r}=e,l=_(s.date,e.todayRange,e.nowDate,o),a=this.refineRenderProps({level:e.rowLevel,dateMarker:s.date,text:s.text,dateEnv:t.dateEnv,viewApi:t.viewApi});return te(Y,{elTag:"th",elClasses:["fc-timeline-slot","fc-timeline-slot-label",s.isWeekStart&&"fc-timeline-slot-em",..."time"===s.rowUnit?Z(l,t.theme):X(l,t.theme)],elAttrs:{colSpan:s.colspan,"data-date":n.formatIso(s.date,{omitTime:!r.isTimeScale,omitTimeZoneOffset:!0})},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:fe,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(n=>te("div",{className:"fc-timeline-slot-frame",style:{height:e.rowInnerHeight}},te(n,{elTag:"a",elClasses:["fc-timeline-slot-cushion","fc-scrollgrid-sync-inner",e.isSticky&&"fc-sticky"],elAttrs:this.buildCellNavLinkAttrs(t,s.date,s.rowUnit)}))))}}function he(e,t,n){return n&&"time"!==n?K(e,t,n):{}}function fe(e){return e.text}function ue(e){return{level:e.level,date:e.dateEnv.toDate(e.dateMarker),view:e.viewApi,text:e.text}}class me extends D{render(){let{dateProfile:e,tDateProfile:t,rowInnerHeights:n,todayRange:i,nowDate:s}=this.props,{cellRows:o}=t;return te(ne,null,o.map(((r,l)=>{let a=l===o.length-1,d=t.isTimeScale&&a;return te("tr",{key:l,className:["fc-timeline-header-row",d?"fc-timeline-header-row-chrono":""].join(" ")},r.map((o=>te(ce,{key:o.date.toISOString(),cell:o,rowLevel:l,dateProfile:e,tDateProfile:t,todayRange:i,nowDate:s,rowInnerHeight:n&&n[l],isSticky:!a}))))})))}}class pe{constructor(e,t,n,i,s,o){this.slatRootEl=e,this.dateProfile=n,this.tDateProfile=i,this.dateEnv=s,this.isRtl=o,this.outerCoordCache=new Q(e,t,!0,!1),this.innerCoordCache=new Q(e,J(t,"div"),!0,!1)}isDateInRange(e){return V(this.dateProfile.currentRange,e)}dateToCoord(e){let{tDateProfile:t}=this,n=this.computeDateSnapCoverage(e)/t.snapsPerSlot,i=Math.floor(n);i=Math.min(i,t.slotCnt-1);let s=n-i,{innerCoordCache:o,outerCoordCache:r}=this;return this.isRtl?r.originClientRect.width-(r.rights[i]-o.getWidth(i)*s):r.lefts[i]+o.getWidth(i)*s}rangeToCoords(e){return{start:this.dateToCoord(e.start),end:this.dateToCoord(e.end)}}durationToCoord(e){let{dateProfile:t,tDateProfile:n,dateEnv:i,isRtl:s}=this,o=0;if(t){let r=i.add(t.activeRange.start,e);n.isTimeScale||(r=g(r)),o=this.dateToCoord(r),!s&&o&&(o+=1)}return o}coordFromLeft(e){return this.isRtl?this.outerCoordCache.originClientRect.width-e:e}computeDateSnapCoverage(e){return ge(e,this.tDateProfile,this.dateEnv)}}function ge(e,t,n){let i=n.countDurationsBetween(t.normalizedRange.start,e,t.snapDuration);if(i<0)return 0;if(i>=t.snapDiffToIndex.length)return t.snapCnt;let s=Math.floor(i),o=t.snapDiffToIndex[s];return R(o)?o+=i-s:o=Math.ceil(o),o}function ve(e,t){return null===e?{left:"",right:""}:t?{right:e,left:""}:{left:e,right:""}}function be(e,t){return e?t?{right:e.start,left:-e.end}:{left:e.start,right:-e.end}:{left:"",right:""}}class Se extends D{constructor(){super(...arguments),this.rootElRef=ee()}render(){let{props:e,context:t}=this,n=c(e.tDateProfile.slotDuration).unit,i=e.slatCoords&&e.slatCoords.dateProfile===e.dateProfile?e.slatCoords:null;return te(w,{unit:n},((n,s)=>te("div",{className:"fc-timeline-header",ref:this.rootElRef},te("table",{"aria-hidden":!0,className:"fc-scrollgrid-sync-table",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,te("tbody",null,te(me,{dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:n,todayRange:s,rowInnerHeights:e.rowInnerHeights}))),t.options.nowIndicator&&te("div",{className:"fc-timeline-now-indicator-container"},i&&i.isDateInRange(n)&&te(y,{elClasses:["fc-timeline-now-indicator-arrow"],elStyle:ve(i.dateToCoord(n),t.isRtl),isAxis:!0,date:n})))))}componentDidMount(){this.updateSize()}componentDidUpdate(){this.updateSize()}updateSize(){this.props.onMaxCushionWidth&&this.props.onMaxCushionWidth(this.computeMaxCushionWidth())}computeMaxCushionWidth(){return Math.max(...C(this.rootElRef.current,".fc-timeline-header-row:last-child .fc-timeline-slot-cushion").map((e=>e.getBoundingClientRect().width)))}}class Re extends D{render(){let{props:e,context:t}=this,{dateEnv:n,options:i,theme:s}=t,{date:o,tDateProfile:r,isEm:l}=e,a=_(e.date,e.todayRange,e.nowDate,e.dateProfile),d=Object.assign(Object.assign({date:n.toDate(e.date)},a),{view:t.viewApi});return te(Y,{elTag:"td",elRef:e.elRef,elClasses:["fc-timeline-slot","fc-timeline-slot-lane",l&&"fc-timeline-slot-em",r.isTimeScale?R(n.countDurationsBetween(r.normalizedRange.start,e.date,r.labelInterval))?"fc-timeline-slot-major":"fc-timeline-slot-minor":"",...e.isDay?X(a,s):Z(a,s)],elAttrs:{"data-date":n.formatIso(o,{omitTimeZoneOffset:!0,omitTime:!r.isTimeScale})},renderProps:d,generatorName:"slotLaneContent",customGenerator:i.slotLaneContent,classNameGenerator:i.slotLaneClassNames,didMount:i.slotLaneDidMount,willUnmount:i.slotLaneWillUnmount},(e=>te(e,{elTag:"div"})))}}class De extends D{render(){let{props:e}=this,{tDateProfile:t,cellElRefs:n}=e,{slotDates:i,isWeekStarts:s}=t,o=!t.isTimeScale&&!t.largeUnit;return te("tbody",null,te("tr",null,i.map(((i,r)=>{let l=i.toISOString();return te(Re,{key:l,elRef:n.createRef(l),date:i,dateProfile:e.dateProfile,tDateProfile:t,nowDate:e.nowDate,todayRange:e.todayRange,isEm:s[r],isDay:o})}))))}}class ye extends D{constructor(){super(...arguments),this.rootElRef=ee(),this.cellElRefs=new k,this.handleScrollRequest=e=>{let{onScrollLeftRequest:t}=this.props,{coords:n}=this;if(t&&n){if(e.time){t(n.coordFromLeft(n.durationToCoord(e.time)))}return!0}return null}}render(){let{props:e,context:t}=this;return te("div",{className:"fc-timeline-slots",ref:this.rootElRef},te("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,te(De,{cellElRefs:this.cellElRefs,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange})))}componentDidMount(){this.updateSizing(),this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.updateSizing(),this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach(),this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{props:e,context:t}=this;if(null!==e.clientWidth&&this.scrollResponder){this.rootElRef.current.offsetWidth&&(this.coords=new pe(this.rootElRef.current,(n=this.cellElRefs.currentMap,e.tDateProfile.slotDates.map((e=>{let t=e.toISOString();return n[t]}))),e.dateProfile,e.tDateProfile,t.dateEnv,t.isRtl),e.onCoords&&e.onCoords(this.coords),this.scrollResponder.update(!1))}var n}positionToHit(e){let{outerCoordCache:t}=this.coords,{dateEnv:n,isRtl:i}=this.context,{tDateProfile:s}=this.props,o=t.leftToIndex(e);if(null!=o){let r=t.getWidth(o),l=i?(t.rights[o]-e)/r:(e-t.lefts[o])/r,a=Math.floor(l*s.snapsPerSlot),d=n.add(s.slotDates[o],z(s.snapDuration,a));return{dateSpan:{range:{start:d,end:n.add(d,s.snapDuration)},allDay:!this.props.tDateProfile.isTimeScale},dayEl:this.cellElRefs.currentMap[o],left:t.lefts[o],right:t.rights[o]}}return null}}function we(e,t,n){let i=[];if(n)for(let s of e){let e=n.rangeToCoords(s),o=Math.round(e.start),r=Math.round(e.end);r-o<t&&(r=o+t),i.push({start:o,end:r})}return i}class Ce extends D{render(){let{props:e}=this,t=[].concat(e.eventResizeSegs,e.dateSelectionSegs);return e.timelineCoords&&te("div",{className:"fc-timeline-bg"},this.renderSegs(e.businessHourSegs||[],e.timelineCoords,"non-business"),this.renderSegs(e.bgEventSegs||[],e.timelineCoords,"bg-event"),this.renderSegs(t,e.timelineCoords,"highlight"))}renderSegs(e,t,n){let{todayRange:i,nowDate:s}=this.props,{isRtl:o}=this.context,r=we(e,0,t),l=e.map(((e,t)=>{let l=be(r[t],o);return te("div",{key:O(e.eventRange),className:"fc-timeline-bg-harness",style:l},"bg-event"===n?te(H,Object.assign({seg:e},E(e,i,s))):N(n))}));return te(ne,null,l)}}class xe extends U{sliceRange(e,t,n,i,s){let o=function(e,t,n){if(!t.isTimeScale&&(e=q(e),t.largeUnit)){let i=e;((e={start:n.startOf(e.start,t.largeUnit),end:n.startOf(e.end,t.largeUnit)}).end.valueOf()!==i.end.valueOf()||e.end<=e.start)&&(e={start:e.start,end:n.add(e.end,t.slotDuration)})}return e}(e,i,s),r=[];if(ge(o.start,i,s)<ge(o.end,i,s)){let e=A(o,i.normalizedRange);e&&r.push({start:e.start,end:e.end,isStart:e.start.valueOf()===o.start.valueOf()&&re(e.start,i,t,n),isEnd:e.end.valueOf()===o.end.valueOf()&&re(G(e.end,-1),i,t,n)})}return r}}const ke=i({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});class Pe extends D{render(){let{props:e}=this;return te(j,Object.assign({},e,{elClasses:["fc-timeline-event","fc-h-event"],defaultTimeFormat:ke,defaultDisplayEventTime:!e.isTimeScale}))}}class Me extends D{render(){let{props:e,context:t}=this,{hiddenSegs:n,placement:i,resourceId:s}=e,{top:o,hcoords:r}=i,l=r&&null!==o,a=be(r,t.isRtl),d=s?{resourceId:s}:{};return te(B,{elRef:e.elRef,elClasses:["fc-timeline-more-link"],elStyle:Object.assign({visibility:l?"":"hidden",top:o||0},a),allDayDate:null,moreCnt:n.length,allSegs:n,hiddenSegs:n,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:d,popoverContent:()=>te(ne,null,n.map((t=>{let n=t.eventRange.instance.instanceId;return te("div",{key:n,style:{visibility:e.isForcedInvisible[n]?"hidden":""}},te(Pe,Object.assign({isTimeScale:e.isTimeScale,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:n===e.eventSelection},E(t,e.todayRange,e.nowDate))))})))},(e=>te(e,{elTag:"div",elClasses:["fc-timeline-more-link-inner","fc-sticky"]})))}}class Te extends D{constructor(){super(...arguments),this.slicer=new xe,this.sortEventSegs=r(x),this.harnessElRefs=new k,this.moreElRefs=new k,this.innerElRef=ee(),this.state={eventInstanceHeights:{},moreLinkHeights:{}},this.handleResize=e=>{e&&this.updateSize()}}render(){let{props:e,state:t,context:n}=this,{options:i}=n,{dateProfile:s,tDateProfile:o}=e,r=this.slicer.sliceProps(e,s,o.isTimeScale?null:e.nextDayThreshold,n,s,n.dateProfileGenerator,o,n.dateEnv),l=(r.eventDrag?r.eventDrag.segs:null)||(r.eventResize?r.eventResize.segs:null)||[],a=this.sortEventSegs(r.fgEventSegs,i.eventOrder),d=we(a,i.eventMinWidth,e.timelineCoords),[c,h]=function(e,t,n,i,s,o){let r=[],l=[];for(let i=0;i<e.length;i+=1){let s=e[i],o=n[s.eventRange.instance.instanceId],a=t[i];o&&a?r.push({index:i,span:a,thickness:o}):l.push({seg:s,hcoords:a,top:null})}let a=new $;null!=s&&(a.strictOrder=s),null!=o&&(a.maxStackCnt=o);let d=a.addSegs(r),c=d.map((t=>({seg:e[t.index],hcoords:t.span,top:null}))),h=L(d),f=[],u=[];const m=t=>e[t.index];for(let t=0;t<h.length;t+=1){let n=h[t],s=n.entries.map(m),o=i[M(T(s))];null!=o?f.push({index:e.length+t,thickness:o,span:n.span}):u.push({seg:s,hcoords:n.span,top:null})}a.maxStackCnt=-1,a.addSegs(f);let p=a.toRects(),g=[],v=0;for(let t of p){let n=t.index;g.push({seg:n<e.length?e[n]:h[n-e.length].entries.map(m),hcoords:t.span,top:t.levelCoord}),v=Math.max(v,t.levelCoord+t.thickness)}return[g.concat(l,c,u),v]}(a,d,t.eventInstanceHeights,t.moreLinkHeights,i.eventOrderStrict,i.eventMaxStack),f=(r.eventDrag?r.eventDrag.affectedInstances:null)||(r.eventResize?r.eventResize.affectedInstances:null)||{};return te(ne,null,te(Ce,{businessHourSegs:r.businessHourSegs,bgEventSegs:r.bgEventSegs,timelineCoords:e.timelineCoords,eventResizeSegs:r.eventResize?r.eventResize.segs:[],dateSelectionSegs:r.dateSelectionSegs,nowDate:e.nowDate,todayRange:e.todayRange}),te("div",{className:"fc-timeline-events fc-scrollgrid-sync-inner",ref:this.innerElRef,style:{height:h}},this.renderFgSegs(c,f,!1,!1,!1),this.renderFgSegs(function(e,t,n){if(!e.length||!t)return[];let i=function(e){let t={};for(let n of e){let{seg:e}=n;Array.isArray(e)||(t[e.eventRange.instance.instanceId]=n.top)}return t}(n);return e.map((e=>({seg:e,hcoords:t.rangeToCoords(e),top:i[e.eventRange.instance.instanceId]})))}(l,e.timelineCoords,c),{},Boolean(r.eventDrag),Boolean(r.eventResize),!1)))}componentDidMount(){this.updateSize(),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){e.eventStore===this.props.eventStore&&e.timelineCoords===this.props.timelineCoords&&t.moreLinkHeights===this.state.moreLinkHeights||this.updateSize()}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateSize(){let{props:e}=this,{timelineCoords:t}=e;const n=this.innerElRef.current;e.onHeightChange&&e.onHeightChange(n,!1),t&&this.setState({eventInstanceHeights:P(this.harnessElRefs.currentMap,(e=>Math.round(e.getBoundingClientRect().height))),moreLinkHeights:P(this.moreElRefs.currentMap,(e=>Math.round(e.getBoundingClientRect().height)))},(()=>{e.onHeightChange&&e.onHeightChange(n,!0)})),e.syncParentMinHeight&&(n.parentElement.style.minHeight=n.style.height)}renderFgSegs(e,t,n,i,s){let{harnessElRefs:o,moreElRefs:r,props:l,context:a}=this,d=n||i||s;return te(ne,null,e.map((e=>{let{seg:c,hcoords:h,top:f}=e;if(Array.isArray(c)){let n=M(T(c));return te(Me,{key:"m:"+n,elRef:r.createRef(n),hiddenSegs:c,placement:e,dateProfile:l.dateProfile,nowDate:l.nowDate,todayRange:l.todayRange,isTimeScale:l.tDateProfile.isTimeScale,eventSelection:l.eventSelection,resourceId:l.resourceId,isForcedInvisible:t})}let u=c.eventRange.instance.instanceId,m=d||Boolean(!t[u]&&h&&null!==f),p=be(h,a.isRtl);return te("div",{key:"e:"+u,ref:d?null:o.createRef(u),className:"fc-timeline-event-harness",style:Object.assign({visibility:m?"":"hidden",top:f||0},p)},te(Pe,Object.assign({isTimeScale:l.tDateProfile.isTimeScale,seg:c,isDragging:n,isResizing:i,isDateSelecting:s,isSelected:u===l.eventSelection},E(c,l.todayRange,l.nowDate))))})))}}Te.addStateEquality({eventInstanceHeights:s,moreLinkHeights:s});class Ee extends o{constructor(){super(...arguments),this.slatsRef=ee(),this.state={coords:null},this.handeEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)},this.handleCoords=e=>{this.setState({coords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t,context:n}=this,{options:i}=n,{dateProfile:s,tDateProfile:o}=e,r=c(o.slotDuration).unit;return te("div",{className:"fc-timeline-body",ref:this.handeEl,style:{minWidth:e.tableMinWidth,height:e.clientHeight,width:e.clientWidth}},te(w,{unit:r},((r,l)=>te(ne,null,te(ye,{ref:this.slatsRef,dateProfile:s,tDateProfile:o,nowDate:r,todayRange:l,clientWidth:e.clientWidth,tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,onCoords:this.handleCoords,onScrollLeftRequest:e.onScrollLeftRequest}),te(Te,{dateProfile:s,tDateProfile:e.tDateProfile,nowDate:r,todayRange:l,nextDayThreshold:i.nextDayThreshold,businessHours:e.businessHours,eventStore:e.eventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,timelineCoords:t.coords,syncParentMinHeight:!0}),i.nowIndicator&&t.coords&&t.coords.isDateInRange(r)&&te("div",{className:"fc-timeline-now-indicator-container"},te(y,{elClasses:["fc-timeline-now-indicator-line"],elStyle:ve(t.coords.dateToCoord(r),n.isRtl),isAxis:!1,date:r}))))))}queryHit(e,t,n,i){let s=this.slatsRef.current.positionToHit(e);return s?{dateProfile:this.props.dateProfile,dateSpan:s.dateSpan,rect:{left:s.left,right:s.right,top:0,bottom:i},dayEl:s.dayEl,layer:0}:null}}class Ie extends o{constructor(){super(...arguments),this.buildTimelineDateProfile=r(se),this.scrollGridRef=ee(),this.state={slatCoords:null,slotCushionMaxWidth:null},this.handleSlatCoords=e=>{this.setState({slatCoords:e})},this.handleScrollLeftRequest=e=>{this.scrollGridRef.current.forceScrollLeft(0,e)},this.handleMaxCushionWidth=e=>{this.setState({slotCushionMaxWidth:Math.ceil(e)})}}render(){let{props:t,state:n,context:i}=this,{options:s}=i,o=!t.forPrint&&l(s),r=!t.forPrint&&a(s),c=this.buildTimelineDateProfile(t.dateProfile,i.dateEnv,s,i.dateProfileGenerator),{slotMinWidth:h}=s,f=We(c,h||this.computeFallbackSlotMinWidth(c)),u=[{type:"header",key:"header",isSticky:o,chunks:[{key:"timeline",content:e=>te(Se,{dateProfile:t.dateProfile,clientWidth:e.clientWidth,clientHeight:e.clientHeight,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,tDateProfile:c,slatCoords:n.slatCoords,onMaxCushionWidth:h?null:this.handleMaxCushionWidth})}]},{type:"body",key:"body",liquid:!0,chunks:[{key:"timeline",content:e=>te(Ee,Object.assign({},t,{clientWidth:e.clientWidth,clientHeight:e.clientHeight,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,tDateProfile:c,onSlatCoords:this.handleSlatCoords,onScrollLeftRequest:this.handleScrollLeftRequest}))}]}];return r&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"timeline",content:I}]}),te(d,{elClasses:["fc-timeline",!1===s.eventOverlap?"fc-timeline-overlap-disabled":""],viewSpec:i.viewSpec},te(e,{ref:this.scrollGridRef,liquid:!t.isHeightAuto&&!t.forPrint,forPrint:t.forPrint,collapsibleWidth:!1,colGroups:[{cols:f}],sections:u}))}computeFallbackSlotMinWidth(e){return Math.max(30,(this.state.slotCushionMaxWidth||0)/e.slotsPerLabel)}}function We(e,t){return[{span:e.slotCnt,minWidth:t||1}]}export{pe as TimelineCoords,Se as TimelineHeader,me as TimelineHeaderRows,Te as TimelineLane,Ce as TimelineLaneBg,xe as TimelineLaneSlicer,ye as TimelineSlats,Ie as TimelineView,We as buildSlatCols,se as buildTimelineDateProfile,ve as coordToCss,be as coordsToCss};
|
1
|
+
import{ScrollGrid as e}from"../scrollgrid/internal.js";import{ct as t,bG as n,x as i,c as s,bl as o,d as r,br as l,bq as a,t as d,q as c,bp as h,bo as f,y as u,al as m,B as p,ch as g,a6 as v,aK as b,E as S,bc as R,z as D,ca as y,c9 as w,cq as C,ak as x,cd as k,bm as P,cm as M,bQ as T,cl as E,bR as I,bU as W,o as z,be as L,bP as H,a as N,bu as O,cp as U,c8 as A,aw as G,A as j,aY as B,aZ as q,aX as F,C as _,a_ as Z,b8 as X,aL as Y,G as K,by as Q,bC as J,cg as V,co as $}from"../core/internal-common.js";import{createRef as ee,createElement as te,Fragment as ne}from"../../preact/dist/preact.mjs.js";t('.fc .fc-timeline-body{min-height:100%;position:relative;z-index:1}.fc .fc-timeline-slots{bottom:0;position:absolute;top:0;z-index:1}.fc .fc-timeline-slots>table{height:100%}.fc .fc-timeline-slot-minor{border-style:dotted}.fc .fc-timeline-slot-frame{align-items:center;display:flex;justify-content:center}.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame{justify-content:flex-start}.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame{overflow:hidden}.fc .fc-timeline-slot-cushion{padding:4px 5px;white-space:nowrap}.fc-direction-ltr .fc-timeline-slot{border-right:0!important}.fc-direction-rtl .fc-timeline-slot{border-left:0!important}.fc .fc-timeline-now-indicator-container{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:4}.fc .fc-timeline-now-indicator-arrow,.fc .fc-timeline-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;pointer-events:none;position:absolute;top:0}.fc .fc-timeline-now-indicator-arrow{border-left-color:transparent;border-right-color:transparent;border-width:6px 5px 0;margin:0 -6px}.fc .fc-timeline-now-indicator-line{border-width:0 0 0 1px;bottom:0;margin:0 -1px}.fc .fc-timeline-events{position:relative;width:0;z-index:3}.fc .fc-timeline-event-harness,.fc .fc-timeline-more-link{position:absolute;top:0}.fc-timeline-event{z-index:1}.fc-timeline-event.fc-event-mirror{z-index:2}.fc-timeline-event{align-items:center;border-radius:0;display:flex;font-size:var(--fc-small-font-size);margin-bottom:1px;padding:2px 1px;position:relative}.fc-timeline-event .fc-event-main{flex-grow:1;flex-shrink:1;min-width:0}.fc-timeline-event .fc-event-time{font-weight:700}.fc-timeline-event .fc-event-time,.fc-timeline-event .fc-event-title{padding:0 2px;white-space:nowrap}.fc-direction-ltr .fc-timeline-event.fc-event-end,.fc-direction-ltr .fc-timeline-more-link{margin-right:1px}.fc-direction-rtl .fc-timeline-event.fc-event-end,.fc-direction-rtl .fc-timeline-more-link{margin-left:1px}.fc-timeline-overlap-disabled .fc-timeline-event{margin-bottom:0;padding-bottom:5px;padding-top:5px}.fc-timeline-event:not(.fc-event-end):after,.fc-timeline-event:not(.fc-event-start):before{border-color:transparent #000;border-style:solid;border-width:5px;content:"";flex-grow:0;flex-shrink:0;height:0;margin:0 1px;opacity:.5;width:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after{border-left:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before{border-right:0}.fc-timeline-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;font-size:var(--fc-small-font-size);padding:1px}.fc-timeline-more-link-inner{display:inline-block;left:0;padding:2px;right:0}.fc .fc-timeline-bg{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:2}.fc .fc-timeline-bg .fc-non-business{z-index:1}.fc .fc-timeline-bg .fc-bg-event{z-index:2}.fc .fc-timeline-bg .fc-highlight{z-index:3}.fc .fc-timeline-bg-harness{bottom:0;position:absolute;top:0}');n.MAX_TIMELINE_SLOTS=1e3;const ie=[{years:1},{months:1},{days:1},{hours:1},{minutes:30},{minutes:15},{minutes:10},{minutes:5},{minutes:1},{seconds:30},{seconds:15},{seconds:10},{seconds:5},{seconds:1},{milliseconds:500},{milliseconds:100},{milliseconds:10},{milliseconds:1}];function se(e,t,c,u){let p={labelInterval:c.slotLabelInterval,slotDuration:c.slotDuration};!function(e,t,i){const{currentRange:s}=t;if(e.labelInterval){i.countDurationsBetween(s.start,s.end,e.labelInterval)>n.MAX_TIMELINE_SLOTS&&(console.warn("slotLabelInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){i.countDurationsBetween(s.start,s.end,e.slotDuration)>n.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){const t=l(e.labelInterval,e.slotDuration);(null===t||t<1)&&(console.warn("slotLabelInterval must be a multiple of slotDuration"),e.slotDuration=null)}}(p,e,t),le(p,e,t),function(e,t,n){const{currentRange:i}=t;let{slotDuration:s}=e;if(!s){const o=le(e,t,n);for(let e of ie){const t=r(e),n=l(o,t);if(null!==n&&n>1&&n<=6){s=t;break}}if(s){n.countDurationsBetween(i.start,i.end,s)>200&&(s=null)}s||(s=o),e.slotDuration=s}}(p,e,t);let g=c.slotLabelFormat,v=Array.isArray(g)?g:null!=g?[g]:function(e,t,n,i){let o,r;const{labelInterval:l}=e;let a=s(l).unit;const d=i.weekNumbers;let c=o=r=null;"week"!==a||d||(a="day");switch(a){case"year":c={year:"numeric"};break;case"month":ae("years",t,n)>1&&(c={year:"numeric"}),o={month:"short"};break;case"week":ae("years",t,n)>1&&(c={year:"numeric"}),o={week:"narrow"};break;case"day":ae("years",t,n)>1?c={year:"numeric",month:"long"}:ae("months",t,n)>1&&(c={month:"long"}),d&&(o={week:"short"}),r={weekday:"narrow",day:"numeric"};break;case"hour":d&&(c={week:"short"}),ae("days",t,n)>1&&(o={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),r={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":f(l)/60>=6?(c={hour:"numeric",meridiem:"short"},o=e=>":"+x(e.date.minute,2)):c={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":h(l)/60>=6?(c={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},o=e=>":"+x(e.date.second,2)):c={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"};break;case"millisecond":c={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"},o=e=>"."+x(e.millisecond,3)}return[].concat(c||[],o||[],r||[])}(p,e,t,c);p.headerFormats=v.map((e=>i(e))),p.isTimeScale=Boolean(p.slotDuration.milliseconds);let b=null;if(!p.isTimeScale){const e=s(p.slotDuration).unit;/year|month|week/.test(e)&&(b=e)}p.largeUnit=b,p.emphasizeWeeks=1===o(p.slotDuration)&&ae("weeks",e,t)>=2&&!c.businessHours;let S,R,D=c.snapDuration;D&&(S=r(D),R=l(p.slotDuration,S)),null==R&&(S=p.slotDuration,R=1),p.snapDuration=S,p.snapsPerSlot=R;let y=a(e.slotMaxTime)-a(e.slotMinTime),w=oe(e.renderRange.start,p,t),C=oe(e.renderRange.end,p,t);p.isTimeScale&&(w=t.add(w,e.slotMinTime),C=t.add(d(C,-1),e.slotMaxTime)),p.timeWindowMs=y,p.normalizedRange={start:w,end:C};let k=[],P=w;for(;P<C;)re(P,p,e,u)&&k.push(P),P=t.add(P,p.slotDuration);p.slotDates=k;let M=-1,T=0;const E=[],I=[];for(P=w;P<C;)re(P,p,e,u)?(M+=1,E.push(M),I.push(T)):E.push(M+.5),P=t.add(P,p.snapDuration),T+=1;return p.snapDiffToIndex=E,p.snapIndexToDiff=I,p.snapCnt=M+1,p.slotCnt=p.snapCnt/p.snapsPerSlot,p.isWeekStarts=function(e,t){let{slotDates:n,emphasizeWeeks:i}=e,s=null,o=[];for(let e of n){let n=t.computeWeekNumber(e),r=i&&null!==s&&s!==n;s=n,o.push(r)}return o}(p,t),p.cellRows=function(e,t){let n=e.slotDates,i=e.headerFormats,s=i.map((()=>[])),r=o(e.slotDuration),l=7===r?"week":1===r?"day":null,a=i.map((e=>e.getSmallestUnit?e.getSmallestUnit():null));for(let o=0;o<n.length;o+=1){let r=n[o],d=e.isWeekStarts[o];for(let n=0;n<i.length;n+=1){let o=i[n],c=s[n],h=c[c.length-1],f=n===i.length-1,u=i.length>1&&!f,p=null,g=a[n]||(f?l:null);if(u){let e=t.format(r,o);h&&h.text===e?h.colspan+=1:p=de(r,e,g)}else if(!h||m(t.countDurationsBetween(e.normalizedRange.start,r,e.labelInterval))){p=de(r,t.format(r,o),g)}else h.colspan+=1;p&&(p.weekStart=d,c.push(p))}}return s}(p,t),p.slotsPerLabel=l(p.labelInterval,p.slotDuration),p}function oe(e,t,n){let i=e;return t.isTimeScale||(i=c(i),t.largeUnit&&(i=n.startOf(i,t.largeUnit))),i}function re(e,t,n,i){if(i.isHiddenDay(e))return!1;if(t.isTimeScale){let i=c(e),s=e.valueOf()-i.valueOf()-a(n.slotMinTime);return s=(s%864e5+864e5)%864e5,s<t.timeWindowMs}return!0}function le(e,t,n){const{currentRange:i}=t;let{labelInterval:s}=e;if(!s){let t;if(e.slotDuration){for(t of ie){const n=r(t),i=l(n,e.slotDuration);if(null!==i&&i<=6){s=n;break}}s||(s=e.slotDuration)}else for(t of ie){s=r(t);if(n.countDurationsBetween(i.start,i.end,s)>=18)break}e.labelInterval=s}return s}function ae(e,t,n){let i=t.currentRange,s=null;return"years"===e?s=n.diffWholeYears(i.start,i.end):"months"===e||"weeks"===e?s=n.diffWholeMonths(i.start,i.end):"days"===e&&(s=u(i.start,i.end)),s||0}function de(e,t,n){return{date:e,text:t,rowUnit:n,colspan:1,isWeekStart:!1}}class ce extends p{constructor(){super(...arguments),this.refineRenderProps=j(ue),this.buildCellNavLinkAttrs=D(he)}render(){let{props:e,context:t}=this,{dateEnv:n,options:i}=t,{cell:s,dateProfile:o,tDateProfile:r}=e,l=B(s.date,e.todayRange,e.nowDate,o),a=this.refineRenderProps({level:e.rowLevel,dateMarker:s.date,text:s.text,dateEnv:t.dateEnv,viewApi:t.viewApi});return te(_,{elTag:"th",elClasses:["fc-timeline-slot","fc-timeline-slot-label",s.isWeekStart&&"fc-timeline-slot-em",..."time"===s.rowUnit?q(l,t.theme):F(l,t.theme)],elAttrs:{colSpan:s.colspan,"data-date":n.formatIso(s.date,{omitTime:!r.isTimeScale,omitTimeZoneOffset:!0})},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:fe,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(n=>te("div",{className:"fc-timeline-slot-frame",style:{height:e.rowInnerHeight}},te(n,{elTag:"a",elClasses:["fc-timeline-slot-cushion","fc-scrollgrid-sync-inner",e.isSticky&&"fc-sticky"],elAttrs:this.buildCellNavLinkAttrs(t,s.date,s.rowUnit)}))))}}function he(e,t,n){return n&&"time"!==n?Z(e,t,n):{}}function fe(e){return e.text}function ue(e){return{level:e.level,date:e.dateEnv.toDate(e.dateMarker),view:e.viewApi,text:e.text}}class me extends p{render(){let{dateProfile:e,tDateProfile:t,rowInnerHeights:n,todayRange:i,nowDate:s}=this.props,{cellRows:o}=t;return te(ne,null,o.map(((r,l)=>{let a=l===o.length-1,d=t.isTimeScale&&a;return te("tr",{key:l,className:["fc-timeline-header-row",d?"fc-timeline-header-row-chrono":""].join(" ")},r.map((o=>te(ce,{key:o.date.toISOString(),cell:o,rowLevel:l,dateProfile:e,tDateProfile:t,todayRange:i,nowDate:s,rowInnerHeight:n&&n[l],isSticky:!a}))))})))}}class pe{constructor(e,t,n,i,s,o){this.slatRootEl=e,this.dateProfile=n,this.tDateProfile=i,this.dateEnv=s,this.isRtl=o,this.outerCoordCache=new X(e,t,!0,!1),this.innerCoordCache=new X(e,Y(t,"div"),!0,!1)}isDateInRange(e){return K(this.dateProfile.currentRange,e)}dateToCoord(e){let{tDateProfile:t}=this,n=this.computeDateSnapCoverage(e)/t.snapsPerSlot,i=Math.floor(n);i=Math.min(i,t.slotCnt-1);let s=n-i,{innerCoordCache:o,outerCoordCache:r}=this;return this.isRtl?r.originClientRect.width-(r.rights[i]-o.getWidth(i)*s):r.lefts[i]+o.getWidth(i)*s}rangeToCoords(e){return{start:this.dateToCoord(e.start),end:this.dateToCoord(e.end)}}durationToCoord(e){let{dateProfile:t,tDateProfile:n,dateEnv:i,isRtl:s}=this,o=0;if(t){let r=i.add(t.activeRange.start,e);n.isTimeScale||(r=c(r)),o=this.dateToCoord(r),!s&&o&&(o+=1)}return o}coordFromLeft(e){return this.isRtl?this.outerCoordCache.originClientRect.width-e:e}computeDateSnapCoverage(e){return ge(e,this.tDateProfile,this.dateEnv)}}function ge(e,t,n){let i=n.countDurationsBetween(t.normalizedRange.start,e,t.snapDuration);if(i<0)return 0;if(i>=t.snapDiffToIndex.length)return t.snapCnt;let s=Math.floor(i),o=t.snapDiffToIndex[s];return m(o)?o+=i-s:o=Math.ceil(o),o}function ve(e,t){return null===e?{left:"",right:""}:t?{right:e,left:""}:{left:e,right:""}}function be(e,t){return e?t?{right:e.start,left:-e.end}:{left:e.start,right:-e.end}:{left:"",right:""}}class Se extends p{constructor(){super(...arguments),this.rootElRef=ee()}render(){let{props:e,context:t}=this,n=s(e.tDateProfile.slotDuration).unit,i=e.slatCoords&&e.slatCoords.dateProfile===e.dateProfile?e.slatCoords:null;return te(v,{unit:n},((n,s)=>te("div",{className:"fc-timeline-header",ref:this.rootElRef},te("table",{"aria-hidden":!0,className:"fc-scrollgrid-sync-table",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,te("tbody",null,te(me,{dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:n,todayRange:s,rowInnerHeights:e.rowInnerHeights}))),t.options.nowIndicator&&te("div",{className:"fc-timeline-now-indicator-container"},i&&i.isDateInRange(n)&&te(g,{elClasses:["fc-timeline-now-indicator-arrow"],elStyle:ve(i.dateToCoord(n),t.isRtl),isAxis:!0,date:n})))))}componentDidMount(){this.updateSize()}componentDidUpdate(){this.updateSize()}updateSize(){this.props.onMaxCushionWidth&&this.props.onMaxCushionWidth(this.computeMaxCushionWidth())}computeMaxCushionWidth(){return Math.max(...b(this.rootElRef.current,".fc-timeline-header-row:last-child .fc-timeline-slot-cushion").map((e=>e.getBoundingClientRect().width)))}}class Re extends p{render(){let{props:e,context:t}=this,{dateEnv:n,options:i,theme:s}=t,{date:o,tDateProfile:r,isEm:l}=e,a=B(e.date,e.todayRange,e.nowDate,e.dateProfile),d=Object.assign(Object.assign({date:n.toDate(e.date)},a),{view:t.viewApi});return te(_,{elTag:"td",elRef:e.elRef,elClasses:["fc-timeline-slot","fc-timeline-slot-lane",l&&"fc-timeline-slot-em",r.isTimeScale?m(n.countDurationsBetween(r.normalizedRange.start,e.date,r.labelInterval))?"fc-timeline-slot-major":"fc-timeline-slot-minor":"",...e.isDay?F(a,s):q(a,s)],elAttrs:{"data-date":n.formatIso(o,{omitTimeZoneOffset:!0,omitTime:!r.isTimeScale})},renderProps:d,generatorName:"slotLaneContent",customGenerator:i.slotLaneContent,classNameGenerator:i.slotLaneClassNames,didMount:i.slotLaneDidMount,willUnmount:i.slotLaneWillUnmount},(e=>te(e,{elTag:"div"})))}}class De extends p{render(){let{props:e}=this,{tDateProfile:t,cellElRefs:n}=e,{slotDates:i,isWeekStarts:s}=t,o=!t.isTimeScale&&!t.largeUnit;return te("tbody",null,te("tr",null,i.map(((i,r)=>{let l=i.toISOString();return te(Re,{key:l,elRef:n.createRef(l),date:i,dateProfile:e.dateProfile,tDateProfile:t,nowDate:e.nowDate,todayRange:e.todayRange,isEm:s[r],isDay:o})}))))}}class ye extends p{constructor(){super(...arguments),this.rootElRef=ee(),this.cellElRefs=new k,this.handleScrollRequest=e=>{let{onScrollLeftRequest:t}=this.props,{coords:n}=this;if(t&&n){if(e.time){t(n.coordFromLeft(n.durationToCoord(e.time)))}return!0}return null}}render(){let{props:e,context:t}=this;return te("div",{className:"fc-timeline-slots",ref:this.rootElRef},te("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,te(De,{cellElRefs:this.cellElRefs,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange})))}componentDidMount(){this.updateSizing(),this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.updateSizing(),this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach(),this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{props:e,context:t}=this;if(null!==e.clientWidth&&this.scrollResponder){this.rootElRef.current.offsetWidth&&(this.coords=new pe(this.rootElRef.current,(n=this.cellElRefs.currentMap,e.tDateProfile.slotDates.map((e=>{let t=e.toISOString();return n[t]}))),e.dateProfile,e.tDateProfile,t.dateEnv,t.isRtl),e.onCoords&&e.onCoords(this.coords),this.scrollResponder.update(!1))}var n}positionToHit(e){let{outerCoordCache:t}=this.coords,{dateEnv:n,isRtl:i}=this.context,{tDateProfile:s}=this.props,o=t.leftToIndex(e);if(null!=o){let r=t.getWidth(o),l=i?(t.rights[o]-e)/r:(e-t.lefts[o])/r,a=Math.floor(l*s.snapsPerSlot),d=n.add(s.slotDates[o],P(s.snapDuration,a));return{dateSpan:{range:{start:d,end:n.add(d,s.snapDuration)},allDay:!this.props.tDateProfile.isTimeScale},dayEl:this.cellElRefs.currentMap[o],left:t.lefts[o],right:t.rights[o]}}return null}}function we(e,t,n){let i=[];if(n)for(let s of e){let e=n.rangeToCoords(s),o=Math.round(e.start),r=Math.round(e.end);r-o<t&&(r=o+t),i.push({start:o,end:r})}return i}class Ce extends p{render(){let{props:e}=this,t=[].concat(e.eventResizeSegs,e.dateSelectionSegs);return e.timelineCoords&&te("div",{className:"fc-timeline-bg"},this.renderSegs(e.businessHourSegs||[],e.timelineCoords,"non-business"),this.renderSegs(e.bgEventSegs||[],e.timelineCoords,"bg-event"),this.renderSegs(t,e.timelineCoords,"highlight"))}renderSegs(e,t,n){let{todayRange:i,nowDate:s}=this.props,{isRtl:o}=this.context,r=we(e,0,t),l=e.map(((e,t)=>{let l=be(r[t],o);return te("div",{key:I(e.eventRange),className:"fc-timeline-bg-harness",style:l},"bg-event"===n?te(M,Object.assign({seg:e},T(e,i,s))):E(n))}));return te(ne,null,l)}}class xe extends W{sliceRange(e,t,n,i,s){let o=function(e,t,n){if(!t.isTimeScale&&(e=G(e),t.largeUnit)){let i=e;((e={start:n.startOf(e.start,t.largeUnit),end:n.startOf(e.end,t.largeUnit)}).end.valueOf()!==i.end.valueOf()||e.end<=e.start)&&(e={start:e.start,end:n.add(e.end,t.slotDuration)})}return e}(e,i,s),r=[];if(ge(o.start,i,s)<ge(o.end,i,s)){let e=z(o,i.normalizedRange);e&&r.push({start:e.start,end:e.end,isStart:e.start.valueOf()===o.start.valueOf()&&re(e.start,i,t,n),isEnd:e.end.valueOf()===o.end.valueOf()&&re(L(e.end,-1),i,t,n)})}return r}}const ke=i({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});class Pe extends p{render(){let{props:e}=this;return te(V,Object.assign({},e,{elClasses:["fc-timeline-event","fc-h-event"],defaultTimeFormat:ke,defaultDisplayEventTime:!e.isTimeScale}))}}class Me extends p{render(){let{props:e,context:t}=this,{hiddenSegs:n,placement:i,resourceId:s}=e,{top:o,hcoords:r}=i,l=r&&null!==o,a=be(r,t.isRtl),d=s?{resourceId:s}:{};return te($,{elRef:e.elRef,elClasses:["fc-timeline-more-link"],elStyle:Object.assign({visibility:l?"":"hidden",top:o||0},a),allDayDate:null,moreCnt:n.length,allSegs:n,hiddenSegs:n,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:d,popoverContent:()=>te(ne,null,n.map((t=>{let n=t.eventRange.instance.instanceId;return te("div",{key:n,style:{visibility:e.isForcedInvisible[n]?"hidden":""}},te(Pe,Object.assign({isTimeScale:e.isTimeScale,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:n===e.eventSelection},T(t,e.todayRange,e.nowDate))))})))},(e=>te(e,{elTag:"div",elClasses:["fc-timeline-more-link-inner","fc-sticky"]})))}}class Te extends p{constructor(){super(...arguments),this.slicer=new xe,this.sortEventSegs=D(H),this.harnessElRefs=new k,this.moreElRefs=new k,this.innerElRef=ee(),this.state={eventInstanceHeights:{},moreLinkHeights:{}},this.handleResize=e=>{e&&this.updateSize()}}render(){let{props:e,state:t,context:n}=this,{options:i}=n,{dateProfile:s,tDateProfile:o}=e,r=this.slicer.sliceProps(e,s,o.isTimeScale?null:e.nextDayThreshold,n,s,n.dateProfileGenerator,o,n.dateEnv),l=(r.eventDrag?r.eventDrag.segs:null)||(r.eventResize?r.eventResize.segs:null)||[],a=this.sortEventSegs(r.fgEventSegs,i.eventOrder),d=we(a,i.eventMinWidth,e.timelineCoords),[c,h]=function(e,t,n,i,s,o){let r=[],l=[];for(let i=0;i<e.length;i+=1){let s=e[i],o=n[s.eventRange.instance.instanceId],a=t[i];o&&a?r.push({index:i,span:a,thickness:o}):l.push({seg:s,hcoords:a,top:null})}let a=new Q;null!=s&&(a.strictOrder=s),null!=o&&(a.maxStackCnt=o);let d=a.addSegs(r),c=d.map((t=>({seg:e[t.index],hcoords:t.span,top:null}))),h=J(d),f=[],u=[];const m=t=>e[t.index];for(let t=0;t<h.length;t+=1){let n=h[t],s=n.entries.map(m),o=i[O(U(s))];null!=o?f.push({index:e.length+t,thickness:o,span:n.span}):u.push({seg:s,hcoords:n.span,top:null})}a.maxStackCnt=-1,a.addSegs(f);let p=a.toRects(),g=[],v=0;for(let t of p){let n=t.index;g.push({seg:n<e.length?e[n]:h[n-e.length].entries.map(m),hcoords:t.span,top:t.levelCoord}),v=Math.max(v,t.levelCoord+t.thickness)}return[g.concat(l,c,u),v]}(a,d,t.eventInstanceHeights,t.moreLinkHeights,i.eventOrderStrict,i.eventMaxStack),f=(r.eventDrag?r.eventDrag.affectedInstances:null)||(r.eventResize?r.eventResize.affectedInstances:null)||{};return te(ne,null,te(Ce,{businessHourSegs:r.businessHourSegs,bgEventSegs:r.bgEventSegs,timelineCoords:e.timelineCoords,eventResizeSegs:r.eventResize?r.eventResize.segs:[],dateSelectionSegs:r.dateSelectionSegs,nowDate:e.nowDate,todayRange:e.todayRange}),te("div",{className:"fc-timeline-events fc-scrollgrid-sync-inner",ref:this.innerElRef,style:{height:h}},this.renderFgSegs(c,f,!1,!1,!1),this.renderFgSegs(function(e,t,n){if(!e.length||!t)return[];let i=function(e){let t={};for(let n of e){let{seg:e}=n;Array.isArray(e)||(t[e.eventRange.instance.instanceId]=n.top)}return t}(n);return e.map((e=>({seg:e,hcoords:t.rangeToCoords(e),top:i[e.eventRange.instance.instanceId]})))}(l,e.timelineCoords,c),{},Boolean(r.eventDrag),Boolean(r.eventResize),!1)))}componentDidMount(){this.updateSize(),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){e.eventStore===this.props.eventStore&&e.timelineCoords===this.props.timelineCoords&&t.moreLinkHeights===this.state.moreLinkHeights||this.updateSize()}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateSize(){let{props:e}=this,{timelineCoords:t}=e;const n=this.innerElRef.current;e.onHeightChange&&e.onHeightChange(n,!1),t&&this.setState({eventInstanceHeights:N(this.harnessElRefs.currentMap,(e=>Math.round(e.getBoundingClientRect().height))),moreLinkHeights:N(this.moreElRefs.currentMap,(e=>Math.round(e.getBoundingClientRect().height)))},(()=>{e.onHeightChange&&e.onHeightChange(n,!0)})),e.syncParentMinHeight&&(n.parentElement.style.minHeight=n.style.height)}renderFgSegs(e,t,n,i,s){let{harnessElRefs:o,moreElRefs:r,props:l,context:a}=this,d=n||i||s;return te(ne,null,e.map((e=>{let{seg:c,hcoords:h,top:f}=e;if(Array.isArray(c)){let n=O(U(c));return te(Me,{key:"m:"+n,elRef:r.createRef(n),hiddenSegs:c,placement:e,dateProfile:l.dateProfile,nowDate:l.nowDate,todayRange:l.todayRange,isTimeScale:l.tDateProfile.isTimeScale,eventSelection:l.eventSelection,resourceId:l.resourceId,isForcedInvisible:t})}let u=c.eventRange.instance.instanceId,m=d||Boolean(!t[u]&&h&&null!==f),p=be(h,a.isRtl);return te("div",{key:"e:"+u,ref:d?null:o.createRef(u),className:"fc-timeline-event-harness",style:Object.assign({visibility:m?"":"hidden",top:f||0},p)},te(Pe,Object.assign({isTimeScale:l.tDateProfile.isTimeScale,seg:c,isDragging:n,isResizing:i,isDateSelecting:s,isSelected:u===l.eventSelection},T(c,l.todayRange,l.nowDate))))})))}}Te.addStateEquality({eventInstanceHeights:S,moreLinkHeights:S});class Ee extends R{constructor(){super(...arguments),this.slatsRef=ee(),this.state={coords:null},this.handeEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)},this.handleCoords=e=>{this.setState({coords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t,context:n}=this,{options:i}=n,{dateProfile:o,tDateProfile:r}=e,l=s(r.slotDuration).unit;return te("div",{className:"fc-timeline-body",ref:this.handeEl,style:{minWidth:e.tableMinWidth,height:e.clientHeight,width:e.clientWidth}},te(v,{unit:l},((s,l)=>te(ne,null,te(ye,{ref:this.slatsRef,dateProfile:o,tDateProfile:r,nowDate:s,todayRange:l,clientWidth:e.clientWidth,tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,onCoords:this.handleCoords,onScrollLeftRequest:e.onScrollLeftRequest}),te(Te,{dateProfile:o,tDateProfile:e.tDateProfile,nowDate:s,todayRange:l,nextDayThreshold:i.nextDayThreshold,businessHours:e.businessHours,eventStore:e.eventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,timelineCoords:t.coords,syncParentMinHeight:!0}),i.nowIndicator&&t.coords&&t.coords.isDateInRange(s)&&te("div",{className:"fc-timeline-now-indicator-container"},te(g,{elClasses:["fc-timeline-now-indicator-line"],elStyle:ve(t.coords.dateToCoord(s),n.isRtl),isAxis:!1,date:s}))))))}queryHit(e,t,n,i){let s=this.slatsRef.current.positionToHit(e);return s?{dateProfile:this.props.dateProfile,dateSpan:s.dateSpan,rect:{left:s.left,right:s.right,top:0,bottom:i},dayEl:s.dayEl,layer:0}:null}}class Ie extends R{constructor(){super(...arguments),this.buildTimelineDateProfile=D(se),this.scrollGridRef=ee(),this.state={slatCoords:null,slotCushionMaxWidth:null},this.handleSlatCoords=e=>{this.setState({slatCoords:e})},this.handleScrollLeftRequest=e=>{this.scrollGridRef.current.forceScrollLeft(0,e)},this.handleMaxCushionWidth=e=>{this.setState({slotCushionMaxWidth:Math.ceil(e)})}}render(){let{props:t,state:n,context:i}=this,{options:s}=i,o=!t.forPrint&&y(s),r=!t.forPrint&&w(s),l=this.buildTimelineDateProfile(t.dateProfile,i.dateEnv,s,i.dateProfileGenerator),{slotMinWidth:a}=s,d=We(l,a||this.computeFallbackSlotMinWidth(l)),c=[{type:"header",key:"header",isSticky:o,chunks:[{key:"timeline",content:e=>te(Se,{dateProfile:t.dateProfile,clientWidth:e.clientWidth,clientHeight:e.clientHeight,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,tDateProfile:l,slatCoords:n.slatCoords,onMaxCushionWidth:a?null:this.handleMaxCushionWidth})}]},{type:"body",key:"body",liquid:!0,chunks:[{key:"timeline",content:e=>te(Ee,Object.assign({},t,{clientWidth:e.clientWidth,clientHeight:e.clientHeight,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,tDateProfile:l,onSlatCoords:this.handleSlatCoords,onScrollLeftRequest:this.handleScrollLeftRequest}))}]}];return r&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"timeline",content:A}]}),te(C,{elClasses:["fc-timeline",!1===s.eventOverlap?"fc-timeline-overlap-disabled":""],viewSpec:i.viewSpec},te(e,{ref:this.scrollGridRef,liquid:!t.isHeightAuto&&!t.forPrint,forPrint:t.forPrint,collapsibleWidth:!1,colGroups:[{cols:d}],sections:c}))}computeFallbackSlotMinWidth(e){return Math.max(30,(this.state.slotCushionMaxWidth||0)/e.slotsPerLabel)}}function We(e,t){return[{span:e.slotCnt,minWidth:t||1}]}export{pe as TimelineCoords,Se as TimelineHeader,me as TimelineHeaderRows,Te as TimelineLane,Ce as TimelineLaneBg,xe as TimelineLaneSlicer,ye as TimelineSlats,Ie as TimelineView,We as buildSlatCols,se as buildTimelineDateProfile,ve as coordToCss,be as coordsToCss};
|
2
2
|
//# sourceMappingURL=internal.js.map
|