@nocobase/plugin-calendar 0.21.0-alpha.1 → 0.21.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client/index.js
CHANGED
|
@@ -91,4 +91,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
91
91
|
border-bottom-left-radius: 0;
|
|
92
92
|
border-bottom-right-radius: 0;
|
|
93
93
|
}
|
|
94
|
-
`;yf.displayName="GlobalStyle";const WD=x.genStyleHook("nb-calendar",e=>{const{componentCls:t}=e;return{[t]:{".rbc-btn":{color:"inherit",font:"inherit",margin:"0"},"button.rbc-btn":{overflow:"visible",textTransform:"none",WebkitAppearance:"button",cursor:"pointer"},"button[disabled].rbc-btn":{cursor:"not-allowed"},"button.rbc-input::-moz-focus-inner":{border:"0",padding:"0"},".rbc-button-link":{border:"none",backgroundColor:"transparent"},".rbc-calendar":{boxSizing:"border-box",display:"flex",flexDirection:"column",alignItems:"stretch",height:"100%"},".rbc-calendar *,\n.rbc-calendar *:before,\n.rbc-calendar *:after":{boxSizing:"inherit"},".rbc-abs-full,\n.rbc-row-bg":{overflow:"hidden",position:"absolute",top:"0",left:"0",right:"0",bottom:"0"},".rbc-ellipsis,\n.rbc-event-label,\n.rbc-row-segment .rbc-event-content,\n.rbc-show-more":{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},".rbc-rtl":{direction:"rtl"},".rbc-off-range":{color:e.colorTextDisabled},".rbc-header":{overflow:"hidden",flex:"1 0 0%",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:`${e.paddingXXS}px ${e.paddingSM}px`,verticalAlign:"middle",minHeight:e.sizeXL,color:e.colorText,margin:`0 ${e.marginXXS}px`,borderBottom:`2px solid ${e.colorBorderSecondary}`},".rbc-rtl .rbc-header + .rbc-header":{borderLeftWidth:"0",borderRight:`1px solid ${e.colorBorderSecondary}`},".rbc-header > a,\n.rbc-header > a:active,\n.rbc-header > a:visited":{color:"inherit",textDecoration:"none"},".rbc-row-content":{position:"relative",userSelect:"none",WebkitUserSelect:"none",zIndex:4},".rbc-row-content-scrollable":{display:"flex",flexDirection:"column",height:"100%"},".rbc-row-content-scrollable .rbc-row-content-scroll-container":{height:"100%",overflowY:"scroll",msOverflowStyle:"none",scrollbarWidth:"none"},".rbc-row-content-scrollable .rbc-row-content-scroll-container::-webkit-scrollbar":{display:"none"},".rbc-toolbar":{display:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",marginBottom:e.marginXS,fontSize:e.fontSize},".rbc-toolbar .rbc-toolbar-label":{flexGrow:1,padding:`0 ${e.paddingXS}px`,textAlign:"center"},".rbc-toolbar button":{outline:"none",fontSize:e.fontSize,lineHeight:[e.lineHeight,"normal"],height:e.controlHeight,color:e.colorTextLabel,display:"inline-block",margin:"0",position:"relative",zIndex:1,textAlign:"center",verticalAlign:"middle",background:"none",backgroundImage:"none",border:`1px solid ${e.colorBorder}`,padding:`${e.paddingXXS}px ${e.paddingSM+e.paddingXXS}px`,borderRadius:e.borderRadiusXS,whiteSpace:"nowrap"},".rbc-toolbar button:active,\n.rbc-toolbar button.rbc-active":{zIndex:2,color:"#1890ff",borderColor:"#1890ff"},".rbc-toolbar button:active:hover,\n.rbc-toolbar button:active:focus,\n.rbc-toolbar button.rbc-active:hover,\n.rbc-toolbar button.rbc-active:focus":{zIndex:2,color:"#40a9ff",borderColor:"#40a9ff"},".rbc-toolbar button:hover":{zIndex:2,color:"#40a9ff",borderColor:"#40a9ff"},".rbc-btn-group":{display:"inline-block",whiteSpace:"nowrap"},".rbc-btn-group > button:first-child:not(:last-child)":{borderTopRightRadius:"0",borderBottomRightRadius:"0"},".rbc-btn-group > button:last-child:not(:first-child)":{borderTopLeftRadius:"0",borderBottomLeftRadius:"0"},".rbc-rtl .rbc-btn-group > button:first-child:not(:last-child)":{borderRadius:"4px",borderTopLeftRadius:"0",borderBottomLeftRadius:"0"},".rbc-rtl .rbc-btn-group > button:last-child:not(:first-child)":{borderRadius:"4px",borderTopRightRadius:"0",borderBottomRightRadius:"0"},".rbc-btn-group > button:not(:first-child):not(:last-child)":{borderRadius:"0"},".rbc-btn-group button + button":{marginLeft:"-1px"},".rbc-rtl .rbc-btn-group button + button":{marginLeft:"0",marginRight:"-1px"},".rbc-btn-group + .rbc-btn-group,\n.rbc-btn-group + button":{marginLeft:"10px"},".rbc-event":{border:"none",boxSizing:"border-box",boxShadow:"none",margin:"0",padding:"2px 5px",backgroundColor:e.colorBorderSecondary,borderRadius:e.borderRadiusXS,cursor:"pointer",fontSize:e.fontSizeSM,width:"100%",textAlign:"left","&:hover":{backgroundColor:e.colorPrimaryBg,color:e.colorPrimaryText}},".rbc-slot-selecting .rbc-event":{cursor:"inherit",pointerEvents:"none"},".rbc-event.rbc-selected":{backgroundColor:e.colorPrimaryBg,color:e.colorPrimaryText},".rbc-event-label":{fontSize:"80%"},".rbc-event-overlaps":{boxShadow:"-1px 1px 5px 0px rgba(51, 51, 51, 0.5)"},".rbc-event-continues-prior":{borderTopLeftRadius:"0",borderBottomLeftRadius:"0"},".rbc-event-continues-after":{borderTopRightRadius:"0",borderBottomRightRadius:"0"},".rbc-event-continues-earlier":{borderTopLeftRadius:"0",borderTopRightRadius:"0"},".rbc-event-continues-later":{borderBottomLeftRadius:"0",borderBottomRightRadius:"0"},".rbc-row":{display:"flex",flexDirection:"row"},".rbc-row-segment":{padding:"0 4px 1px 4px"},".rbc-selected-cell":{backgroundColor:"rgba(0, 0, 0, 0.1)"},".rbc-show-more":{zIndex:4,fontWeight:"bold",fontSize:"85%",height:"auto",lineHeight:"normal",color:"inherit",padding:"2px 5px"},".rbc-month-view":{position:"relative",display:"flex",flexDirection:"column",flex:"1 0 0",width:"100%",userSelect:"none",WebkitUserSelect:"none",height:"68vh",".rbc-day-bg":{borderTop:`2px solid ${e.colorBorderSecondary}`},".rbc-today":{borderColor:`${e.colorPrimaryBorder} !important`,backgroundColor:`${e.colorPrimaryBg} !important`},".rbc-header":{borderBottom:"0 !important"}},".rbc-month-header":{display:"flex",flexDirection:"row"},".rbc-month-row":{display:"flex",position:"relative",flexDirection:"column",flex:"1 0 0",flexBasis:"0px",overflow:"hidden",height:"100%"},".rbc-date-cell":{flex:"1 1 0",minWidth:"0",paddingLeft:"12px",paddingTop:"4px"},".rbc-date-cell.rbc-now span":{color:"#1890ff"},".rbc-date-cell a,\n.rbc-date-cell a:active,\n.rbc-date-cell a:visited":{color:"inherit",textDecoration:"none"},".rbc-date-cell a:hover":{color:"#1890ff"},".rbc-date-cell .rbc-date-solar":{fontWeight:500},".rbc-date-cell .rbc-date-lunar":{paddingLeft:"12px"},".rbc-date-cell:not(.rbc-off-range) .rbc-date-lunar":{color:"#aaa"},".rbc-date-cell .rbc-date-lunar:hover":{color:"inherit"},".rbc-row-bg":{display:"flex",flexDirection:"row",flex:"1 0 0",overflow:"hidden"},".rbc-day-bg":{flex:"1 0 0%",margin:"0 4px","&:hover":{background:e.colorFillQuaternary}},".rbc-agenda-view":{display:"flex",flexDirection:"column",flex:"1 0 0",overflow:"auto"},".rbc-agenda-view table.rbc-agenda-table":{width:"100%",border:"1px solid #f0f0f0",borderSpacing:"0",borderCollapse:"collapse"},".rbc-agenda-view table.rbc-agenda-table tbody > tr > td":{padding:"5px 10px",verticalAlign:"top"},".rbc-agenda-view table.rbc-agenda-table .rbc-agenda-time-cell":{paddingLeft:"15px",paddingRight:"15px",textTransform:"lowercase"},".rbc-agenda-view table.rbc-agenda-table tbody > tr > td + td":{borderLeft:"1px solid #f0f0f0"},".rbc-rtl .rbc-agenda-view table.rbc-agenda-table tbody > tr > td + td":{borderLeftWidth:"0",borderRight:"1px solid #f0f0f0"},".rbc-agenda-view table.rbc-agenda-table tbody > tr + tr":{borderTop:"1px solid #f0f0f0"},".rbc-agenda-view table.rbc-agenda-table thead > tr > th":{padding:"3px 5px",textAlign:"left",borderBottom:"1px solid #f0f0f0"},".rbc-rtl .rbc-agenda-view table.rbc-agenda-table thead > tr > th":{textAlign:"right"},".rbc-agenda-time-cell":{textTransform:"lowercase"},".rbc-agenda-time-cell .rbc-continues-after:after":{content:"' »'"},".rbc-agenda-time-cell .rbc-continues-prior:before":{content:"'« '"},".rbc-agenda-date-cell,\n.rbc-agenda-time-cell":{whiteSpace:"nowrap"},".rbc-agenda-event-cell":{width:"100%"},".rbc-time-column":{display:"flex",flexDirection:"column",minHeight:"100%"},".rbc-time-column .rbc-timeslot-group":{flex:1},".rbc-timeslot-group":{borderBottom:"1px solid #f0f0f0",minHeight:"40px",lineHeight:"39px",display:"flex",flexFlow:"column nowrap","&:hover":{background:"#f0f0f0"}},".rbc-time-gutter,\n.rbc-header-gutter":{flex:"none"},".rbc-label":{padding:"0 5px"},".rbc-day-slot":{position:"relative"},".rbc-day-slot .rbc-events-container":{bottom:"0",left:"0",position:"absolute",right:"0",marginRight:"10px",top:"0"},".rbc-day-slot .rbc-events-container.rbc-rtl":{left:"10px",right:"0"},".rbc-day-slot .rbc-event":{border:"1px solid #265985",display:"flex",maxHeight:"100%",minHeight:"20px",flexFlow:"column wrap",alignItems:"flex-start",overflow:"hidden",position:"absolute"},".rbc-day-slot .rbc-event-label":{flex:"none",paddingRight:"5px",width:"auto"},".rbc-day-slot .rbc-event-content":{width:"100%",flex:"1 1 0",wordWrap:"break-word",lineHeight:1,height:"100%",minHeight:"1em"},".rbc-time-header-gutter":{lineHeight:"40px"},".rbc-time-header-cell":{minHeight:"32px !important"},".rbc-time-header-cell .rbc-header":{display:"flex"},".rbc-time-header-cell .rbc-header.rbc-today":{borderColor:e.colorPrimaryBorder,backgroundColor:e.colorPrimaryBg,color:e.colorPrimaryText},".rbc-time-header-cell .rbc-header a":{display:"flex",flexDirection:"column"},".rbc-time-header-cell .rbc-date-wrap":{display:"flex",alignItems:"center"},".rbc-time-header-cell .rbc-date-solar":{fontSize:"18px"},".rbc-time-header-cell .rbc-date-lunar":{marginLeft:"4px"},".rbc-time-header-cell .rbc-header:not(.rbc-today) .rbc-date-lunar":{color:"#aaa"},".rbc-calendar.view-week":{".rbc-time-header-cell":{marginTop:"-32px",marginBottom:"4px"},".rbc-time-view":{paddingTop:"32px",borderTop:"0"},".rbc-header":{padding:"4px 8px"},".rbc-time-header-content":{padding:"4px 0"},".rbc-time-header-gutter":{padding:"0",paddingTop:"2px","> div":{borderTop:"2px solid #f0f0f0",padding:"0 5px"}}},".rbc-time-view-resources .rbc-time-gutter,\n.rbc-time-view-resources .rbc-time-header-gutter":{position:"sticky",left:"0",backgroundColor:"white",borderRight:"1px solid #f0f0f0",zIndex:10,marginRight:"-1px"},".rbc-time-view-resources .rbc-time-header":{overflow:"hidden"},".rbc-time-view-resources .rbc-time-header-content":{minWidth:"auto",flex:"1 0 0",flexBasis:"0px"},".rbc-time-view-resources .rbc-time-header-cell-single-day":{display:"none"},".rbc-time-view-resources .rbc-day-slot":{minWidth:"140px"},".rbc-time-view-resources .rbc-header,\n.rbc-time-view-resources .rbc-day-bg":{width:"140px",flex:"1 1 0",flexBasis:"0 px"},".rbc-time-header-content + .rbc-time-header-content":{marginLeft:"-1px"},".rbc-time-slot":{flex:"1 0 0"},".rbc-time-slot.rbc-now":{fontWeight:"bold"},".rbc-day-header":{textAlign:"center"},".rbc-slot-selection":{zIndex:10,position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",fontSize:"75%",width:"100%",padding:"3px"},".rbc-slot-selecting":{cursor:"move"},".rbc-time-view":{display:"flex",flexDirection:"column",flex:1,width:"100%",borderTop:"1px solid #f0f0f0",minHeight:"0"},".rbc-time-view .rbc-time-gutter":{whiteSpace:"nowrap"},".rbc-time-view .rbc-allday-cell":{boxSizing:"content-box",width:"100%",height:"100%",position:"relative"},".rbc-time-view .rbc-allday-cell + .rbc-allday-cell":{borderLeft:"1px solid #f0f0f0"},".rbc-time-view .rbc-allday-events":{position:"relative",zIndex:4},".rbc-time-view .rbc-row":{boxSizing:"border-box",minHeight:"20px"},".rbc-time-header":{display:"flex",flex:"0 0 auto",flexDirection:"row"},".rbc-time-header.rbc-overflowing":{borderRight:"1px solid #f0f0f0"},".rbc-rtl .rbc-time-header.rbc-overflowing":{borderRightWidth:"0",borderLeft:"1px solid #f0f0f0"},".rbc-time-header > .rbc-row:first-child":{borderBottom:"1px solid #f0f0f0"},".rbc-time-header > .rbc-row.rbc-row-resource":{borderBottom:"1px solid #f0f0f0"},".rbc-time-header-cell-single-day":{display:"none"},".rbc-time-header-content":{flex:1,minWidth:"0",flexDirection:"column"},".rbc-rtl .rbc-time-header-content":{borderLeftWidth:"0",borderRight:"1px solid #f0f0f0"},".rbc-time-header-content > .rbc-row.rbc-row-resource":{borderBottom:"1px solid #f0f0f0",flexShrink:0},".rbc-time-content":{display:"flex",flex:"1 0 0%",alignItems:"flex-start",width:"100%",borderTop:"1px solid #f0f0f0",overflowY:"auto",position:"relative"},".rbc-time-content > .rbc-time-gutter":{flex:"none"},".rbc-rtl .rbc-time-content > * + * > *":{borderLeftWidth:"0",borderRight:"1px solid #f0f0f0"},".rbc-time-content > .rbc-day-slot":{width:"100%",userSelect:"none",WebkitUserSelect:"none"},".rbc-current-time-indicator":{position:"absolute",zIndex:3,left:"0",right:"0",height:"1px",backgroundColor:"#74ad31",pointerEvents:"none"},"@media only screen and (max-width: 800px)":{".view-type-calendar .action-buttons":{position:"relative !important",left:"0 !important",".filter-action-button":{left:"0 !important"}},".rbc-toolbar .rbc-toolbar-label":{position:"absolute",top:"28px",left:"50%",transform:"translateX(-50%)"},".rbc-toolbar":{justifyContent:"space-between !important"},".rbc-header":{padding:"4px !important"}}}}}),RD=["month","week","day"],VD=kD(Pe),wf=b.createContext({close:()=>{}});function HD(e){const t=K.useFieldSchema(),r=b.useMemo(()=>t.reduceProperties((n,a)=>a["x-component"].endsWith(".ActionBar")?a:n,null),[]);return P.jsx(Nr.Provider,{value:e,children:P.jsx(K.RecursionField,{name:r.name,schema:r})})}const BD=(e,t,r,n)=>{const{t:a}=Xe();return b.useMemo(()=>{if(!Array.isArray(e))return[];const i=[];return e.forEach(o=>{const{cron:s,exclude:l=[]}=o,u=Pe(ea(o,t.start)||Pe()),f=Pe(ea(o,t.end)||u).diff(u,"millisecond",!0),d=Pe(r);let h=d.clone().startOf("month"),p=h.clone().endOf("month");n==="month"&&(h=h.startOf("week"),p=p.endOf("week"));const m=(v=u.clone())=>{if(v.isBefore(u)||!v.isBetween(h,p))return;let g=!1;if(l==null?void 0:l.some(O=>O.endsWith("_after")?(O=O.replace(/_after$/,""),g=!0,v.isSameOrAfter(O)):v.isSame(O)))return g;const S={id:ea(o,t.id||"id"),title:ea(o,t.title)||a("Untitle"),start:v.toDate(),end:v.add(f,"millisecond").toDate()};i.push(S)};if(s==="every_week"){const v=u.clone().year(h.year()).month(h.month()).date(h.date()).day(u.day());for(;v.isBefore(p)&&!m(v.clone());)v.add(1,"week")}else if(s==="every_month")m(u.clone().year(d.year()).month(d.month()));else if(s==="every_year")m(u.clone().year(d.year()));else{if(m(),!s)return;try{const v=qh.parseExpression(s,{startDate:h.toDate(),endDate:p.toDate(),iterator:!0,currentDate:u.toDate(),utc:!0});for(;v.hasNext();){const{value:g}=v.next();if(m(Pe(g.toDate())))break}}catch(v){console.error(v)}}}),i},[e,t,r,n])},UD=e=>{const{visible:t,setVisible:r,record:n}=e,a=x.useCollectionParentRecordData(),i=K.useFieldSchema(),o=b.useMemo(()=>i.reduceProperties((l,u)=>u["x-component"].endsWith(".Event")?u:l,null),[]),s=b.useCallback(()=>{r(!1)},[]);return o&&P.jsx(wf.Provider,{value:{close:s},children:P.jsx(x.ActionContextProvider,{value:{visible:t,setVisible:r},children:P.jsx(x.RecordProvider,{record:n,parent:a,children:P.jsx(K.RecursionField,{schema:o,name:o.name})})})})},yt=x.withDynamicSchemaProps(K.observer(e=>{const{dataSource:t,fieldNames:r,showLunar:n,fixedBlock:a}=x.useProps(e),[i,o]=b.useState(new Date),[s,l]=b.useState("month"),u=BD(t,r,i,s),[c,f]=b.useState(!1),[d,h]=b.useState({}),{wrapSSR:p,hashId:m,componentCls:v}=WD(),g=b.useMemo(()=>({toolbar:S=>P.jsx(HD,ut(de({},S),{showLunar:n})),month:{dateHeader:S=>P.jsx(LD,ut(de({},S),{showLunar:n}))}}),[n]),w={allDay:"",previous:P.jsx("div",{children:P.jsx(ct.LeftOutlined,{})}),next:P.jsx("div",{children:P.jsx(ct.RightOutlined,{})}),today:Ve("Today"),month:Ve("Month"),week:Ve("Week"),work_week:Ve("Work week"),day:Ve("Day"),agenda:Ve("Agenda"),date:Ve("Date"),time:Ve("Time"),event:Ve("Event"),noEventsInRange:Ve("None"),showMore:S=>Ve("{{count}} more items",{count:S})};return p(P.jsxs("div",{className:`${m} ${v}`,style:{height:a?"100%":700},children:[P.jsx(yf,{}),P.jsx(UD,{visible:c,setVisible:f,record:d}),P.jsx(xD,{popup:!0,selectable:!0,events:u,view:s,views:RD,date:i,step:60,showMultiDayTimes:!0,messages:w,onNavigate:o,onView:l,onSelectSlot:S=>{console.log("onSelectSlot",S)},onDoubleClickEvent:()=>{console.log("onDoubleClickEvent")},onSelectEvent:S=>{const O=t==null?void 0:t.find(y=>y[r.id]===S.id);O&&(O.__event=ut(de({},S),{start:Ro(Pe(S.start)),end:Ro(Pe(S.end))}),h(O),f(!0))},formats:{monthHeaderFormat:"YYYY-M",agendaDateFormat:"M-DD",dayHeaderFormat:"YYYY-M-DD",dayRangeHeaderFormat:({start:S,end:O},y,T)=>pf.eq(S,O,"month")?T.format(S,"YYYY-M",y):`${T.format(S,"YYYY-M",y)} - ${T.format(O,"YYYY-M",y)}`},components:g,localizer:VD})]}))},{displayName:"Calendar"})),YD=()=>{const{name:e,title:t}=x.useCollection(),r=x.useSchemaTemplate();return P.jsx(x.GeneralSchemaDesigner,{schemaSettings:"blockSettings:calendar",template:r,title:t||e})},{Text:qD}=Ee.Typography,GD=K.observer(()=>{var w;const{visible:e,setVisible:t}=x.useActionContext(),g=x.useRecord(),{exclude:r=[],cron:n}=g,a=qo(g,["exclude","cron"]),{close:i}=b.useContext(wf),o=Ro(Pe((w=a.__parent)==null?void 0:w.__event.start)),s=x.useFilterByTk(),{resource:l,service:u,__parent:c}=x.useBlockRequestContext(),[f,d]=b.useState(o),[h,p]=b.useState(!1),m=()=>Fr(this,null,function*(){var S,O,y;p(!0),f==="all"||!n?yield l.destroy({filterByTk:s}):yield l.update({filterByTk:s,values:{exclude:(r||[]).concat(f)}}),p(!1),(O=(S=c==null?void 0:c.service)==null?void 0:S.refresh)==null||O.call(S),(y=u==null?void 0:u.refresh)==null||y.call(u),t==null||t(!1,!0),i()}),{t:v}=Xe();return Re.createPortal(P.jsx(Ee.Modal,{title:n?v("Delete events"):null,open:e,onCancel:()=>t(!1),onOk:()=>m(),confirmLoading:h,children:n?P.jsx(Ee.Radio.Group,{value:f,onChange:S=>d(S.target.value),children:P.jsxs(Ee.Space,{direction:"vertical",children:[P.jsx(Ee.Radio,{value:o,children:v("This event")}),P.jsx(Ee.Radio,{value:`${o}_after`,children:v("This and following events")}),P.jsx(Ee.Radio,{value:"all",children:v("All events")})]})}):P.jsx(qD,{strong:!0,style:{fontSize:"18px"},children:v("Delete this event?")})}),document.body)},{displayName:"DeleteEvent"}),ZD=K.observer(e=>P.jsx(P.Fragment,{children:e.children}),{displayName:"Event"}),KD=K.observer(()=>{const{DesignableBar:e}=x.useDesignable(),{onNavigate:t}=b.useContext(Nr);return P.jsxs(Ee.Button.Group,{children:[P.jsx(Ee.Button,{icon:P.jsx(ct.LeftOutlined,{}),onClick:()=>t(ge.PREVIOUS)}),P.jsx(Ee.Button,{icon:P.jsx(ct.RightOutlined,{}),onClick:()=>t(ge.NEXT)}),P.jsx(e,{})]})},{displayName:"Nav"}),XD=K.observer(()=>{const{DesignableBar:e}=x.useDesignable(),{date:t,view:r,label:n,showLunar:a}=b.useContext(Nr),i=b.useMemo(()=>{if(!(!a||r!=="day"))return P.jsx("span",{children:bf(t)})},[r,t,a]);return P.jsxs(Ee.Button.Group,{style:{fontSize:"1.75em",fontWeight:300},children:[P.jsx("span",{children:n}),P.jsx("span",{style:{marginLeft:"4px"},children:i}),P.jsx(e,{})]})},{displayName:"Title"}),JD=K.observer(e=>{const{DesignableBar:t}=x.useDesignable(),{onNavigate:r}=b.useContext(Nr),{t:n}=Xe();return P.jsxs(Ee.Button,{onClick:()=>{r(ge.TODAY)},children:[n("Today"),P.jsx(t,{})]})},{displayName:"Today"}),QD=K.observer(e=>{const{DesignableBar:t}=x.useDesignable(),{views:r,view:n,onView:a,localizer:{messages:i}}=b.useContext(Nr);return P.jsxs("div",{className:"ant-btn-group",children:[P.jsx(Ee.Select,{popupMatchSelectWidth:!1,value:n,onChange:a,children:r.map(o=>P.jsx(Ee.Select.Option,{value:o,children:i[o]},o))}),P.jsx(t,{})]})},{displayName:"ViewSelect"});yt.ActionBar=x.ActionBar,yt.Event=ZD,yt.DeleteEvent=GD,yt.Title=XD,yt.Today=JD,yt.Nav=KD,yt.ViewSelect=QD,yt.Designer=YD;const eE=yt;function Sf(e){const t=b.useMemo(()=>{var i,o;const r=[],n=(i=e.fieldNames)==null?void 0:i.start,a=(o=e.fieldNames)==null?void 0:o.end;return Array.isArray(n)&&n.length>=2&&r.push(n[0]),Array.isArray(a)&&a.length>=2&&r.push(a[0]),r},[e.fieldNames]);return b.useMemo(()=>ut(de({},e.params),{appends:[...t,...e.params.appends||[]],paginate:!1}),[t,e.params])}const Vo=b.createContext({});Vo.displayName="CalendarBlockContext";const tE=e=>{var s,l,u;const{fieldNames:t,showLunar:r}=e,n=K.useField(),{resource:a,service:i}=x.useBlockRequestContext(),{filter:o}=x.useParsedFilter({filterOption:(l=(s=i==null?void 0:i.params)==null?void 0:s[0])==null?void 0:l.filter});return b.useEffect(()=>{var c;Lr.isEmpty(o)||i==null||i.run(ut(de({},(c=i==null?void 0:i.params)==null?void 0:c[0]),{filter:o}))},[JSON.stringify(o)]),P.jsx(x.FixedBlockWrapper,{children:P.jsx(Vo.Provider,{value:{field:n,service:i,resource:a,fieldNames:t,showLunar:r,fixedBlock:(u=n==null?void 0:n.decoratorProps)==null?void 0:u.fixedBlock},children:e.children})})},rE=e=>K.useFieldSchema()["x-use-decorator-props"]?e.params:Sf(e),nE=x.withDynamicSchemaProps(e=>{const t=rE(e);return P.jsx(x.BlockProvider,ut(de({name:"calendar"},e),{params:t,children:P.jsx(tE,de({},e))}))}),Pn=()=>b.useContext(Vo),aE=()=>{var r;const e=Pn(),t=K.useField();return b.useEffect(()=>{var n,a,i;(n=e==null?void 0:e.service)!=null&&n.loading||(t.componentProps.dataSource=(i=(a=e==null?void 0:e.service)==null?void 0:a.data)==null?void 0:i.data)},[(r=e==null?void 0:e.service)==null?void 0:r.loading]),{fieldNames:e.fieldNames,showLunar:e.showLunar,fixedBlock:e.fixedBlock}},iE=()=>{const e=K.useField(),{t}=Xe(),r=K.useFieldSchema(),{dn:n}=x.useDesignable();return P.jsx(x.SchemaSettingsSwitchItem,{title:t("Show lunar"),checked:e.decoratorProps.showLunar,onChange:a=>{e.decoratorProps.showLunar=a,r["x-decorator-props"].showLunar=a,n.emit("patch",{schema:{"x-uid":r["x-uid"],"x-decorator-props":e.decoratorProps}}),n.refresh()}})},oE=new x.SchemaSettings({name:"blockSettings:calendar",items:[{name:"title",Component:x.SchemaSettingsBlockTitleItem},{name:"titleField",Component:x.SchemaSettingsSelectItem,useComponentProps(){var u;const{t:e}=Xe(),t=K.useFieldSchema(),r=((u=t==null?void 0:t["x-decorator-props"])==null?void 0:u.fieldNames)||{},{service:n}=Pn(),{getCollectionFieldsOptions:a}=x.useCollectionManager_deprecated(),{name:i,title:o}=x.useCollection(),s=K.useField(),{dn:l}=x.useDesignable();return{title:e("Title field"),value:r.title,options:a(i,"string"),onChange:c=>{const f=s.decoratorProps.fieldNames||{};f.title=c,s.decoratorProps.params=f,t["x-decorator-props"].params=f,t["x-decorator-props"].fieldNames=f,n.refresh(),l.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":s.decoratorProps}}),l.refresh()}}}},{name:"showLunar",Component:iE},{name:"fixBlock",Component:x.FixedBlockDesignerItem},{name:"startDateField",Component:x.SchemaSettingsCascaderItem,useComponentProps(){var l;const{getCollectionFieldsOptions:e}=x.useCollectionManager_deprecated(),{t}=Xe(),r=K.useFieldSchema(),n=((l=r==null?void 0:r["x-decorator-props"])==null?void 0:l.fieldNames)||{},a=K.useField(),{dn:i}=x.useDesignable(),{service:o}=Pn(),{name:s}=x.useCollection();return{title:t("Start date field"),value:n.start,options:e(s,"date",{association:["o2o","obo","oho","m2o"]}),onChange:u=>{const c=a.decoratorProps.fieldNames||{};c.start=u,a.decoratorProps.fieldNames=c,r["x-decorator-props"].fieldNames=c,o.refresh(),i.emit("patch",{schema:{"x-uid":r["x-uid"],"x-decorator-props":a.decoratorProps}}),i.refresh()}}}},{name:"endDateField",Component:x.SchemaSettingsCascaderItem,useComponentProps(){var l;const{t:e}=Xe(),t=K.useFieldSchema(),r=K.useField(),{service:n}=Pn(),{getCollectionFieldsOptions:a}=x.useCollectionManager_deprecated(),{dn:i}=x.useDesignable(),{name:o}=x.useCollection(),s=((l=t==null?void 0:t["x-decorator-props"])==null?void 0:l.fieldNames)||{};return{title:e("End date field"),value:s.end,options:a(o,"date",{association:["o2o","obo","oho","m2o"]}),onChange:u=>{const c=r.decoratorProps.fieldNames||{};c.end=u,r.decoratorProps.fieldNames=c,t["x-decorator-props"].fieldNames=c,n.refresh(),i.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":r.decoratorProps}}),i.refresh()}}}},{name:"dataScope",Component:x.SchemaSettingsDataScope,useComponentProps(){var o,s;const{name:e}=x.useCollection(),t=K.useFieldSchema(),{form:r}=x.useFormBlockContext(),n=K.useField(),{service:a}=Pn(),{dn:i}=x.useDesignable();return{collectionName:e,defaultFilter:((s=(o=t==null?void 0:t["x-decorator-props"])==null?void 0:o.params)==null?void 0:s.filter)||{},form:r,onSubmit:({filter:l})=>{var c;l=x.removeNullCondition(l);const u=n.decoratorProps.params||{};u.filter=l,n.decoratorProps.params=u,t["x-decorator-props"].params=u,a.run(ut(de({},(c=a==null?void 0:a.params)==null?void 0:c[0]),{filter:l})),i.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":n.decoratorProps}})}}}},{name:"divider",type:"divider"},{name:"template",Component:x.SchemaSettingsTemplate,useComponentProps(){var n,a;const{name:e}=x.useCollection(),t=K.useFieldSchema(),r=((n=t==null?void 0:t["x-decorator-props"])==null?void 0:n.resource)||((a=t==null?void 0:t["x-decorator-props"])==null?void 0:a.association);return{componentName:"Calendar",collectionName:e,resourceName:r}}},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]});V("Calendar collection"),V("Repeats"),V("Daily"),V("Weekly"),V("Monthly"),V("Yearly"),x.getConfigurableProperties("title","name","inherits","category","description","presetFields");class sE extends x.CollectionTemplate{constructor(){super(...arguments);kt(this,"name","calendar");kt(this,"title",V("Calendar collection"));kt(this,"order",2);kt(this,"color","orange");kt(this,"default",{createdBy:!0,updatedBy:!0,createdAt:!0,updatedAt:!0,sortable:!0,fields:[{name:"cron",type:"string",uiSchema:{type:"string",title:V("Repeats"),"x-component":"CronSet","x-component-props":"allowClear",enum:[{label:V("Daily"),value:"0 0 0 * * ?"},{label:V("Weekly"),value:"every_week"},{label:V("Monthly"),value:"every_month"},{label:V("Yearly"),value:"every_year"}]},interface:"select"},{name:"exclude",type:"json"}]});kt(this,"availableFieldInterfaces",{include:[]});kt(this,"configurableProperties",x.getConfigurableProperties("title","name","inherits","category","description","presetFields"))}}const Of=new x.CompatibleSchemaInitializer({title:V("Configure actions"),icon:"SettingOutlined",name:"CalendarActionInitializers",style:{marginLeft:8},items:[{type:"itemGroup",name:"enableActions",title:V("Enable actions"),children:[{name:"today",title:V("Today"),Component:"ActionInitializer",schema:{title:V("Today"),"x-component":"CalendarV2.Today","x-action":"calendar:today","x-align":"left"}},{name:"turnPages",title:V("Turn pages"),Component:"ActionInitializer",schema:{title:V("Turn pages"),"x-component":"CalendarV2.Nav","x-action":"calendar:nav","x-align":"left"}},{name:"title",title:V("Title"),Component:"ActionInitializer",schema:{title:V("Title"),"x-component":"CalendarV2.Title","x-action":"calendar:title","x-align":"left"}},{name:"selectView",title:V("Select view"),Component:"ActionInitializer",schema:{title:V("Select view"),"x-component":"CalendarV2.ViewSelect","x-action":"calendar:viewSelect","x-align":"right","x-designer":"Action.Designer"}},{name:"filter",title:V("Filter"),Component:"FilterActionInitializer",schema:{"x-align":"right"}},{name:"addNew",title:V("Add new"),Component:"CreateActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0}},useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}}]}]}),lE=new x.CompatibleSchemaInitializer({title:V("Configure actions"),icon:"SettingOutlined",name:"calendar:configureActions",style:{marginLeft:8},items:[{type:"itemGroup",name:"enableActions",title:V("Enable actions"),children:[{name:"today",title:V("Today"),Component:"ActionInitializer",schema:{title:V("Today"),"x-component":"CalendarV2.Today","x-action":"calendar:today","x-align":"left"}},{name:"turnPages",title:V("Turn pages"),Component:"ActionInitializer",schema:{title:V("Turn pages"),"x-component":"CalendarV2.Nav","x-action":"calendar:nav","x-align":"left"}},{name:"title",title:V("Title"),Component:"ActionInitializer",schema:{title:V("Title"),"x-component":"CalendarV2.Title","x-action":"calendar:title","x-align":"left"}},{name:"selectView",title:V("Select view"),Component:"ActionInitializer",schema:{title:V("Select view"),"x-component":"CalendarV2.ViewSelect","x-action":"calendar:viewSelect","x-align":"right","x-designer":"Action.Designer"}},{name:"filter",title:V("Filter"),Component:"FilterActionInitializer",schema:{"x-align":"right"}},{name:"addNew",title:V("Add new"),Component:"CreateActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0}},useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}}]}]},Of),Tf={name:"deleteEvent",title:V("Delete Event"),Component:"DeleteEventActionInitializer",schema:{"x-component":"Action","x-decorator":"ACLActionProvider"},useVisible(){return x.useCollection_deprecated().template==="calendar"}},uE=new x.SchemaInitializer({title:V("Configure actions"),name:"CalendarFormActionInitializers",icon:"SettingOutlined",style:{marginLeft:8},items:[{type:"itemGroup",name:"enableActions",title:V("Enable actions"),children:[{name:"edit",title:V("Edit"),Component:"UpdateActionInitializer",schema:{"x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{type:"primary"}},useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}},{name:"delete",title:V("Delete"),Component:"DestroyActionInitializer",schema:{"x-component":"Action","x-decorator":"ACLActionProvider"},visible:function(){const t=x.useCollection_deprecated();return(t.template!=="view"||(t==null?void 0:t.writableView))&&t.template!=="sql"}},Tf]},{name:"divider",type:"divider"},{type:"subMenu",name:"customize",title:V("Customize"),children:[{name:"popup",title:V("Popup"),Component:"CustomizeActionInitializer",schema:{type:"void",title:V("Popup"),"x-action":"customize:popup","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:popup","x-component":"Action","x-component-props":{openMode:"drawer"},properties:{drawer:{type:"void",title:V("Popup"),"x-component":"Action.Container","x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"TabPaneInitializers",properties:{tab1:{type:"void",title:V("Details"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock",properties:{}}}}}}}}}}},{name:"updateRecord",title:V("Update record"),Component:"CustomizeActionInitializer",schema:{title:V("Update record"),"x-component":"Action","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:updateRecord","x-acl-action":"update","x-action":"customize:update","x-action-settings":{assignedValues:{},onSuccess:{manualClose:!0,redirecting:!1,successMessage:V("Updated successfully")},triggerWorkflows:[]},"x-component-props":{useProps:"{{ useCustomizeUpdateActionProps }}"}},useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}},{name:"customRequest",title:V("Custom request"),Component:"CustomRequestInitializer",useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}}]}]}),Ho=e=>{const{collectionName:t,dataSource:r,fieldNames:n,association:a}=e;return{type:"void","x-acl-action":`${a||t}:list`,"x-decorator":"CalendarBlockProvider","x-use-decorator-props":"useCalendarBlockDecoratorProps","x-decorator-props":{collection:t,dataSource:r,association:a,action:"list",fieldNames:de({id:"id"},n),params:{paginate:!1}},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:calendar","x-component":"CardItem",properties:{[Ff.uid()]:{type:"void","x-component":"CalendarV2","x-use-component-props":"useCalendarBlockProps",properties:{toolBar:{type:"void","x-component":"CalendarV2.ActionBar","x-component-props":{style:{marginBottom:24}},"x-initializer":"calendar:configureActions"},event:{type:"void","x-component":"CalendarV2.Event",properties:{drawer:{type:"void","x-component":"Action.Drawer","x-component-props":{className:"nb-action-popup"},title:V("View record"),properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"TabPaneInitializers","x-initializer-props":{gridInitializer:"popup:common:addBlock"},properties:{tab1:{type:"void",title:V("Details"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer-props":{actionInitializers:"details:configureActions"},"x-initializer":"popup:common:addBlock"}}}}}}}}}}}}}},cE=({filterCollections:e,onlyCurrentDataSource:t,hideSearch:r,createBlockSchema:n,showAssociationFields:a})=>{const{insert:i}=x.useSchemaInitializer(),{t:o}=Xe(),{getCollectionField:s,getCollectionFieldsOptions:l}=x.useCollectionManager_deprecated(),u=b.useContext(K.SchemaOptionsContext),{theme:c}=x.useGlobalTheme(),f=x.useSchemaInitializerItem();return P.jsx(x.DataBlockInitializer,ut(de({},f),{componentType:"Calendar",icon:P.jsx(ct.FormOutlined,{}),onCreateBlockSchema:h=>Fr(this,[h],function*({item:d}){if(n)return n({item:d});const p=l(d.name,"string",{dataSource:d.dataSource}),m=l(d.name,"date",{association:["o2o","obo","oho","m2o"],dataSource:d.dataSource}),v=yield x.FormDialog(o("Create calendar block"),()=>P.jsx(x.SchemaComponentOptions,{scope:u.scope,components:de({},u.components),children:P.jsx(Wa.FormLayout,{layout:"vertical",children:P.jsx(x.SchemaComponent,{schema:{properties:{title:{title:o("Title field"),enum:p,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:o("Start date field"),enum:m,required:!0,default:s(`${d.name}.createdAt`)?"createdAt":null,"x-component":"Cascader","x-decorator":"FormItem"},end:{title:o("End date field"),enum:m,"x-component":"Cascader","x-decorator":"FormItem"}}}})})}),c).open({initialValues:{}});i(Ho({collectionName:d.name,dataSource:d.dataSource,fieldNames:de({},v)}))}),onlyCurrentDataSource:t,hideSearch:r,filter:e,showAssociationFields:a}))},fE=()=>{const e=x.useSchemaInitializerItem(),p=e,{onCreateBlockSchema:t,componentType:r,createBlockSchema:n}=p,a=qo(p,["onCreateBlockSchema","componentType","createBlockSchema"]),{insert:i}=x.useSchemaInitializer(),{getTemplateSchemaByMode:o}=x.useSchemaTemplateManager(),{t:s}=Xe(),l=b.useContext(K.SchemaOptionsContext),{getCollection:u}=x.useCollectionManager_deprecated(),c=e.field,f=u(c.target),d=`${c.collectionName}.${c.name}`,{theme:h}=x.useGlobalTheme();return P.jsx(x.SchemaInitializerItem,ut(de({icon:P.jsx(ct.TableOutlined,{})},a),{onClick:v=>Fr(this,[v],function*({item:m}){var g,w,S,O;if(m.template){const y=yield o(m);i(y)}else{const y=(w=(g=f==null?void 0:f.fields)==null?void 0:g.filter(E=>E.type==="string"))==null?void 0:w.map(E=>{var C;return{label:(C=E==null?void 0:E.uiSchema)==null?void 0:C.title,value:E.name}}),T=(O=(S=f==null?void 0:f.fields)==null?void 0:S.filter(E=>E.type==="date"))==null?void 0:O.map(E=>{var C;return{label:(C=E==null?void 0:E.uiSchema)==null?void 0:C.title,value:E.name}}),D=yield x.FormDialog(s("Create calendar block"),()=>P.jsx(x.SchemaComponentOptions,{scope:l.scope,components:de({},l.components),children:P.jsx(Wa.FormLayout,{layout:"vertical",children:P.jsx(x.SchemaComponent,{schema:{properties:{title:{title:s("Title field"),enum:y,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:s("Start date field"),enum:T,required:!0,default:"createdAt","x-component":"Select","x-decorator":"FormItem"},end:{title:s("End date field"),enum:T,"x-component":"Select","x-decorator":"FormItem"}}}})})}),h).open({initialValues:{}});i(Ho({association:d,dataSource:m.dataSource,fieldNames:de({},D)}))}}),items:x.useRecordCollectionDataSourceItems("Calendar",e,c.target,d)}))};function dE(){const{insert:e}=x.useSchemaInitializer(),{getCollection:t}=x.useCollectionManager_deprecated(),{t:r}=Xe(),n=b.useContext(K.SchemaOptionsContext),{theme:a}=x.useGlobalTheme();return{createAssociationCalendarBlock:s=>Fr(this,[s],function*({item:o}){var h,p,m,v;const l=o.associationField,u=t(l.target),c=(p=(h=u==null?void 0:u.fields)==null?void 0:h.filter(g=>g.type==="string"))==null?void 0:p.map(g=>{var w;return{label:(w=g==null?void 0:g.uiSchema)==null?void 0:w.title,value:g.name}}),f=(v=(m=u==null?void 0:u.fields)==null?void 0:m.filter(g=>g.type==="date"))==null?void 0:v.map(g=>{var w;return{label:(w=g==null?void 0:g.uiSchema)==null?void 0:w.title,value:g.name}}),d=yield x.FormDialog(r("Create calendar block"),()=>P.jsx(x.SchemaComponentOptions,{scope:n.scope,components:de({},n.components),children:P.jsx(Wa.FormLayout,{layout:"vertical",children:P.jsx(x.SchemaComponent,{schema:{properties:{title:{title:r("Title field"),enum:c,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:r("Start date field"),enum:f,required:!0,default:"createdAt","x-component":"Select","x-decorator":"FormItem"},end:{title:r("End date field"),enum:f,"x-component":"Select","x-decorator":"FormItem"}}}})})}),a).open({initialValues:{}});e(Ho({association:`${l.collectionName}.${l.name}`,dataSource:o.dataSource,fieldNames:de({},d)}))})}}function hE(e){const t=Sf(e);let r;return e.association&&(r=x.useDataBlockSourceId({association:e.association})),{params:t,sourceId:r}}class Df extends x.Plugin{load(){return Fr(this,null,function*(){this.app.dataSourceManager.addCollectionTemplates([sE]),this.app.schemaInitializerManager.addItem("page:addBlock","dataBlocks.calendar",{title:V("Calendar"),Component:"CalendarBlockInitializer"}),this.app.schemaInitializerManager.addItem("popup:common:addBlock","dataBlocks.calendar",{title:V("Calendar"),Component:"CalendarBlockInitializer",useVisible(){const t=x.useCollection();return b.useMemo(()=>t.fields.some(r=>x.canMakeAssociationBlock(r)&&["hasMany","belongsToMany"].includes(r.type)),[t.fields])},useComponentProps(){const{createAssociationCalendarBlock:t}=dE();return{onlyCurrentDataSource:!0,filterCollections({associationField:r}){return r?["hasMany","belongsToMany"].includes(r.type):!1},createBlockSchema:t,showAssociationFields:!0}}}),this.app.addComponents({CalendarBlockProvider:nE,CalendarBlockInitializer:cE,RecordAssociationCalendarBlockInitializer:fE,CalendarV2:eE}),this.app.addScopes({useCalendarBlockProps:aE,useCalendarBlockDecoratorProps:hE}),this.schemaSettingsManager.add(oE),this.app.schemaInitializerManager.add(Of),this.app.schemaInitializerManager.add(lE),this.app.schemaInitializerManager.add(uE),this.app.schemaInitializerManager.get("details:configureActions").add("enableActions.deleteEvent",Tf)})}}R.PluginCalendarClient=Df,R.default=Df,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
94
|
+
`;yf.displayName="GlobalStyle";const WD=x.genStyleHook("nb-calendar",e=>{const{componentCls:t}=e;return{[t]:{".rbc-btn":{color:"inherit",font:"inherit",margin:"0"},"button.rbc-btn":{overflow:"visible",textTransform:"none",WebkitAppearance:"button",cursor:"pointer"},"button[disabled].rbc-btn":{cursor:"not-allowed"},"button.rbc-input::-moz-focus-inner":{border:"0",padding:"0"},".rbc-button-link":{border:"none",backgroundColor:"transparent"},".rbc-calendar":{boxSizing:"border-box",display:"flex",flexDirection:"column",alignItems:"stretch",height:"100%"},".rbc-calendar *,\n.rbc-calendar *:before,\n.rbc-calendar *:after":{boxSizing:"inherit"},".rbc-abs-full,\n.rbc-row-bg":{overflow:"hidden",position:"absolute",top:"0",left:"0",right:"0",bottom:"0"},".rbc-ellipsis,\n.rbc-event-label,\n.rbc-row-segment .rbc-event-content,\n.rbc-show-more":{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},".rbc-rtl":{direction:"rtl"},".rbc-off-range":{color:e.colorTextDisabled},".rbc-header":{overflow:"hidden",flex:"1 0 0%",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:`${e.paddingXXS}px ${e.paddingSM}px`,verticalAlign:"middle",minHeight:e.sizeXL,color:e.colorText,margin:`0 ${e.marginXXS}px`,borderBottom:`2px solid ${e.colorBorderSecondary}`},".rbc-rtl .rbc-header + .rbc-header":{borderLeftWidth:"0",borderRight:`1px solid ${e.colorBorderSecondary}`},".rbc-header > a,\n.rbc-header > a:active,\n.rbc-header > a:visited":{color:"inherit",textDecoration:"none"},".rbc-row-content":{position:"relative",userSelect:"none",WebkitUserSelect:"none",zIndex:4},".rbc-row-content-scrollable":{display:"flex",flexDirection:"column",height:"100%"},".rbc-row-content-scrollable .rbc-row-content-scroll-container":{height:"100%",overflowY:"scroll",msOverflowStyle:"none",scrollbarWidth:"none"},".rbc-row-content-scrollable .rbc-row-content-scroll-container::-webkit-scrollbar":{display:"none"},".rbc-toolbar":{display:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",marginBottom:e.marginXS,fontSize:e.fontSize},".rbc-toolbar .rbc-toolbar-label":{flexGrow:1,padding:`0 ${e.paddingXS}px`,textAlign:"center"},".rbc-toolbar button":{outline:"none",fontSize:e.fontSize,lineHeight:[e.lineHeight,"normal"],height:e.controlHeight,color:e.colorTextLabel,display:"inline-block",margin:"0",position:"relative",zIndex:1,textAlign:"center",verticalAlign:"middle",background:"none",backgroundImage:"none",border:`1px solid ${e.colorBorder}`,padding:`${e.paddingXXS}px ${e.paddingSM+e.paddingXXS}px`,borderRadius:e.borderRadiusXS,whiteSpace:"nowrap"},".rbc-toolbar button:active,\n.rbc-toolbar button.rbc-active":{zIndex:2,color:"#1890ff",borderColor:"#1890ff"},".rbc-toolbar button:active:hover,\n.rbc-toolbar button:active:focus,\n.rbc-toolbar button.rbc-active:hover,\n.rbc-toolbar button.rbc-active:focus":{zIndex:2,color:"#40a9ff",borderColor:"#40a9ff"},".rbc-toolbar button:hover":{zIndex:2,color:"#40a9ff",borderColor:"#40a9ff"},".rbc-btn-group":{display:"inline-block",whiteSpace:"nowrap"},".rbc-btn-group > button:first-child:not(:last-child)":{borderTopRightRadius:"0",borderBottomRightRadius:"0"},".rbc-btn-group > button:last-child:not(:first-child)":{borderTopLeftRadius:"0",borderBottomLeftRadius:"0"},".rbc-rtl .rbc-btn-group > button:first-child:not(:last-child)":{borderRadius:"4px",borderTopLeftRadius:"0",borderBottomLeftRadius:"0"},".rbc-rtl .rbc-btn-group > button:last-child:not(:first-child)":{borderRadius:"4px",borderTopRightRadius:"0",borderBottomRightRadius:"0"},".rbc-btn-group > button:not(:first-child):not(:last-child)":{borderRadius:"0"},".rbc-btn-group button + button":{marginLeft:"-1px"},".rbc-rtl .rbc-btn-group button + button":{marginLeft:"0",marginRight:"-1px"},".rbc-btn-group + .rbc-btn-group,\n.rbc-btn-group + button":{marginLeft:"10px"},".rbc-event":{border:"none",boxSizing:"border-box",boxShadow:"none",margin:"0",padding:"2px 5px",backgroundColor:e.colorBorderSecondary,borderRadius:e.borderRadiusXS,cursor:"pointer",fontSize:e.fontSizeSM,width:"100%",textAlign:"left","&:hover":{backgroundColor:e.colorPrimaryBg,color:e.colorPrimaryText}},".rbc-slot-selecting .rbc-event":{cursor:"inherit",pointerEvents:"none"},".rbc-event.rbc-selected":{backgroundColor:e.colorPrimaryBg,color:e.colorPrimaryText},".rbc-event-label":{fontSize:"80%"},".rbc-event-overlaps":{boxShadow:"-1px 1px 5px 0px rgba(51, 51, 51, 0.5)"},".rbc-event-continues-prior":{borderTopLeftRadius:"0",borderBottomLeftRadius:"0"},".rbc-event-continues-after":{borderTopRightRadius:"0",borderBottomRightRadius:"0"},".rbc-event-continues-earlier":{borderTopLeftRadius:"0",borderTopRightRadius:"0"},".rbc-event-continues-later":{borderBottomLeftRadius:"0",borderBottomRightRadius:"0"},".rbc-row":{display:"flex",flexDirection:"row"},".rbc-row-segment":{padding:"0 4px 1px 4px"},".rbc-selected-cell":{backgroundColor:"rgba(0, 0, 0, 0.1)"},".rbc-show-more":{zIndex:4,fontWeight:"bold",fontSize:"85%",height:"auto",lineHeight:"normal",color:"inherit",padding:"2px 5px"},".rbc-month-view":{position:"relative",display:"flex",flexDirection:"column",flex:"1 0 0",width:"100%",userSelect:"none",WebkitUserSelect:"none",height:"68vh",".rbc-day-bg":{borderTop:`2px solid ${e.colorBorderSecondary}`},".rbc-today":{borderColor:`${e.colorPrimaryBorder} !important`,backgroundColor:`${e.colorPrimaryBg} !important`},".rbc-header":{borderBottom:"0 !important"}},".rbc-month-header":{display:"flex",flexDirection:"row"},".rbc-month-row":{display:"flex",position:"relative",flexDirection:"column",flex:"1 0 0",flexBasis:"0px",overflow:"hidden",height:"100%"},".rbc-date-cell":{flex:"1 1 0",minWidth:"0",paddingLeft:"12px",paddingTop:"4px"},".rbc-date-cell.rbc-now span":{color:"#1890ff"},".rbc-date-cell a,\n.rbc-date-cell a:active,\n.rbc-date-cell a:visited":{color:"inherit",textDecoration:"none"},".rbc-date-cell a:hover":{color:"#1890ff"},".rbc-date-cell .rbc-date-solar":{fontWeight:500},".rbc-date-cell .rbc-date-lunar":{paddingLeft:"12px"},".rbc-date-cell:not(.rbc-off-range) .rbc-date-lunar":{color:"#aaa"},".rbc-date-cell .rbc-date-lunar:hover":{color:"inherit"},".rbc-row-bg":{display:"flex",flexDirection:"row",flex:"1 0 0",overflow:"hidden"},".rbc-day-bg":{flex:"1 0 0%",margin:"0 4px","&:hover":{background:e.colorFillQuaternary}},".rbc-agenda-view":{display:"flex",flexDirection:"column",flex:"1 0 0",overflow:"auto"},".rbc-agenda-view table.rbc-agenda-table":{width:"100%",border:"1px solid #f0f0f0",borderSpacing:"0",borderCollapse:"collapse"},".rbc-agenda-view table.rbc-agenda-table tbody > tr > td":{padding:"5px 10px",verticalAlign:"top"},".rbc-agenda-view table.rbc-agenda-table .rbc-agenda-time-cell":{paddingLeft:"15px",paddingRight:"15px",textTransform:"lowercase"},".rbc-agenda-view table.rbc-agenda-table tbody > tr > td + td":{borderLeft:"1px solid #f0f0f0"},".rbc-rtl .rbc-agenda-view table.rbc-agenda-table tbody > tr > td + td":{borderLeftWidth:"0",borderRight:"1px solid #f0f0f0"},".rbc-agenda-view table.rbc-agenda-table tbody > tr + tr":{borderTop:"1px solid #f0f0f0"},".rbc-agenda-view table.rbc-agenda-table thead > tr > th":{padding:"3px 5px",textAlign:"left",borderBottom:"1px solid #f0f0f0"},".rbc-rtl .rbc-agenda-view table.rbc-agenda-table thead > tr > th":{textAlign:"right"},".rbc-agenda-time-cell":{textTransform:"lowercase"},".rbc-agenda-time-cell .rbc-continues-after:after":{content:"' »'"},".rbc-agenda-time-cell .rbc-continues-prior:before":{content:"'« '"},".rbc-agenda-date-cell,\n.rbc-agenda-time-cell":{whiteSpace:"nowrap"},".rbc-agenda-event-cell":{width:"100%"},".rbc-time-column":{display:"flex",flexDirection:"column",minHeight:"100%"},".rbc-time-column .rbc-timeslot-group":{flex:1},".rbc-timeslot-group":{borderBottom:"1px solid #f0f0f0",minHeight:"40px",lineHeight:"39px",display:"flex",flexFlow:"column nowrap","&:hover":{background:"#f0f0f0"}},".rbc-time-gutter,\n.rbc-header-gutter":{flex:"none"},".rbc-label":{padding:"0 5px"},".rbc-day-slot":{position:"relative"},".rbc-day-slot .rbc-events-container":{bottom:"0",left:"0",position:"absolute",right:"0",marginRight:"10px",top:"0"},".rbc-day-slot .rbc-events-container.rbc-rtl":{left:"10px",right:"0"},".rbc-day-slot .rbc-event":{border:"1px solid #265985",display:"flex",maxHeight:"100%",minHeight:"20px",flexFlow:"column wrap",alignItems:"flex-start",overflow:"hidden",position:"absolute"},".rbc-day-slot .rbc-event-label":{flex:"none",paddingRight:"5px",width:"auto"},".rbc-day-slot .rbc-event-content":{width:"100%",flex:"1 1 0",wordWrap:"break-word",lineHeight:1,height:"100%",minHeight:"1em"},".rbc-time-header-gutter":{lineHeight:"40px"},".rbc-time-header-cell":{minHeight:"32px !important"},".rbc-time-header-cell .rbc-header":{display:"flex"},".rbc-time-header-cell .rbc-header.rbc-today":{borderColor:e.colorPrimaryBorder,backgroundColor:e.colorPrimaryBg,color:e.colorPrimaryText},".rbc-time-header-cell .rbc-header a":{display:"flex",flexDirection:"column"},".rbc-time-header-cell .rbc-date-wrap":{display:"flex",alignItems:"center"},".rbc-time-header-cell .rbc-date-solar":{fontSize:"18px"},".rbc-time-header-cell .rbc-date-lunar":{marginLeft:"4px"},".rbc-time-header-cell .rbc-header:not(.rbc-today) .rbc-date-lunar":{color:"#aaa"},".rbc-calendar.view-week":{".rbc-time-header-cell":{marginTop:"-32px",marginBottom:"4px"},".rbc-time-view":{paddingTop:"32px",borderTop:"0"},".rbc-header":{padding:"4px 8px"},".rbc-time-header-content":{padding:"4px 0"},".rbc-time-header-gutter":{padding:"0",paddingTop:"2px","> div":{borderTop:"2px solid #f0f0f0",padding:"0 5px"}}},".rbc-time-view-resources .rbc-time-gutter,\n.rbc-time-view-resources .rbc-time-header-gutter":{position:"sticky",left:"0",backgroundColor:"white",borderRight:"1px solid #f0f0f0",zIndex:10,marginRight:"-1px"},".rbc-time-view-resources .rbc-time-header":{overflow:"hidden"},".rbc-time-view-resources .rbc-time-header-content":{minWidth:"auto",flex:"1 0 0",flexBasis:"0px"},".rbc-time-view-resources .rbc-time-header-cell-single-day":{display:"none"},".rbc-time-view-resources .rbc-day-slot":{minWidth:"140px"},".rbc-time-view-resources .rbc-header,\n.rbc-time-view-resources .rbc-day-bg":{width:"140px",flex:"1 1 0",flexBasis:"0 px"},".rbc-time-header-content + .rbc-time-header-content":{marginLeft:"-1px"},".rbc-time-slot":{flex:"1 0 0"},".rbc-time-slot.rbc-now":{fontWeight:"bold"},".rbc-day-header":{textAlign:"center"},".rbc-slot-selection":{zIndex:10,position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",fontSize:"75%",width:"100%",padding:"3px"},".rbc-slot-selecting":{cursor:"move"},".rbc-time-view":{display:"flex",flexDirection:"column",flex:1,width:"100%",borderTop:"1px solid #f0f0f0",minHeight:"0"},".rbc-time-view .rbc-time-gutter":{whiteSpace:"nowrap"},".rbc-time-view .rbc-allday-cell":{boxSizing:"content-box",width:"100%",height:"100%",position:"relative"},".rbc-time-view .rbc-allday-cell + .rbc-allday-cell":{borderLeft:"1px solid #f0f0f0"},".rbc-time-view .rbc-allday-events":{position:"relative",zIndex:4},".rbc-time-view .rbc-row":{boxSizing:"border-box",minHeight:"20px"},".rbc-time-header":{display:"flex",flex:"0 0 auto",flexDirection:"row"},".rbc-time-header.rbc-overflowing":{borderRight:"1px solid #f0f0f0"},".rbc-rtl .rbc-time-header.rbc-overflowing":{borderRightWidth:"0",borderLeft:"1px solid #f0f0f0"},".rbc-time-header > .rbc-row:first-child":{borderBottom:"1px solid #f0f0f0"},".rbc-time-header > .rbc-row.rbc-row-resource":{borderBottom:"1px solid #f0f0f0"},".rbc-time-header-cell-single-day":{display:"none"},".rbc-time-header-content":{flex:1,minWidth:"0",flexDirection:"column"},".rbc-rtl .rbc-time-header-content":{borderLeftWidth:"0",borderRight:"1px solid #f0f0f0"},".rbc-time-header-content > .rbc-row.rbc-row-resource":{borderBottom:"1px solid #f0f0f0",flexShrink:0},".rbc-time-content":{display:"flex",flex:"1 0 0%",alignItems:"flex-start",width:"100%",borderTop:"1px solid #f0f0f0",overflowY:"auto",position:"relative"},".rbc-time-content > .rbc-time-gutter":{flex:"none"},".rbc-rtl .rbc-time-content > * + * > *":{borderLeftWidth:"0",borderRight:"1px solid #f0f0f0"},".rbc-time-content > .rbc-day-slot":{width:"100%",userSelect:"none",WebkitUserSelect:"none"},".rbc-current-time-indicator":{position:"absolute",zIndex:3,left:"0",right:"0",height:"1px",backgroundColor:"#74ad31",pointerEvents:"none"},"@media only screen and (max-width: 800px)":{".view-type-calendar .action-buttons":{position:"relative !important",left:"0 !important",".filter-action-button":{left:"0 !important"}},".rbc-toolbar .rbc-toolbar-label":{position:"absolute",top:"28px",left:"50%",transform:"translateX(-50%)"},".rbc-toolbar":{justifyContent:"space-between !important"},".rbc-header":{padding:"4px !important"}}}}}),RD=["month","week","day"],VD=kD(Pe),wf=b.createContext({close:()=>{}});function HD(e){const t=K.useFieldSchema(),r=b.useMemo(()=>t.reduceProperties((n,a)=>a["x-component"].endsWith(".ActionBar")?a:n,null),[]);return P.jsx(Nr.Provider,{value:e,children:P.jsx(K.RecursionField,{name:r.name,schema:r})})}const BD=(e,t,r,n)=>{const{t:a}=Xe();return b.useMemo(()=>{if(!Array.isArray(e))return[];const i=[];return e.forEach(o=>{const{cron:s,exclude:l=[]}=o,u=Pe(ea(o,t.start)||Pe()),f=Pe(ea(o,t.end)||u).diff(u,"millisecond",!0),d=Pe(r);let h=d.clone().startOf("month"),p=h.clone().endOf("month");n==="month"&&(h=h.startOf("week"),p=p.endOf("week"));const m=(v=u.clone())=>{if(v.isBefore(u)||!v.isBetween(h,p))return;let g=!1;if(l==null?void 0:l.some(O=>O.endsWith("_after")?(O=O.replace(/_after$/,""),g=!0,v.isSameOrAfter(O)):v.isSame(O)))return g;const S={id:ea(o,t.id||"id"),title:ea(o,t.title)||a("Untitle"),start:v.toDate(),end:v.add(f,"millisecond").toDate()};i.push(S)};if(s==="every_week"){const v=u.clone().year(h.year()).month(h.month()).date(h.date()).day(u.day());for(;v.isBefore(p)&&!m(v.clone());)v.add(1,"week")}else if(s==="every_month")m(u.clone().year(d.year()).month(d.month()));else if(s==="every_year")m(u.clone().year(d.year()));else{if(m(),!s)return;try{const v=qh.parseExpression(s,{startDate:h.toDate(),endDate:p.toDate(),iterator:!0,currentDate:u.toDate(),utc:!0});for(;v.hasNext();){const{value:g}=v.next();if(m(Pe(g.toDate())))break}}catch(v){console.error(v)}}}),i},[e,t,r,n])},UD=e=>{const{visible:t,setVisible:r,record:n}=e,a=x.useCollectionParentRecordData(),i=K.useFieldSchema(),o=b.useMemo(()=>i.reduceProperties((l,u)=>u["x-component"].endsWith(".Event")?u:l,null),[]),s=b.useCallback(()=>{r(!1)},[]);return o&&P.jsx(wf.Provider,{value:{close:s},children:P.jsx(x.ActionContextProvider,{value:{visible:t,setVisible:r},children:P.jsx(x.RecordProvider,{record:n,parent:a,children:P.jsx(K.RecursionField,{schema:o,name:o.name})})})})},yt=x.withDynamicSchemaProps(K.observer(e=>{const{dataSource:t,fieldNames:r,showLunar:n,fixedBlock:a}=x.useProps(e),[i,o]=b.useState(new Date),[s,l]=b.useState("month"),u=BD(t,r,i,s),[c,f]=b.useState(!1),[d,h]=b.useState({}),{wrapSSR:p,hashId:m,componentCls:v}=WD(),g=b.useMemo(()=>({toolbar:S=>P.jsx(HD,ut(de({},S),{showLunar:n})),month:{dateHeader:S=>P.jsx(LD,ut(de({},S),{showLunar:n}))}}),[n]),w={allDay:"",previous:P.jsx("div",{children:P.jsx(ct.LeftOutlined,{})}),next:P.jsx("div",{children:P.jsx(ct.RightOutlined,{})}),today:Ve("Today"),month:Ve("Month"),week:Ve("Week"),work_week:Ve("Work week"),day:Ve("Day"),agenda:Ve("Agenda"),date:Ve("Date"),time:Ve("Time"),event:Ve("Event"),noEventsInRange:Ve("None"),showMore:S=>Ve("{{count}} more items",{count:S})};return p(P.jsxs("div",{className:`${m} ${v}`,style:{height:a?"100%":700},children:[P.jsx(yf,{}),P.jsx(UD,{visible:c,setVisible:f,record:d}),P.jsx(xD,{popup:!0,selectable:!0,events:u,view:s,views:RD,date:i,step:60,showMultiDayTimes:!0,messages:w,onNavigate:o,onView:l,onSelectSlot:S=>{console.log("onSelectSlot",S)},onDoubleClickEvent:()=>{console.log("onDoubleClickEvent")},onSelectEvent:S=>{const O=t==null?void 0:t.find(y=>y[r.id]===S.id);O&&(O.__event=ut(de({},S),{start:Ro(Pe(S.start)),end:Ro(Pe(S.end))}),h(O),f(!0))},formats:{monthHeaderFormat:"YYYY-M",agendaDateFormat:"M-DD",dayHeaderFormat:"YYYY-M-DD",dayRangeHeaderFormat:({start:S,end:O},y,T)=>pf.eq(S,O,"month")?T.format(S,"YYYY-M",y):`${T.format(S,"YYYY-M",y)} - ${T.format(O,"YYYY-M",y)}`},components:g,localizer:VD})]}))},{displayName:"Calendar"})),YD=()=>{const{name:e,title:t}=x.useCollection(),r=x.useSchemaTemplate();return P.jsx(x.GeneralSchemaDesigner,{schemaSettings:"blockSettings:calendar",template:r,title:t||e})},{Text:qD}=Ee.Typography,GD=K.observer(()=>{var w;const{visible:e,setVisible:t}=x.useActionContext(),g=x.useRecord(),{exclude:r=[],cron:n}=g,a=qo(g,["exclude","cron"]),{close:i}=b.useContext(wf),o=Ro(Pe((w=a.__parent)==null?void 0:w.__event.start)),s=x.useFilterByTk(),{resource:l,service:u,__parent:c}=x.useBlockRequestContext(),[f,d]=b.useState(o),[h,p]=b.useState(!1),m=()=>Fr(this,null,function*(){var S,O,y;p(!0),f==="all"||!n?yield l.destroy({filterByTk:s}):yield l.update({filterByTk:s,values:{exclude:(r||[]).concat(f)}}),p(!1),(O=(S=c==null?void 0:c.service)==null?void 0:S.refresh)==null||O.call(S),(y=u==null?void 0:u.refresh)==null||y.call(u),t==null||t(!1,!0),i()}),{t:v}=Xe();return Re.createPortal(P.jsx(Ee.Modal,{title:n?v("Delete events"):null,open:e,onCancel:()=>t(!1),onOk:()=>m(),confirmLoading:h,children:n?P.jsx(Ee.Radio.Group,{value:f,onChange:S=>d(S.target.value),children:P.jsxs(Ee.Space,{direction:"vertical",children:[P.jsx(Ee.Radio,{value:o,children:v("This event")}),P.jsx(Ee.Radio,{value:`${o}_after`,children:v("This and following events")}),P.jsx(Ee.Radio,{value:"all",children:v("All events")})]})}):P.jsx(qD,{strong:!0,style:{fontSize:"18px"},children:v("Delete this event?")})}),document.body)},{displayName:"DeleteEvent"}),ZD=K.observer(e=>P.jsx(P.Fragment,{children:e.children}),{displayName:"Event"}),KD=K.observer(()=>{const{DesignableBar:e}=x.useDesignable(),{onNavigate:t}=b.useContext(Nr);return P.jsxs(Ee.Button.Group,{children:[P.jsx(Ee.Button,{icon:P.jsx(ct.LeftOutlined,{}),onClick:()=>t(ge.PREVIOUS)}),P.jsx(Ee.Button,{icon:P.jsx(ct.RightOutlined,{}),onClick:()=>t(ge.NEXT)}),P.jsx(e,{})]})},{displayName:"Nav"}),XD=K.observer(()=>{const{DesignableBar:e}=x.useDesignable(),{date:t,view:r,label:n,showLunar:a}=b.useContext(Nr),i=b.useMemo(()=>{if(!(!a||r!=="day"))return P.jsx("span",{children:bf(t)})},[r,t,a]);return P.jsxs(Ee.Button.Group,{style:{fontSize:"1.75em",fontWeight:300},children:[P.jsx("span",{children:n}),P.jsx("span",{style:{marginLeft:"4px"},children:i}),P.jsx(e,{})]})},{displayName:"Title"}),JD=K.observer(e=>{const{DesignableBar:t}=x.useDesignable(),{onNavigate:r}=b.useContext(Nr),{t:n}=Xe();return P.jsxs(Ee.Button,{onClick:()=>{r(ge.TODAY)},children:[n("Today"),P.jsx(t,{})]})},{displayName:"Today"}),QD=K.observer(e=>{const{DesignableBar:t}=x.useDesignable(),{views:r,view:n,onView:a,localizer:{messages:i}}=b.useContext(Nr);return P.jsxs("div",{className:"ant-btn-group",children:[P.jsx(Ee.Select,{popupMatchSelectWidth:!1,value:n,onChange:a,children:r.map(o=>P.jsx(Ee.Select.Option,{value:o,children:i[o]},o))}),P.jsx(t,{})]})},{displayName:"ViewSelect"});yt.ActionBar=x.ActionBar,yt.Event=ZD,yt.DeleteEvent=GD,yt.Title=XD,yt.Today=JD,yt.Nav=KD,yt.ViewSelect=QD,yt.Designer=YD;const eE=yt;function Sf(e){const t=b.useMemo(()=>{var i,o;const r=[],n=(i=e.fieldNames)==null?void 0:i.start,a=(o=e.fieldNames)==null?void 0:o.end;return Array.isArray(n)&&n.length>=2&&r.push(n[0]),Array.isArray(a)&&a.length>=2&&r.push(a[0]),r},[e.fieldNames]);return b.useMemo(()=>ut(de({},e.params),{appends:[...t,...e.params.appends||[]],paginate:!1}),[t,e.params])}const Vo=b.createContext({});Vo.displayName="CalendarBlockContext";const tE=e=>{var s,l,u;const{fieldNames:t,showLunar:r}=e,n=K.useField(),{resource:a,service:i}=x.useBlockRequestContext(),{filter:o}=x.useParsedFilter({filterOption:(l=(s=i==null?void 0:i.params)==null?void 0:s[0])==null?void 0:l.filter});return b.useEffect(()=>{var c;Lr.isEmpty(o)||i==null||i.run(ut(de({},(c=i==null?void 0:i.params)==null?void 0:c[0]),{filter:o}))},[JSON.stringify(o)]),P.jsx(x.FixedBlockWrapper,{children:P.jsx(Vo.Provider,{value:{field:n,service:i,resource:a,fieldNames:t,showLunar:r,fixedBlock:(u=n==null?void 0:n.decoratorProps)==null?void 0:u.fixedBlock},children:e.children})})},rE=e=>K.useFieldSchema()["x-use-decorator-props"]?e.params:Sf(e),nE=x.withDynamicSchemaProps(e=>{const t=rE(e);return P.jsx(x.BlockProvider,ut(de({name:"calendar"},e),{params:t,children:P.jsx(tE,de({},e))}))}),Pn=()=>b.useContext(Vo),aE=()=>{var r;const e=Pn(),t=K.useField();return b.useEffect(()=>{var n,a,i;(n=e==null?void 0:e.service)!=null&&n.loading||(t.componentProps.dataSource=(i=(a=e==null?void 0:e.service)==null?void 0:a.data)==null?void 0:i.data)},[(r=e==null?void 0:e.service)==null?void 0:r.loading]),{fieldNames:e.fieldNames,showLunar:e.showLunar,fixedBlock:e.fixedBlock}},iE=()=>{const e=K.useField(),{t}=Xe(),r=K.useFieldSchema(),{dn:n}=x.useDesignable();return P.jsx(x.SchemaSettingsSwitchItem,{title:t("Show lunar"),checked:e.decoratorProps.showLunar,onChange:a=>{e.decoratorProps.showLunar=a,r["x-decorator-props"].showLunar=a,n.emit("patch",{schema:{"x-uid":r["x-uid"],"x-decorator-props":e.decoratorProps}}),n.refresh()}})},oE=new x.SchemaSettings({name:"blockSettings:calendar",items:[{name:"title",Component:x.SchemaSettingsBlockTitleItem},{name:"titleField",Component:x.SchemaSettingsSelectItem,useComponentProps(){var u;const{t:e}=Xe(),t=K.useFieldSchema(),r=((u=t==null?void 0:t["x-decorator-props"])==null?void 0:u.fieldNames)||{},{service:n}=Pn(),{getCollectionFieldsOptions:a}=x.useCollectionManager_deprecated(),{name:i,title:o}=x.useCollection(),s=K.useField(),{dn:l}=x.useDesignable();return{title:e("Title field"),value:r.title,options:a(i,"string"),onChange:c=>{const f=s.decoratorProps.fieldNames||{};f.title=c,s.decoratorProps.params=f,t["x-decorator-props"].params=f,t["x-decorator-props"].fieldNames=f,n.refresh(),l.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":s.decoratorProps}}),l.refresh()}}}},{name:"showLunar",Component:iE},{name:"fixBlock",Component:x.FixedBlockDesignerItem},{name:"startDateField",Component:x.SchemaSettingsCascaderItem,useComponentProps(){var l;const{getCollectionFieldsOptions:e}=x.useCollectionManager_deprecated(),{t}=Xe(),r=K.useFieldSchema(),n=((l=r==null?void 0:r["x-decorator-props"])==null?void 0:l.fieldNames)||{},a=K.useField(),{dn:i}=x.useDesignable(),{service:o}=Pn(),{name:s}=x.useCollection();return{title:t("Start date field"),value:n.start,options:e(s,"date",{association:["o2o","obo","oho","m2o"]}),onChange:u=>{const c=a.decoratorProps.fieldNames||{};c.start=u,a.decoratorProps.fieldNames=c,r["x-decorator-props"].fieldNames=c,o.refresh(),i.emit("patch",{schema:{"x-uid":r["x-uid"],"x-decorator-props":a.decoratorProps}}),i.refresh()}}}},{name:"endDateField",Component:x.SchemaSettingsCascaderItem,useComponentProps(){var l;const{t:e}=Xe(),t=K.useFieldSchema(),r=K.useField(),{service:n}=Pn(),{getCollectionFieldsOptions:a}=x.useCollectionManager_deprecated(),{dn:i}=x.useDesignable(),{name:o}=x.useCollection(),s=((l=t==null?void 0:t["x-decorator-props"])==null?void 0:l.fieldNames)||{};return{title:e("End date field"),value:s.end,options:a(o,"date",{association:["o2o","obo","oho","m2o"]}),onChange:u=>{const c=r.decoratorProps.fieldNames||{};c.end=u,r.decoratorProps.fieldNames=c,t["x-decorator-props"].fieldNames=c,n.refresh(),i.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":r.decoratorProps}}),i.refresh()}}}},{name:"dataScope",Component:x.SchemaSettingsDataScope,useComponentProps(){var o,s;const{name:e}=x.useCollection(),t=K.useFieldSchema(),{form:r}=x.useFormBlockContext(),n=K.useField(),{service:a}=Pn(),{dn:i}=x.useDesignable();return{collectionName:e,defaultFilter:((s=(o=t==null?void 0:t["x-decorator-props"])==null?void 0:o.params)==null?void 0:s.filter)||{},form:r,onSubmit:({filter:l})=>{var c;l=x.removeNullCondition(l);const u=n.decoratorProps.params||{};u.filter=l,n.decoratorProps.params=u,t["x-decorator-props"].params=u,a.run(ut(de({},(c=a==null?void 0:a.params)==null?void 0:c[0]),{filter:l})),i.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":n.decoratorProps}})}}}},{name:"divider",type:"divider"},{name:"template",Component:x.SchemaSettingsTemplate,useComponentProps(){var n,a;const{name:e}=x.useCollection(),t=K.useFieldSchema(),r=((n=t==null?void 0:t["x-decorator-props"])==null?void 0:n.resource)||((a=t==null?void 0:t["x-decorator-props"])==null?void 0:a.association);return{componentName:"Calendar",collectionName:e,resourceName:r}}},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]});V("Calendar collection"),V("Repeats"),V("Daily"),V("Weekly"),V("Monthly"),V("Yearly"),x.getConfigurableProperties("title","name","inherits","category","description","presetFields");class sE extends x.CollectionTemplate{constructor(){super(...arguments);kt(this,"name","calendar");kt(this,"title",V("Calendar collection"));kt(this,"order",2);kt(this,"color","orange");kt(this,"default",{createdBy:!0,updatedBy:!0,createdAt:!0,updatedAt:!0,sortable:!0,fields:[{name:"cron",type:"string",uiSchema:{type:"string",title:V("Repeats"),"x-component":"CronSet","x-component-props":"allowClear",enum:[{label:V("Daily"),value:"0 0 0 * * ?"},{label:V("Weekly"),value:"every_week"},{label:V("Monthly"),value:"every_month"},{label:V("Yearly"),value:"every_year"}]},interface:"select"},{name:"exclude",type:"json"}]});kt(this,"availableFieldInterfaces",{include:[]});kt(this,"configurableProperties",x.getConfigurableProperties("title","name","inherits","category","description","presetFields"))}}const Of=new x.CompatibleSchemaInitializer({title:V("Configure actions"),icon:"SettingOutlined",name:"CalendarActionInitializers",style:{marginLeft:8},items:[{type:"itemGroup",name:"enableActions",title:V("Enable actions"),children:[{name:"today",title:V("Today"),Component:"ActionInitializer",schema:{title:V("Today"),"x-component":"CalendarV2.Today","x-action":"calendar:today","x-align":"left"}},{name:"turnPages",title:V("Turn pages"),Component:"ActionInitializer",schema:{title:V("Turn pages"),"x-component":"CalendarV2.Nav","x-action":"calendar:nav","x-align":"left"}},{name:"title",title:V("Title"),Component:"ActionInitializer",schema:{title:V("Title"),"x-component":"CalendarV2.Title","x-action":"calendar:title","x-align":"left"}},{name:"selectView",title:V("Select view"),Component:"ActionInitializer",schema:{title:V("Select view"),"x-component":"CalendarV2.ViewSelect","x-action":"calendar:viewSelect","x-align":"right","x-designer":"Action.Designer"}},{name:"filter",title:V("Filter"),Component:"FilterActionInitializer",schema:{"x-align":"right"}},{name:"addNew",title:V("Add new"),Component:"CreateActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0}},useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}}]}]}),lE=new x.CompatibleSchemaInitializer({title:V("Configure actions"),icon:"SettingOutlined",name:"calendar:configureActions",style:{marginLeft:8},items:[{type:"itemGroup",name:"enableActions",title:V("Enable actions"),children:[{name:"today",title:V("Today"),Component:"ActionInitializer",schema:{title:V("Today"),"x-component":"CalendarV2.Today","x-action":"calendar:today","x-align":"left"}},{name:"turnPages",title:V("Turn pages"),Component:"ActionInitializer",schema:{title:V("Turn pages"),"x-component":"CalendarV2.Nav","x-action":"calendar:nav","x-align":"left"}},{name:"title",title:V("Title"),Component:"ActionInitializer",schema:{title:V("Title"),"x-component":"CalendarV2.Title","x-action":"calendar:title","x-align":"left"}},{name:"selectView",title:V("Select view"),Component:"ActionInitializer",schema:{title:V("Select view"),"x-component":"CalendarV2.ViewSelect","x-action":"calendar:viewSelect","x-align":"right","x-designer":"Action.Designer"}},{name:"filter",title:V("Filter"),Component:"FilterActionInitializer",schema:{"x-align":"right"}},{name:"addNew",title:V("Add new"),Component:"CreateActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0}},useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}}]}]},Of),Tf={name:"deleteEvent",title:V("Delete Event"),Component:"DeleteEventActionInitializer",schema:{"x-component":"Action","x-decorator":"ACLActionProvider"},useVisible(){return x.useCollection_deprecated().template==="calendar"}},uE=new x.SchemaInitializer({title:V("Configure actions"),name:"CalendarFormActionInitializers",icon:"SettingOutlined",style:{marginLeft:8},items:[{type:"itemGroup",name:"enableActions",title:V("Enable actions"),children:[{name:"edit",title:V("Edit"),Component:"UpdateActionInitializer",schema:{"x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{type:"primary"}},useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}},{name:"delete",title:V("Delete"),Component:"DestroyActionInitializer",schema:{"x-component":"Action","x-decorator":"ACLActionProvider"},visible:function(){const t=x.useCollection_deprecated();return(t.template!=="view"||(t==null?void 0:t.writableView))&&t.template!=="sql"}},Tf]},{name:"divider",type:"divider"},{type:"subMenu",name:"customize",title:V("Customize"),children:[{name:"popup",title:V("Popup"),Component:"CustomizeActionInitializer",schema:{type:"void",title:V("Popup"),"x-action":"customize:popup","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:popup","x-component":"Action","x-component-props":{openMode:"drawer"},properties:{drawer:{type:"void",title:V("Popup"),"x-component":"Action.Container","x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"TabPaneInitializers",properties:{tab1:{type:"void",title:V("Details"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock",properties:{}}}}}}}}}}},{name:"updateRecord",title:V("Update record"),Component:"CustomizeActionInitializer",schema:{title:V("Update record"),"x-component":"Action","x-use-component-props":"useCustomizeUpdateActionProps","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:updateRecord","x-acl-action":"update","x-action":"customize:update","x-action-settings":{assignedValues:{},onSuccess:{manualClose:!0,redirecting:!1,successMessage:V("Updated successfully")},triggerWorkflows:[]}},useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}},{name:"customRequest",title:V("Custom request"),Component:"CustomRequestInitializer",useVisible(){const e=x.useCollection_deprecated();return(e.template!=="view"||(e==null?void 0:e.writableView))&&e.template!=="sql"}}]}]}),Ho=e=>{const{collectionName:t,dataSource:r,fieldNames:n,association:a}=e;return{type:"void","x-acl-action":`${a||t}:list`,"x-decorator":"CalendarBlockProvider","x-use-decorator-props":"useCalendarBlockDecoratorProps","x-decorator-props":{collection:t,dataSource:r,association:a,action:"list",fieldNames:de({id:"id"},n),params:{paginate:!1}},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:calendar","x-component":"CardItem",properties:{[Ff.uid()]:{type:"void","x-component":"CalendarV2","x-use-component-props":"useCalendarBlockProps",properties:{toolBar:{type:"void","x-component":"CalendarV2.ActionBar","x-component-props":{style:{marginBottom:24}},"x-initializer":"calendar:configureActions"},event:{type:"void","x-component":"CalendarV2.Event",properties:{drawer:{type:"void","x-component":"Action.Drawer","x-component-props":{className:"nb-action-popup"},title:V("View record"),properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"TabPaneInitializers","x-initializer-props":{gridInitializer:"popup:common:addBlock"},properties:{tab1:{type:"void",title:V("Details"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer-props":{actionInitializers:"details:configureActions"},"x-initializer":"popup:common:addBlock"}}}}}}}}}}}}}},cE=({filterCollections:e,onlyCurrentDataSource:t,hideSearch:r,createBlockSchema:n,showAssociationFields:a})=>{const{insert:i}=x.useSchemaInitializer(),{t:o}=Xe(),{getCollectionField:s,getCollectionFieldsOptions:l}=x.useCollectionManager_deprecated(),u=b.useContext(K.SchemaOptionsContext),{theme:c}=x.useGlobalTheme(),f=x.useSchemaInitializerItem();return P.jsx(x.DataBlockInitializer,ut(de({},f),{componentType:"Calendar",icon:P.jsx(ct.FormOutlined,{}),onCreateBlockSchema:h=>Fr(this,[h],function*({item:d}){if(n)return n({item:d});const p=l(d.name,"string",{dataSource:d.dataSource}),m=l(d.name,"date",{association:["o2o","obo","oho","m2o"],dataSource:d.dataSource}),v=yield x.FormDialog(o("Create calendar block"),()=>P.jsx(x.SchemaComponentOptions,{scope:u.scope,components:de({},u.components),children:P.jsx(Wa.FormLayout,{layout:"vertical",children:P.jsx(x.SchemaComponent,{schema:{properties:{title:{title:o("Title field"),enum:p,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:o("Start date field"),enum:m,required:!0,default:s(`${d.name}.createdAt`)?"createdAt":null,"x-component":"Cascader","x-decorator":"FormItem"},end:{title:o("End date field"),enum:m,"x-component":"Cascader","x-decorator":"FormItem"}}}})})}),c).open({initialValues:{}});i(Ho({collectionName:d.name,dataSource:d.dataSource,fieldNames:de({},v)}))}),onlyCurrentDataSource:t,hideSearch:r,filter:e,showAssociationFields:a}))},fE=()=>{const e=x.useSchemaInitializerItem(),p=e,{onCreateBlockSchema:t,componentType:r,createBlockSchema:n}=p,a=qo(p,["onCreateBlockSchema","componentType","createBlockSchema"]),{insert:i}=x.useSchemaInitializer(),{getTemplateSchemaByMode:o}=x.useSchemaTemplateManager(),{t:s}=Xe(),l=b.useContext(K.SchemaOptionsContext),{getCollection:u}=x.useCollectionManager_deprecated(),c=e.field,f=u(c.target),d=`${c.collectionName}.${c.name}`,{theme:h}=x.useGlobalTheme();return P.jsx(x.SchemaInitializerItem,ut(de({icon:P.jsx(ct.TableOutlined,{})},a),{onClick:v=>Fr(this,[v],function*({item:m}){var g,w,S,O;if(m.template){const y=yield o(m);i(y)}else{const y=(w=(g=f==null?void 0:f.fields)==null?void 0:g.filter(E=>E.type==="string"))==null?void 0:w.map(E=>{var C;return{label:(C=E==null?void 0:E.uiSchema)==null?void 0:C.title,value:E.name}}),T=(O=(S=f==null?void 0:f.fields)==null?void 0:S.filter(E=>E.type==="date"))==null?void 0:O.map(E=>{var C;return{label:(C=E==null?void 0:E.uiSchema)==null?void 0:C.title,value:E.name}}),D=yield x.FormDialog(s("Create calendar block"),()=>P.jsx(x.SchemaComponentOptions,{scope:l.scope,components:de({},l.components),children:P.jsx(Wa.FormLayout,{layout:"vertical",children:P.jsx(x.SchemaComponent,{schema:{properties:{title:{title:s("Title field"),enum:y,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:s("Start date field"),enum:T,required:!0,default:"createdAt","x-component":"Select","x-decorator":"FormItem"},end:{title:s("End date field"),enum:T,"x-component":"Select","x-decorator":"FormItem"}}}})})}),h).open({initialValues:{}});i(Ho({association:d,dataSource:m.dataSource,fieldNames:de({},D)}))}}),items:x.useRecordCollectionDataSourceItems("Calendar",e,c.target,d)}))};function dE(){const{insert:e}=x.useSchemaInitializer(),{getCollection:t}=x.useCollectionManager_deprecated(),{t:r}=Xe(),n=b.useContext(K.SchemaOptionsContext),{theme:a}=x.useGlobalTheme();return{createAssociationCalendarBlock:s=>Fr(this,[s],function*({item:o}){var h,p,m,v;const l=o.associationField,u=t(l.target),c=(p=(h=u==null?void 0:u.fields)==null?void 0:h.filter(g=>g.type==="string"))==null?void 0:p.map(g=>{var w;return{label:(w=g==null?void 0:g.uiSchema)==null?void 0:w.title,value:g.name}}),f=(v=(m=u==null?void 0:u.fields)==null?void 0:m.filter(g=>g.type==="date"))==null?void 0:v.map(g=>{var w;return{label:(w=g==null?void 0:g.uiSchema)==null?void 0:w.title,value:g.name}}),d=yield x.FormDialog(r("Create calendar block"),()=>P.jsx(x.SchemaComponentOptions,{scope:n.scope,components:de({},n.components),children:P.jsx(Wa.FormLayout,{layout:"vertical",children:P.jsx(x.SchemaComponent,{schema:{properties:{title:{title:r("Title field"),enum:c,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:r("Start date field"),enum:f,required:!0,default:"createdAt","x-component":"Select","x-decorator":"FormItem"},end:{title:r("End date field"),enum:f,"x-component":"Select","x-decorator":"FormItem"}}}})})}),a).open({initialValues:{}});e(Ho({association:`${l.collectionName}.${l.name}`,dataSource:o.dataSource,fieldNames:de({},d)}))})}}function hE(e){const t=Sf(e);let r;return e.association&&(r=x.useParentRecordCommon(e.association)),{params:t,parentRecord:r}}class Df extends x.Plugin{load(){return Fr(this,null,function*(){this.app.dataSourceManager.addCollectionTemplates([sE]),this.app.schemaInitializerManager.addItem("page:addBlock","dataBlocks.calendar",{title:V("Calendar"),Component:"CalendarBlockInitializer"}),this.app.schemaInitializerManager.addItem("popup:common:addBlock","dataBlocks.calendar",{title:V("Calendar"),Component:"CalendarBlockInitializer",useVisible(){const t=x.useCollection();return b.useMemo(()=>t.fields.some(r=>x.canMakeAssociationBlock(r)&&["hasMany","belongsToMany"].includes(r.type)),[t.fields])},useComponentProps(){const{createAssociationCalendarBlock:t}=dE();return{onlyCurrentDataSource:!0,filterCollections({associationField:r}){return r?["hasMany","belongsToMany"].includes(r.type):!1},createBlockSchema:t,showAssociationFields:!0,hideSearch:!0}}}),this.app.addComponents({CalendarBlockProvider:nE,CalendarBlockInitializer:cE,RecordAssociationCalendarBlockInitializer:fE,CalendarV2:eE}),this.app.addScopes({useCalendarBlockProps:aE,useCalendarBlockDecoratorProps:hE}),this.schemaSettingsManager.add(oE),this.app.schemaInitializerManager.add(Of),this.app.schemaInitializerManager.add(lE),this.app.schemaInitializerManager.add(uE),this.app.schemaInitializerManager.get("details:configureActions").add("enableActions.deleteEvent",Tf)})}}R.PluginCalendarClient=Df,R.default=Df,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "0.21.0-alpha.
|
|
2
|
+
"@nocobase/client": "0.21.0-alpha.2",
|
|
3
3
|
"react": "18.2.0",
|
|
4
4
|
"react-i18next": "11.18.6",
|
|
5
|
-
"@nocobase/server": "0.21.0-alpha.
|
|
6
|
-
"@nocobase/test": "0.21.0-alpha.
|
|
5
|
+
"@nocobase/server": "0.21.0-alpha.2",
|
|
6
|
+
"@nocobase/test": "0.21.0-alpha.2",
|
|
7
7
|
"@ant-design/icons": "5.2.6",
|
|
8
8
|
"@formily/react": "2.3.0",
|
|
9
9
|
"dayjs": "1.11.10",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-calendar",
|
|
3
|
-
"version": "0.21.0-alpha.
|
|
3
|
+
"version": "0.21.0-alpha.2",
|
|
4
4
|
"displayName": "Calendar",
|
|
5
5
|
"displayName.zh-CN": "日历",
|
|
6
6
|
"description": "Provides callendar collection template and block for managing date data, typically for date/time related information such as events, appointments, tasks, and so on.",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
37
37
|
"directory": "packages/plugins/calendar"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "90628f2e2da846208fb2d7966ddb4e467d187ffb",
|
|
40
40
|
"keywords": [
|
|
41
41
|
"Collections",
|
|
42
42
|
"Blocks"
|