@progress/kendo-react-scheduler 9.4.0-develop.6 → 9.4.0-develop.7
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/Scheduler.js +1 -1
- package/Scheduler.mjs +0 -1
- package/components/BaseView.js +1 -1
- package/components/BaseView.mjs +0 -1
- package/components/CurrentTimeMarket.js +1 -1
- package/components/CurrentTimeMarket.mjs +0 -1
- package/components/DateHeaderCell.js +1 -1
- package/components/DateHeaderCell.mjs +14 -15
- package/components/SchedulerForm.js +1 -1
- package/components/SchedulerForm.mjs +7 -8
- package/components/SchedulerOccurrenceDialog.js +1 -1
- package/components/SchedulerOccurrenceDialog.mjs +0 -1
- package/components/SchedulerRemoveDialog.js +1 -1
- package/components/SchedulerRemoveDialog.mjs +6 -7
- package/components/ShowMoreItemsButton.js +1 -1
- package/components/ShowMoreItemsButton.mjs +10 -11
- package/components/TimeHeaderCell.js +1 -1
- package/components/TimeHeaderCell.mjs +9 -10
- package/components/footer/SchedulerFooter.js +1 -1
- package/components/footer/SchedulerFooter.mjs +4 -5
- package/components/footer/bussiness-hours/BussinessHours.js +1 -1
- package/components/footer/bussiness-hours/BussinessHours.mjs +8 -9
- package/components/header/SchedulerHeader.js +1 -1
- package/components/header/SchedulerHeader.mjs +5 -6
- package/components/header/navigation/NavigationDatePicker.js +1 -1
- package/components/header/navigation/NavigationDatePicker.mjs +10 -11
- package/components/header/navigation/SchedulerNavigation.js +1 -1
- package/components/header/navigation/SchedulerNavigation.mjs +0 -1
- package/components/header/view-selector/SchedulerViewSelector.js +1 -1
- package/components/header/view-selector/SchedulerViewSelector.mjs +4 -5
- package/components/header/view-selector/ViewSelectorItem.js +1 -1
- package/components/header/view-selector/ViewSelectorItem.mjs +6 -7
- package/components/header/view-selector/ViewSelectorList.js +1 -1
- package/components/header/view-selector/ViewSelectorList.mjs +0 -1
- package/constants/index.js +1 -1
- package/constants/index.mjs +0 -1
- package/context/SchedulerContext.js +1 -1
- package/context/SchedulerContext.mjs +7 -8
- package/context/SchedulerEditItemContext.js +1 -1
- package/context/SchedulerEditItemContext.mjs +0 -1
- package/context/SchedulerEditSlotContext.js +1 -1
- package/context/SchedulerEditSlotContext.mjs +9 -10
- package/context/SchedulerEditTaskContext.js +1 -1
- package/context/SchedulerEditTaskContext.mjs +0 -1
- package/context/SchedulerResourceIteratorContext.js +1 -1
- package/context/SchedulerResourceIteratorContext.mjs +2 -3
- package/context/SchedulerViewContext.js +1 -1
- package/context/SchedulerViewContext.mjs +0 -1
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/editors/FilterableComboBox.js +1 -1
- package/editors/FilterableComboBox.mjs +3 -4
- package/editors/ResourceEditor.js +1 -1
- package/editors/ResourceEditor.mjs +2 -3
- package/editors/SchedulerFormEditor.js +1 -1
- package/editors/SchedulerFormEditor.mjs +0 -1
- package/editors/ZonedDateTime.js +1 -1
- package/editors/ZonedDateTime.mjs +21 -22
- package/hooks/use-items-focus.js +1 -1
- package/hooks/use-items-focus.mjs +0 -1
- package/hooks/use-items-selection.js +1 -1
- package/hooks/use-items-selection.mjs +14 -15
- package/hooks/use-slots-focus.js +1 -1
- package/hooks/use-slots-focus.mjs +6 -7
- package/hooks/use-slots-selection.js +1 -1
- package/hooks/use-slots-selection.mjs +0 -1
- package/hooks/useCellSync.js +1 -1
- package/hooks/useCellSync.mjs +0 -1
- package/hooks/useControlledState.js +1 -1
- package/hooks/useControlledState.mjs +4 -5
- package/hooks/useEditable.js +1 -1
- package/hooks/useEditable.mjs +4 -5
- package/hooks/useRowSync.js +1 -1
- package/hooks/useRowSync.mjs +5 -6
- package/hooks/useSchedulerItem.js +1 -1
- package/hooks/useSchedulerItem.mjs +5 -6
- package/hooks/useSchedulerSlot.js +1 -1
- package/hooks/useSchedulerSlot.mjs +7 -8
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +0 -1
- package/index.js +2 -1
- package/index.mjs +14 -14
- package/items/SchedulerEditItem.js +1 -1
- package/items/SchedulerEditItem.mjs +0 -1
- package/items/SchedulerItem.js +1 -1
- package/items/SchedulerItem.mjs +90 -91
- package/items/SchedulerItemContent.js +1 -1
- package/items/SchedulerItemContent.mjs +0 -1
- package/items/SchedulerProportionalViewItem.js +1 -1
- package/items/SchedulerProportionalViewItem.mjs +0 -1
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +0 -1
- package/items/hooks/use-drag-item.js +1 -1
- package/items/hooks/use-drag-item.mjs +0 -1
- package/items/hooks/use-form-item.js +1 -1
- package/items/hooks/use-form-item.mjs +8 -9
- package/items/hooks/use-remove-item.js +1 -1
- package/items/hooks/use-remove-item.mjs +0 -1
- package/items/hooks/use-resize-item.js +1 -1
- package/items/hooks/use-resize-item.mjs +0 -1
- package/items/hooks/use-series.js +1 -1
- package/items/hooks/use-series.mjs +4 -5
- package/items/hooks/use-show-occurrence-dialog.js +1 -1
- package/items/hooks/use-show-occurrence-dialog.mjs +5 -6
- package/items/hooks/use-show-remove-item-dialog.js +1 -1
- package/items/hooks/use-show-remove-item-dialog.mjs +7 -8
- package/messages/index.js +1 -1
- package/messages/index.mjs +0 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +11 -11
- package/recurrence/RecurrenceEditor.js +1 -1
- package/recurrence/RecurrenceEditor.mjs +0 -1
- package/recurrence/RecurrenceFrequencyEditor.js +1 -1
- package/recurrence/RecurrenceFrequencyEditor.mjs +0 -1
- package/recurrence/RecurrenceRepeatOnWeekEditor.js +1 -1
- package/recurrence/RecurrenceRepeatOnWeekEditor.mjs +0 -1
- package/recurrence/common.js +1 -1
- package/recurrence/common.mjs +0 -1
- package/services/itemsService.js +1 -1
- package/services/itemsService.mjs +20 -21
- package/services/occurrenceService.js +1 -1
- package/services/occurrenceService.mjs +0 -1
- package/services/rangeService.js +1 -1
- package/services/rangeService.mjs +8 -9
- package/services/slotsService.js +1 -1
- package/services/slotsService.mjs +7 -8
- package/slots/SchedulerEditSlot.js +1 -1
- package/slots/SchedulerEditSlot.mjs +0 -1
- package/slots/SchedulerSlot.js +1 -1
- package/slots/SchedulerSlot.mjs +0 -1
- package/slots/SchedulerViewSlot.js +1 -1
- package/slots/SchedulerViewSlot.mjs +7 -8
- package/tasks/SchedulerEditTask.js +1 -1
- package/tasks/SchedulerEditTask.mjs +0 -1
- package/tasks/SchedulerTask.js +1 -1
- package/tasks/SchedulerTask.mjs +5 -6
- package/tasks/SchedulerViewTask.js +1 -1
- package/tasks/SchedulerViewTask.mjs +3 -4
- package/utils/index.js +1 -1
- package/utils/index.mjs +7 -8
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +12 -13
- package/views/common/HorizontalResourceIterator.js +1 -1
- package/views/common/HorizontalResourceIterator.mjs +0 -1
- package/views/common/SchedulerDrag.js +1 -1
- package/views/common/SchedulerDrag.mjs +0 -1
- package/views/common/SchedulerResize.js +1 -1
- package/views/common/SchedulerResize.mjs +4 -5
- package/views/common/VerticalResourceIterator.js +1 -1
- package/views/common/VerticalResourceIterator.mjs +0 -1
- package/views/common/utils.js +1 -1
- package/views/common/utils.mjs +4 -5
- package/views/day/DayView.js +1 -1
- package/views/day/DayView.mjs +3 -4
- package/views/day/DayViewAllDayRowContent.js +1 -1
- package/views/day/DayViewAllDayRowContent.mjs +4 -5
- package/views/day/DayViewGroupRowContent.js +1 -1
- package/views/day/DayViewGroupRowContent.mjs +0 -1
- package/views/day/DayViewRowContent.js +1 -1
- package/views/day/DayViewRowContent.mjs +0 -1
- package/views/day/MultiDayView.js +1 -1
- package/views/day/MultiDayView.mjs +0 -1
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +0 -1
- package/views/time/MultiDayTimelineView.js +1 -1
- package/views/time/MultiDayTimelineView.mjs +16 -17
- package/views/time/TimelineView.js +1 -1
- package/views/time/TimelineView.mjs +5 -6
- package/views/time/TimelineViewAllEventsRowContent.js +1 -1
- package/views/time/TimelineViewAllEventsRowContent.mjs +2 -3
- package/views/time/TimelineViewRowContent.js +1 -1
- package/views/time/TimelineViewRowContent.mjs +0 -1
- package/views/week/WeekView.js +1 -1
- package/views/week/WeekView.mjs +4 -5
- package/views/week/WorkWeekView.js +1 -1
- package/views/week/WorkWeekView.mjs +8 -9
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("react"),he=require("./SchedulerItem.js"),m=require("../utils/index.js"),D=require("../views/common/utils.js"),I=require("../constants/index.js"),fe=require("@progress/kendo-react-intl"),J=require("./SchedulerItemContent.js"),P=require("@progress/kendo-react-common"),H=require("@progress/kendo-svg-icons"),Q=require("../context/SchedulerViewContext.js"),ge=require("../context/SchedulerContext.js"),Se=require("../hooks/useRowSync.js");function Re(e){const w=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const S in e)if(S!=="default"){const x=Object.getOwnPropertyDescriptor(e,S);Object.defineProperty(w,S,x.get?x:{enumerable:!0,get:()=>e[S]})}}return w.default=e,Object.freeze(w)}const r=Re(me),Ie=1,U=25,X=r.forwardRef((e,w)=>{const{item:S,_ref:x,itemRef:Z,...ee}=e,M=r.useRef(),o=r.useRef(null),C=r.useRef(null),k=r.useRef(null);r.useImperativeHandle(C,()=>({props:e,element:o.current&&o.current.element})),r.useImperativeHandle(w,()=>C.current),r.useImperativeHandle(x,()=>o.current),r.useImperativeHandle(Z,()=>o.current);const te=S||Y.item,b=fe.useInternationalization(),[re]=Q.useSchedulerViewItemsContext(),[ne]=Q.useSchedulerViewSlotsContext(),_=ge.useSchedulerElementContext(),[ce,V]=r.useState(!0),[ie,oe]=r.useState(!1),W=r.useRef(0),f=r.useRef(null),g=r.useRef([]),p=P.useDir(_),B=r.useMemo(()=>e.isAllDay?b.toString(e.zonedStart,"t"):b.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd),[b,e.isAllDay,e.zonedEnd,e.zonedStart]),N=r.useMemo(()=>`(${B}): ${e.title}`,[B,e.title]),se=(c,n)=>{let i=0;return n.forEach(l=>{l._order!==void 0&&l._order!==null&&i<l._order&&(i=l._order)}),i+1},le=(c,n,i)=>{const[l,h]=n,a=new Date(Math.min(h.props.end.getTime()-i,Math.max(e.start.getTime(),l.props.start.getTime()))),R=new Date(Math.max(a.getTime()+i,Math.min(e.end.getTime(),h.props.end.getTime())));return c.filter(u=>{const E=Math.max(Math.min(h.props.end.getTime()-i,u.props.start.getTime()),l.props.start.getTime()),T=Math.min(Math.max(E+i,u.props.end.getTime()),h.props.end.getTime());return u.props.id!==e.id&&u.props.group.index===e.group.index&&u.props.range.index===e.range.index&&(e.ignoreIsAllDay||u.props.isAllDay===e.isAllDay)&&m.intersects(new Date(E),new Date(T),a,R)&&m.intersects(l.props.start,h.props.end,u.props.start,u.props.end)})},ae=(c,n)=>c.group.index===n.group.index&&c.range.index===n.range.index&&(e.ignoreIsAllDay||c.isAllDay===n.isAllDay),z=()=>{var G,L,K;const c=ne.filter(t=>t.current&&ae(t.current.props,e)).sort((t,v)=>t.current.props.start.getTime()-v.current.props.start.getTime()),n=c.filter(t=>m.intersects(t.current.props.start,t.current.props.end,e.start,e.end)),i=o.current&&o.current.element;if(!i||!n.length)return;const l=m.first(c),h=m.last(c),a=m.first(n),R=m.last(n);if(!a.current||!o.current||!R.current||!l.current||!h.current)return;if(!m.intersects(a.current.props.start,R.current.props.end,e.start,e.end)){V(!1);return}const O=[],u=[],E=[],T=D.getRect(a.current.element),A=(e.vertical?T.height:T.width)/(a.current.props.end.getTime()-a.current.props.start.getTime()),F=(e.vertical?U:8)/A,y=(Math.min(e.start.getTime(),R.current.props.end.getTime()-F)-a.current.props.start.getTime())*A,$=Math.floor(Math.min(e.end.getTime(),R.current.props.end.getTime())-Math.max(e.start.getTime(),a.current.props.start.getTime()))*A;(re||[]).forEach(t=>{t.current&&(t.current.props.dragHint?u.push(t.current):t.current.props.resizeHint?E.push(t.current):O.push(t.current))}),g.current=le(O,[l.current,h.current],F),f.current=e.resizeHint||e.dragHint?0:m.calculateProportionalOrder(o.current,g.current);let d=1;e.resizeHint||e.dragHint||(d=se(o.current,g.current),g.current.forEach(t=>{t._maxSiblingsPerSlot&&d<t._maxSiblingsPerSlot&&(d=t._maxSiblingsPerSlot)}),g.current.forEach(t=>{t._maxSiblingsPerSlot!==void 0&&t._maxSiblingsPerSlot!==null&&t._maxSiblingsPerSlot<d&&(t._maxSiblingsPerSlot=d)}));let q=0;const s=T;g.current.forEach(t=>{let v=0;t._order!==void 0&&t._order!==null&&t._order<f.current&&(v=D.getRect(t.element).top+D.getRect(t.element).height-s.top-I.BORDER_WIDTH*f.current+Ie),v>q&&(q=v)});const de=20;s.width=e.vertical?s.width/d-I.BORDER_WIDTH-de/d:$-I.BORDER_WIDTH,s.height=e.vertical?$-I.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&d<=1?s.height:e.style&&e.style.height?e.style.height:U,s.left=e.vertical?s.left+((G=f.current)!=null?G:0)+I.BORDER_WIDTH*((L=f.current)!=null?L:0)*s.width:s.left+(y<0?0:y),s.top=e.vertical?s.top+(y<0?0:y):s.top+q+I.BORDER_WIDTH*((K=f.current)!=null?K:0),W.current=d,D.setRect(i,s),oe(!0),V(!0)},j=r.useCallback(c=>{const n=c&&c[0],i=k.current;M.current!==void 0&&window.cancelAnimationFrame(M.current),i&&n&&(i.width!==n.contentRect.width||i.height!==n.contentRect.height)&&(M.current=window.requestAnimationFrame(()=>{z()})),k.current={width:n.contentRect.width,height:n.contentRect.height}},[z]);r.useEffect(z);const ue=o.current&&o.current.element?o.current.element.closest(".k-scheduler-layout"):null;return Se.useRowSync({element:ue,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),r.useEffect(()=>{if(!_.current)return;const c=window.ResizeObserver,n=c&&new c(j);return n&&n.observe(_.current),()=>{n&&n.disconnect()}},[j,_]),r.createElement(te,{...ee,_ref:o,_order:f,_maxSiblingsPerSlot:W,_siblings:g,itemRef:o,style:{visibility:ie?void 0:"hidden",display:ce?void 0:"none",...e.style}},!e.resizeHint&&r.createElement("span",{className:"k-event-actions"},e.tail&&r.createElement(P.IconWrap,{name:p==="rtl"?"caret-alt-right":"caret-alt-left",icon:p==="rtl"?H.caretAltRightIcon:H.caretAltLeftIcon}),e.isRecurring&&!e.isException&&r.createElement(P.IconWrap,{name:"reload",icon:H.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&r.createElement(P.IconWrap,{name:"non-recurrence",icon:H.nonRecurrenceIcon})),!e.resizeHint&&r.createElement("div",{title:N},!e.isAllDay&&r.createElement(J.SchedulerItemContent,{className:"k-event-time"},N),r.createElement(J.SchedulerItemContent,null,e.title)))}),Y={item:he.SchedulerItem};X.displayName="KendoReactSchedulerProportionalViewItem";exports.SchedulerProportionalViewItem=X;exports.schedulerProportionalViewItemDefaultProps=Y;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as r from "react";
|
|
10
9
|
import { SchedulerItem as ue } from "./SchedulerItem.mjs";
|
|
11
10
|
import { intersects as T, first as q, last as B, calculateProportionalOrder as me } from "../utils/index.mjs";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ne=require("react"),re=require("./SchedulerItem.js"),I=require("../utils/index.js"),_=require("../views/common/utils.js"),h=require("../constants/index.js"),ie=require("@progress/kendo-react-intl"),M=require("./SchedulerItemContent.js"),w=require("@progress/kendo-react-common"),b=require("@progress/kendo-svg-icons"),ce=require("../hooks/useRowSync.js"),le=require("../hooks/useEditable.js"),N=require("../context/SchedulerViewContext.js"),se=require("../context/SchedulerContext.js");function oe(e){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const d in e)if(d!=="default"){const S=Object.getOwnPropertyDescriptor(e,d);Object.defineProperty(f,d,S.get?S:{enumerable:!0,get:()=>e[d]})}}return f.default=e,Object.freeze(f)}const t=oe(ne),ae=1,j=t.forwardRef((e,f)=>{const{item:d,_ref:S,itemRef:$,...L}=e,E=t.useRef(),c=t.useRef(null),A=t.useRef(null),q=t.useRef(null),G=le.useEditable(e.editable);t.useImperativeHandle(A,()=>({props:e,element:c.current&&c.current.element})),t.useImperativeHandle(f,()=>A.current),t.useImperativeHandle(S,()=>c.current),t.useImperativeHandle($,()=>c.current);const K=d||F.item,y=ie.useInternationalization(),[J]=N.useSchedulerViewItemsContext(),[Q]=N.useSchedulerViewSlotsContext(),R=se.useSchedulerElementContext(),[U,v]=t.useState(!0),[X,Y]=t.useState(!1),u=t.useRef(e.order),P=t.useRef(0),T=w.useDir(R),C=t.useMemo(()=>e.isAllDay?y.toString(e.zonedStart,"t"):y.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd),[y,e.isAllDay,e.zonedEnd,e.zonedStart]),k=t.useMemo(()=>`(${C}): ${e.title}`,[C,e.title]),V=(n,r)=>{let l=1;return n.forEach(i=>{const a=r.filter(g=>D(i.current.props,g.props));a.length>l&&(l=a.length)}),l},Z=(n,r)=>n.map(i=>r.filter(a=>D(i.current.props,a.props))),D=(n,r)=>I.intersects(n.start,n.end,r.start,r.end)&&n.group.index===r.group.index&&n.range.index===r.range.index&&(e.ignoreIsAllDay||n.isAllDay===r.isAllDay),H=()=>{const n=(Q||[]).filter(s=>s.current&&D(s.current.props,e)),r=c.current&&c.current.element,l=I.first(n);if(n.length===0){v(!1);return}if(!l.current||!r)return;const i=_.getRect(l.current.element),a=[],g=[],x=[];(J||[]).forEach(s=>{s.current&&(s.current.props.dragHint?g.push(s.current):s.current.props.resizeHint?x.push(s.current):a.push(s.current))}),u.current=e.dragHint||e.resizeHint?I.calculateOrder(c.current,e.dragHint?g:x,n,e.ignoreIsAllDay):e.order||0;let m=e.dragHint||e.resizeHint?V(n,e.dragHint?g:x):V(n,a);const ee=Z(n,a);let z=0;if(ee.forEach(s=>{let O=0;s.forEach(o=>{I.intersects(o.props.start,o.props.end,e.start,e.end)&&!(e.dragHint||e.resizeHint)&&o._maxSiblingsPerSlot&&o._maxSiblingsPerSlot>m&&o.element!==r&&(m=o._maxSiblingsPerSlot);const B=_.getRect(o.element);o.props.order!==null&&o.props.order<u.current&&(O=B.top+B.height-i.top-h.BORDER_WIDTH*u.current+ae)}),O>z&&(z=O)}),n.length===0){v(!1);return}const te=G.add?20:0;i.width=e.vertical?i.width/m-h.BORDER_WIDTH-te/m:i.width*n.length-h.BORDER_WIDTH,i.height=e.vertical?i.height*n.length-h.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&m<=1?i.height:e.style&&e.style.height?e.style.height:25,i.left=e.vertical?i.left+u.current*i.width+h.BORDER_WIDTH*u.current:i.left,i.top=e.vertical?i.top:i.top+z+h.BORDER_WIDTH*u.current,P.current=m,_.setRect(r,i),Y(!0),v(!0)},W=t.useCallback(n=>{const r=n&&n[0],l=q.current;E.current!==void 0&&window.cancelAnimationFrame(E.current),l&&r&&(l.width!==r.contentRect.width||l.height!==r.contentRect.height)&&(E.current=window.requestAnimationFrame(()=>{H()})),q.current={width:r.contentRect.width,height:r.contentRect.height}},[H]);t.useEffect(H);const p=c.current&&c.current.element?c.current.element.closest(".k-scheduler-layout"):null;return ce.useRowSync({element:p,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),t.useEffect(()=>{if(!R.current)return;const n=window.ResizeObserver,r=n&&new n(W);return r&&r.observe(R.current),()=>{r&&r.disconnect()}},[W,R]),t.createElement(K,{...L,_ref:c,_maxSiblingsPerSlot:P,_order:u,itemRef:c,style:{visibility:X?void 0:"hidden",display:U?void 0:"none",...e.style}},!e.resizeHint&&t.createElement("span",{className:"k-event-actions"},e.tail&&t.createElement(w.IconWrap,{name:T==="rtl"?"caret-alt-right":"caret-alt-left",icon:T==="rtl"?b.caretAltRightIcon:b.caretAltLeftIcon}),e.isRecurring&&!e.isException&&t.createElement(w.IconWrap,{name:"arrow-rotate-cw",icon:b.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&t.createElement(w.IconWrap,{name:"arrows-no-repeat",icon:b.arrowsNoRepeatIcon})),!e.resizeHint&&t.createElement("div",{title:k},!e.isAllDay&&t.createElement(M.SchedulerItemContent,{className:"k-event-time"},k),t.createElement(M.SchedulerItemContent,null,e.title)))}),F={item:re.SchedulerItem};j.displayName="KendoReactSchedulerViewItem";exports.SchedulerViewItem=j;exports.schedulerViewItemDefaultProps=F;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
9
|
import { SchedulerItem as Z } from "./SchedulerItem.mjs";
|
|
11
10
|
import { first as p, calculateOrder as ee, intersects as k } from "../utils/index.mjs";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@progress/kendo-react-common"),w=require("react"),h=require("../../hooks/useControlledState.js"),a=require("../../utils/index.js"),_=require("../../constants/index.js"),x=require("../../context/SchedulerViewContext.js"),C=require("../../context/SchedulerContext.js");function O(e){const A=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const d in e)if(d!=="default"){const i=Object.getOwnPropertyDescriptor(e,d);Object.defineProperty(A,d,i.get?i:{enumerable:!0,get:()=>e[d]})}}return A.default=e,Object.freeze(A)}const T=O(w);var F=(e=>(e.set="DRAG_ITEM_SET",e.start="DRAG_ITEM_START",e.drag="DRAG_ITEM_DRAG",e.complete="DRAG_ITEM_COMPLETE",e.completeOccurrence="DRAG_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="DRAG_ITEM_COMPLETE_SERIES",e.reset="DRAG_ITEM_RESET",e.dragSelected="DRAG_ITEM_DRAG_SELECTED",e))(F||{});const k=(e,A)=>{const d=T.useRef(0),i=T.useRef(0),R=T.useRef(0),b=T.useRef(null),[n,c]=h.useControlledState(...A),[G]=x.useSchedulerViewSelectedItemsContext(),s=C.useSchedulerFieldsContext(),g=C.useSchedulerGroupsContext();return[n,c,l=>{switch(l.type){case"DRAG_ITEM_SET":{c(l.payload);break}case"DRAG_ITEM_RESET":{c(null);break}case"DRAG_ITEM_DRAG_SELECTED":{if(Math.abs(i.current-l.payload.x)<10&&Math.abs(R.current-l.payload.y)<10)return;const t=a.slotDive(l.payload.x,l.payload.y,7);if(!t||t===b.current)return;const r=u.clone(e.dataItem),o=t.getAttribute("data-slot-start"),y=t.getAttribute("data-slot-allday")==="true";if(!e.ignoreIsAllDay&&y!==e.isAllDay)return;const m=new Date(a.getField(r,s.start)),D=Number(o)-m.getTime(),M=G.map(E=>{if(!E.current)return null;const I=u.clone(E.current.props.dataItem),f=new Date(E.current.props.start.getTime()+D),S=new Date(E.current.props.end.getTime()+D);return a.setField(I,s.start,f),a.setField(I,s.end,S),I}).filter(Boolean);b.current=t,c([...M]);break}case"DRAG_ITEM_START":{const t=l.payload.x,r=l.payload.y;i.current=t,R.current=r;const o=a.slotDive(t,r,7);if(!o)return;const y=u.clone(e.dataItem),m=o.getAttribute("data-slot-start"),D=a.getField(y,s.start);if(m===null)return;d.current=Number(m)-new Date(D).getTime();break}case"DRAG_ITEM_DRAG":{if(Math.abs(i.current-l.payload.x)<10&&Math.abs(R.current-l.payload.y)<10)return;const t=a.slotDive(l.payload.x,l.payload.y,7);if(!t||t===b.current)return;const r=u.clone(e.dataItem),o=t.getAttribute("data-slot-start"),y=t.getAttribute("data-slot-group"),m=t.getAttribute("data-slot-allday")==="true";if(!e.ignoreIsAllDay&&m!==e.isAllDay)return;const D=new Date(a.getField(r,s.start)),E=new Date(a.getField(r,s.end)).getTime()-D.getTime(),I=new Date(Number(o)-Number(d.current)),f=new Date(Number(o)-Number(d.current)+E),S=g.find(p=>p.index===Number(y));a.setField(r,s.start,I),a.setField(r,s.end,f),S&&g.length>1&&S.resources.forEach(p=>{p.multiple||a.setField(r,p.field,p[p.valueField])}),b.current=t,r&&c(r);break}case"DRAG_ITEM_COMPLETE":{c(null),e.onDataAction&&n&&e.onDataAction.call(void 0,{type:_.DATA_ACTION.update,series:!1,dataItem:n});break}case"DRAG_ITEM_COMPLETE_OCCURRENCE":{const t=Array.isArray(n)?n.slice():u.clone(n);c(null),e.onDataAction&&n&&e.onDataAction.call(void 0,{type:_.DATA_ACTION.update,series:!1,dataItem:t});break}case"DRAG_ITEM_COMPLETE_SERIES":{let t;if(Array.isArray(n))t=n.map(r=>{const o=u.clone(r);return a.setField(o,s.start,a.getField(r,s.start)),a.setField(o,s.end,a.getField(r,s.end)),o});else{const r=u.clone(n);a.setField(r,s.start,a.getField(n,s.start)),a.setField(r,s.end,a.getField(n,s.end)),t=r}c(null),e.onDataAction&&t&&e.onDataAction.call(void 0,{type:_.DATA_ACTION.update,series:!0,dataItem:t});break}default:c(n);break}}]};exports.DRAG_ITEM_ACTION=F;exports.useDragItem=k;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { clone as c } from "@progress/kendo-react-common";
|
|
10
9
|
import * as R from "react";
|
|
11
10
|
import { useControlledState as C } from "../../hooks/useControlledState.mjs";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@progress/kendo-react-common"),m=require("../../hooks/useControlledState.js"),M=require("../../utils/index.js"),i=require("../../constants/index.js"),s=require("../../context/SchedulerContext.js");var n=(e=>(e.set="FORM_ITEM_SET",e.setMaster="FORM_ITEM_SET_MASTER",e.reset="FORM_ITEM_RESET",e.complete="FORM_ITEM_COMPLETE",e))(n||{});const T=(e,l)=>{const[o,a]=m.useControlledState(...l),c=s.useSchedulerFieldsContext(),[d]=s.useSchedulerDataContext();return[o,a,(r,u)=>{let t;switch(r.type){case"FORM_ITEM_SET":t=r.payload;break;case"FORM_ITEM_RESET":t=null;break;case"FORM_ITEM_SET_MASTER":t=E.clone(M.findMaster(r.payload,c,d));break;case"FORM_ITEM_COMPLETE":e.onDataAction&&o&&(e.onDataAction.call(void 0,{type:i.DATA_ACTION.update,series:e.series,dataItem:r.payload}),t=null);break;default:t=o;break}a(t,u)}]};exports.FORM_ITEM_ACTION=n;exports.useFormItem=T;
|
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import { clone as E } from "@progress/kendo-react-common";
|
|
8
|
+
import { clone as n } from "@progress/kendo-react-common";
|
|
10
9
|
import { useControlledState as d } from "../../hooks/useControlledState.mjs";
|
|
11
10
|
import { findMaster as M } from "../../utils/index.mjs";
|
|
12
11
|
import { DATA_ACTION as c } from "../../constants/index.mjs";
|
|
13
|
-
import { useSchedulerFieldsContext as T, useSchedulerDataContext as
|
|
14
|
-
var
|
|
12
|
+
import { useSchedulerFieldsContext as T, useSchedulerDataContext as p } from "../../context/SchedulerContext.mjs";
|
|
13
|
+
var _ = /* @__PURE__ */ ((e) => (e.set = "FORM_ITEM_SET", e.setMaster = "FORM_ITEM_SET_MASTER", e.reset = "FORM_ITEM_RESET", e.complete = "FORM_ITEM_COMPLETE", e))(_ || {});
|
|
15
14
|
const f = (e, s) => {
|
|
16
|
-
const [o, a] = d(...s), m = T(), [l] =
|
|
17
|
-
return [o, a, (r,
|
|
15
|
+
const [o, a] = d(...s), m = T(), [l] = p();
|
|
16
|
+
return [o, a, (r, E) => {
|
|
18
17
|
let t;
|
|
19
18
|
switch (r.type) {
|
|
20
19
|
case "FORM_ITEM_SET":
|
|
@@ -24,7 +23,7 @@ const f = (e, s) => {
|
|
|
24
23
|
t = null;
|
|
25
24
|
break;
|
|
26
25
|
case "FORM_ITEM_SET_MASTER":
|
|
27
|
-
t =
|
|
26
|
+
t = n(M(r.payload, m, l));
|
|
28
27
|
break;
|
|
29
28
|
case "FORM_ITEM_COMPLETE":
|
|
30
29
|
e.onDataAction && o && (e.onDataAction.call(void 0, {
|
|
@@ -37,10 +36,10 @@ const f = (e, s) => {
|
|
|
37
36
|
t = o;
|
|
38
37
|
break;
|
|
39
38
|
}
|
|
40
|
-
a(t,
|
|
39
|
+
a(t, E);
|
|
41
40
|
}];
|
|
42
41
|
};
|
|
43
42
|
export {
|
|
44
|
-
|
|
43
|
+
_ as FORM_ITEM_ACTION,
|
|
45
44
|
f as useFormItem
|
|
46
45
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../constants/index.js"),l=require("../../hooks/useControlledState.js");var a=(e=>(e.set="REMOVE_ITEM_SET",e.reset="REMOVE_ITEM_RESET",e.complete="REMOVE_ITEM_COMPLETE",e))(a||{});const m=(e,s)=>{const[o,E]=l.useControlledState(...s);return[o,E,r=>{let t;switch(r.type){case"REMOVE_ITEM_SET":t=r.payload;break;case"REMOVE_ITEM_RESET":t=null;break;case"REMOVE_ITEM_COMPLETE":e.onDataAction&&o&&e.onDataAction.call(void 0,{type:n.DATA_ACTION.remove,series:e.series,dataItem:o}),t=null;break;default:t=o;break}E(t)}]};exports.REMOVE_ITEM_ACTION=a;exports.useRemoveItem=m;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { DATA_ACTION as m } from "../../constants/index.mjs";
|
|
10
9
|
import { useControlledState as s } from "../../hooks/useControlledState.mjs";
|
|
11
10
|
var l = /* @__PURE__ */ ((e) => (e.set = "REMOVE_ITEM_SET", e.reset = "REMOVE_ITEM_RESET", e.complete = "REMOVE_ITEM_COMPLETE", e))(l || {});
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("@progress/kendo-react-common"),M=require("react"),F=require("../../hooks/useControlledState.js"),t=require("../../utils/index.js"),b=require("../../constants/index.js"),C=require("../../context/SchedulerViewContext.js"),k=require("../../context/SchedulerContext.js");function P(e){const D=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const l=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(D,c,l.get?l:{enumerable:!0,get:()=>e[c]})}}return D.default=e,Object.freeze(D)}const Z=P(M);var g=(e=>(e.set="RESIZE_ITEM_SET",e.start="RESIZE_ITEM_START",e.startDrag="RESIZE_ITEM_START_DRAG",e.startDragSelected="RESIZE_ITEM_START_DRAG_SELECTED",e.endDrag="RESIZE_ITEM_END_DRAG",e.endDragSelected="RESIZE_ITEM_END_DRAG_SELECTED",e.complete="RESIZE_ITEM_COMPLETE",e.completeOccurrence="RESIZE_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="RESIZE_ITEM_COMPLETE_SERIES",e.reset="RESIZE_ITEM_RESET",e))(g||{});const x=(e,D)=>{const c=Z.useRef(null),[l,A]=F.useControlledState(...D),[y]=C.useSchedulerViewSelectedItemsContext(),n=k.useSchedulerFieldsContext();return[l,A,(u,R)=>{let d=l;switch(u.type){case"RESIZE_ITEM_SET":d=u.payload;break;case"RESIZE_ITEM_RESET":d=null;break;case"RESIZE_ITEM_START":{if(R.stopPropagation(),!d)return;const o=u.payload.x,a=u.payload.y,r=t.slotDive(o,a,7);if(!r||r===c.current)return;const i=r.getAttribute("data-slot-start"),E=new Date(Number(i)),s=m.clone(e.dataItem);if(E>=t.getField(s,n.end))return;t.setField(s,n.start,E),c.current=r,d=s;break}case"RESIZE_ITEM_START_DRAG_SELECTED":{R.stopPropagation();const o=u.payload.x,a=u.payload.y,r=m.clone(e.dataItem),i=t.slotDive(o,a,7);if(!i||i===c.current)return;const E=i.getAttribute("data-slot-start"),s=new Date(t.getField(r,n.start)),T=new Date(Number(E)).getTime()-s.getTime();let _=!1;const f=y.map(S=>{if(!S.current)return null;const I=m.clone(S.current.props.dataItem),p=new Date(S.current.props.start.getTime()+T);if(p>=t.getField(I,n.end)){_=!0;return}return t.setField(I,n.start,p),I}).filter(Boolean);_||(d=[...f]);break}case"RESIZE_ITEM_START_DRAG":{const o=u.payload.x,a=u.payload.y,r=t.slotDive(o,a,7);if(!r||r===c.current)return;const i=r.getAttribute("data-slot-start"),E=new Date(Number(i)),s=m.clone(e.dataItem);if(E>=s.end)return;t.setField(s,n.start,E),c.current=r,d=s;break}case"RESIZE_ITEM_END_DRAG":{const o=u.payload.x,a=u.payload.y,r=t.slotDive(o,a,7);if(!r||r===c.current)return;const i=r.getAttribute("data-slot-end"),E=new Date(Number(i)),s=m.clone(e.dataItem);if(E<=s.start)return;t.setField(s,n.end,E),c.current=r,d=s;break}case"RESIZE_ITEM_END_DRAG_SELECTED":{R.stopPropagation();const o=u.payload.x,a=u.payload.y,r=m.clone(e.dataItem),i=t.slotDive(o,a,7);if(!i||i===c.current)return;const E=i.getAttribute("data-slot-start"),s=new Date(t.getField(r,n.end)),T=new Date(Number(E)).getTime()-s.getTime();let _;const f=y.map(S=>{if(!S.current)return null;const I=m.clone(S.current.props.dataItem),p=new Date(S.current.props.end.getTime()+T);if(p<=t.getField(I,n.start)){_=!0;return}return t.setField(I,n.end,p),I}).filter(Boolean);_||(d=[...f]);break}case"RESIZE_ITEM_COMPLETE":{d=null,e.onDataAction&&l&&e.onDataAction.call(void 0,{type:b.DATA_ACTION.update,series:!1,dataItem:l});break}case"RESIZE_ITEM_COMPLETE_OCCURRENCE":{d=null,e.onDataAction&&l&&e.onDataAction.call(void 0,{type:b.DATA_ACTION.update,series:!1,dataItem:l});break}case"RESIZE_ITEM_COMPLETE_SERIES":{d=null;let o;if(Array.isArray(l))o=l.map(a=>{const r=m.clone(a);return t.setField(r,n.start,t.getField(a,n.start)),t.setField(r,n.end,t.getField(a,n.end)),r});else{const a=m.clone(l);t.setField(a,n.start,t.getField(l,n.start)),t.setField(a,n.end,t.getField(l,n.end)),o=a}e.onDataAction&&o&&e.onDataAction.call(void 0,{type:b.DATA_ACTION.update,series:!0,dataItem:o});break}default:d=null;break}A(d)}]};exports.RESIZE_ITEM_ACTION=g;exports.useResizeItem=x;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { clone as u } from "@progress/kendo-react-common";
|
|
10
9
|
import * as k from "react";
|
|
11
10
|
import { useControlledState as C } from "../../hooks/useControlledState.mjs";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../hooks/useControlledState.js");var S=(e=>(e.reset="SERIES_RESET",e.set="SERIES_SET",e.toggle="SERIES_TOGGLE",e))(S||{});const c=(e,r)=>{switch(r.type){case"SERIES_RESET":return null;case"SERIES_SET":return r.payload;case"SERIES_TOGGLE":return!e;default:return e}},i=(e,r,n)=>{const[t,s]=u.useControlledState(e,r,n);return[t,s,E=>{const o=c(t,E);s(o)}]};exports.SERIES_ACTION=S;exports.useSeries=i;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { useControlledState as o } from "../../hooks/useControlledState.mjs";
|
|
10
9
|
var c = /* @__PURE__ */ ((e) => (e.reset = "SERIES_RESET", e.set = "SERIES_SET", e.toggle = "SERIES_TOGGLE", e))(c || {});
|
|
11
10
|
const u = (e, r) => {
|
|
@@ -19,10 +18,10 @@ const u = (e, r) => {
|
|
|
19
18
|
default:
|
|
20
19
|
return e;
|
|
21
20
|
}
|
|
22
|
-
}, a = (e, r,
|
|
23
|
-
const [s, t] = o(e, r,
|
|
24
|
-
return [s, t, (
|
|
25
|
-
const E = u(s,
|
|
21
|
+
}, a = (e, r, S) => {
|
|
22
|
+
const [s, t] = o(e, r, S);
|
|
23
|
+
return [s, t, (n) => {
|
|
24
|
+
const E = u(s, n);
|
|
26
25
|
t(E);
|
|
27
26
|
}];
|
|
28
27
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../hooks/useControlledState.js");var t=(e=>(e.set="SHOW_OCCURRENCE_DIALOG_SET",e.open="SHOW_OCCURRENCE_DIALOG_OPEN",e.close="SHOW_OCCURRENCE_DIALOG_CLOSE",e.reset="SHOW_OCCURRENCE_DIALOG_RESET",e.toggle="SHOW_OCCURRENCE_DIALOG_TOGGLE",e))(t||{});const s=(e,r)=>{switch(r.type){case"SHOW_OCCURRENCE_DIALOG_RESET":return!1;case"SHOW_OCCURRENCE_DIALOG_SET":return r.payload;case"SHOW_OCCURRENCE_DIALOG_OPEN":return!0;case"SHOW_OCCURRENCE_DIALOG_CLOSE":return!1;case"SHOW_OCCURRENCE_DIALOG_TOGGLE":return!e;default:return e}},a=(e,r,O)=>{const[c,o]=E.useControlledState(e,r,O);return[c,o,n=>{const u=s(c,n);o(u)}]};exports.SHOW_OCCURRENCE_DIALOG_ACTION=t;exports.useShowOccurrenceDialog=a;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { useControlledState as E } from "../../hooks/useControlledState.mjs";
|
|
10
9
|
var s = /* @__PURE__ */ ((e) => (e.set = "SHOW_OCCURRENCE_DIALOG_SET", e.open = "SHOW_OCCURRENCE_DIALOG_OPEN", e.close = "SHOW_OCCURRENCE_DIALOG_CLOSE", e.reset = "SHOW_OCCURRENCE_DIALOG_RESET", e.toggle = "SHOW_OCCURRENCE_DIALOG_TOGGLE", e))(s || {});
|
|
11
10
|
const u = (e, r) => {
|
|
@@ -23,18 +22,18 @@ const u = (e, r) => {
|
|
|
23
22
|
default:
|
|
24
23
|
return e;
|
|
25
24
|
}
|
|
26
|
-
},
|
|
25
|
+
}, _ = (e, r, O) => {
|
|
27
26
|
const [c, o] = E(
|
|
28
27
|
e,
|
|
29
28
|
r,
|
|
30
|
-
|
|
29
|
+
O
|
|
31
30
|
);
|
|
32
|
-
return [c, o, (
|
|
33
|
-
const t = u(c,
|
|
31
|
+
return [c, o, (n) => {
|
|
32
|
+
const t = u(c, n);
|
|
34
33
|
o(t);
|
|
35
34
|
}];
|
|
36
35
|
};
|
|
37
36
|
export {
|
|
38
37
|
s as SHOW_OCCURRENCE_DIALOG_ACTION,
|
|
39
|
-
|
|
38
|
+
_ as useShowOccurrenceDialog
|
|
40
39
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../hooks/useControlledState.js");var E=(e=>(e.set="SHOW_REMOVE_DIALOG_SET",e.open="SHOW_REMOVE_DIALOG_OPEN",e.close="SHOW_REMOVE_DIALOG_CLOSE",e.reset="SHOW_REMOVE_DIALOG_RESET",e.toggle="SHOW_REMOVE_DIALOG_TOGGLE",e))(E||{});const n=(e,o)=>{switch(o.type){case"SHOW_REMOVE_DIALOG_RESET":return!1;case"SHOW_REMOVE_DIALOG_SET":return o.payload;case"SHOW_REMOVE_DIALOG_OPEN":return!0;case"SHOW_REMOVE_DIALOG_CLOSE":return!1;case"SHOW_REMOVE_DIALOG_TOGGLE":return!e;default:return e}},S=(e,o,s)=>{const[t,r]=l.useControlledState(e,o,s);return[t,r,O=>{const a=n(t,O);r(a)}]};exports.SHOW_REMOVE_DIALOG_ACTION=E;exports.useShowRemoveDialog=S;
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const l = (e, o) => {
|
|
8
|
+
import { useControlledState as a } from "../../hooks/useControlledState.mjs";
|
|
9
|
+
var n = /* @__PURE__ */ ((e) => (e.set = "SHOW_REMOVE_DIALOG_SET", e.open = "SHOW_REMOVE_DIALOG_OPEN", e.close = "SHOW_REMOVE_DIALOG_CLOSE", e.reset = "SHOW_REMOVE_DIALOG_RESET", e.toggle = "SHOW_REMOVE_DIALOG_TOGGLE", e))(n || {});
|
|
10
|
+
const S = (e, o) => {
|
|
12
11
|
switch (o.type) {
|
|
13
12
|
case "SHOW_REMOVE_DIALOG_RESET":
|
|
14
13
|
return !1;
|
|
@@ -24,13 +23,13 @@ const l = (e, o) => {
|
|
|
24
23
|
return e;
|
|
25
24
|
}
|
|
26
25
|
}, R = (e, o, E) => {
|
|
27
|
-
const [t, r] =
|
|
26
|
+
const [t, r] = a(e, o, E);
|
|
28
27
|
return [t, r, (s) => {
|
|
29
|
-
const
|
|
30
|
-
r(
|
|
28
|
+
const O = S(t, s);
|
|
29
|
+
r(O);
|
|
31
30
|
}];
|
|
32
31
|
};
|
|
33
32
|
export {
|
|
34
|
-
|
|
33
|
+
n as SHOW_REMOVE_DIALOG_ACTION,
|
|
35
34
|
R as useShowRemoveDialog
|
|
36
35
|
};
|
package/messages/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="scheduler.allEvents",r="scheduler.allDay",t="scheduler.today",n="scheduler.timelineViewTitle",c="scheduler.weekViewTitle",i="scheduler.workWeekViewTitle",o="scheduler.agendaViewTitle",d="scheduler.dayViewTitle",s="scheduler.monthViewTitle",l="scheduler.deleteTitle",u="scheduler.previousTitle",a="scheduler.nextTitle",E="scheduler.showFullDay",y="scheduler.showWorkDay",h="scheduler.editOccurrence",v="scheduler.editSeries",T="scheduler.editRecurringConfirmation",D="scheduler.editRecurringDialogTitle",f="scheduler.editSave",m="scheduler.editCancel",R="scheduler.editorTitle",k="scheduler.editorEventTitle",p="scheduler.editorEventStart",O="scheduler.editorEventStartTimeZone",W="scheduler.editorEventEnd",w="scheduler.editorEventEndTimeZone",S="scheduler.editorEventAllDay",g="scheduler.editorEventDescription",F="scheduler.editorEventSeparateTimeZones",V="scheduler.editorEventTimeZone",q="scheduler.recurrenceEditorRepeat",M="scheduler.recurrenceEditorDailyInterval",P="scheduler.recurrenceEditorDailyRepeatEvery",Y="scheduler.recurrenceEditorWeeklyInterval",Z="scheduler.recurrenceEditorWeeklyRepeatEvery",I="scheduler.recurrenceEditorWeeklyRepeatOn",C="scheduler.recurrenceEditorMonthlyDay",A="scheduler.recurrenceEditorMonthlyInterval",b="scheduler.recurrenceEditorMonthlyRepeatEvery",N="scheduler.recurrenceEditorMonthlyRepeatOn",L="scheduler.recurrenceEditorYearlyOf",x="scheduler.recurrenceEditorYearlyRepeatEvery",j="scheduler.recurrenceEditorYearlyRepeatOn",z="scheduler.recurrenceEditorYearlyInterval",B="scheduler.recurrenceEditorFrequenciesDaily",G="scheduler.recurrenceEditorFrequenciesMonthly",H="scheduler.recurrenceEditorFrequenciesNever",J="scheduler.recurrenceEditorFrequenciesWeekly",K="scheduler.recurrenceEditorFrequenciesYearly",Q="scheduler.recurrenceEditorOffsetPositionsFirst",U="scheduler.recurrenceEditorOffsetPositionsSecond",X="scheduler.recurrenceEditorOffsetPositionsThird",_="scheduler.recurrenceEditorOffsetPositionsFourth",$="scheduler.recurrenceEditorOffsetPositionsLast",ee="scheduler.recurrenceEditorWeekdaysDay",re="scheduler.recurrenceEditorWeekdaysWeekday",te="scheduler.recurrenceEditorWeekdaysWeekendday",ne="scheduler.recurrenceEditorEndAfter",ce="scheduler.recurrenceEditorEndOccurrence",ie="scheduler.recurrenceEditorEndLabel",oe="scheduler.recurrenceEditorEndNever",de="scheduler.recurrenceEditorEndOn",se="scheduler.editorDelete",le="scheduler.deleteConfirmation",ue="scheduler.deleteRecurringConfirmation",ae="scheduler.deleteOccurrence",Ee="scheduler.deleteSeries",ye="scheduler.deleteDialogTitle",he="scheduler.deleteRecurringDialogTitle",ve="scheduler.dateTitle",Te="scheduler.timeTitle",De="scheduler.eventTitle",fe="scheduler.editorValidationRequired",me="scheduler.editorValidationStart",Re="scheduler.editorValidationEnd",ke="scheduler.noEvents",pe="scheduler.moreEvents",Oe={[fe]:"Field is required.",[me]:"Start time must be before End time.",[Re]:"End time must be after Start time.",[e]:"All events",[r]:"all day",[t]:"Today",[d]:"Day",[s]:"Month",[c]:"Week",[i]:"Work Week",[n]:"Timeline",[o]:"Agenda",[l]:"Delete",[u]:"Previous",[a]:"Next",[E]:"Show full day",[y]:"Show business hours",[h]:"Edit current occurrence",[v]:"Edit the series",[T]:"Do you want to edit only this event occurrence or the whole series?",[D]:"Edit Recurring Item",[f]:"Save",[m]:"Cancel",[se]:"Delete",[R]:"Event",[k]:"Title",[p]:"Start",[O]:"Start Time Zone",[W]:"End",[w]:"End Time Zone",[S]:"All Day Event",[g]:"Description",[F]:"End in different Time Zone",[V]:"Specify Time Zone",[q]:"Repeat",[M]:"day(s)",[P]:"Repeat every",[Y]:"week(s)",[Z]:"Repeat every",[I]:"Repeat on",[C]:"Day",[A]:"month(s)",[b]:"Repeat every",[N]:"Repeat on",[L]:"of",[x]:"Repeat every",[j]:"Repeat on",[z]:"year(s)",[B]:"Daily",[G]:"Monthly",[H]:"Never",[J]:"Weekly",[K]:"Yearly",[Q]:"First",[U]:"Second",[X]:"Third",[_]:"Fourth",[$]:"Last",[ee]:"Day",[re]:"Weekday",[te]:"Weekend Day",[ne]:"After",[ce]:"occurrence(s)",[ie]:"End",[oe]:"Never",[de]:"On",[le]:"Are you sure you want to delete this event?",[ue]:"Do you want to delete only this event occurrence or the whole series?",[ae]:"Delete current occurrence",[Ee]:"Delete the series",[ye]:"Delete Event",[he]:"Delete Recurring Item",[ve]:"Date",[Te]:"Time",[De]:"Event",[ke]:"no events",[pe]:"More events"};exports.agendaViewTitle=o;exports.allDay=r;exports.allEvents=e;exports.dateTitle=ve;exports.dayViewTitle=d;exports.deleteConfirmation=le;exports.deleteDialogTitle=ye;exports.deleteOccurrence=ae;exports.deleteRecurringConfirmation=ue;exports.deleteRecurringDialogTitle=he;exports.deleteSeries=Ee;exports.deleteTitle=l;exports.editorCancel=m;exports.editorDelete=se;exports.editorEventAllDay=S;exports.editorEventDescription=g;exports.editorEventEnd=W;exports.editorEventEndTimeZone=w;exports.editorEventSeparateTimeZones=F;exports.editorEventStart=p;exports.editorEventStartTimeZone=O;exports.editorEventTimeZone=V;exports.editorEventTitle=k;exports.editorOccurrence=h;exports.editorRecurringConfirmation=T;exports.editorRecurringDialogTitle=D;exports.editorSave=f;exports.editorSeries=v;exports.editorTitle=R;exports.editorValidationEnd=Re;exports.editorValidationRequired=fe;exports.editorValidationStart=me;exports.eventTitle=De;exports.messages=Oe;exports.monthViewTitle=s;exports.moreEvents=pe;exports.nextTitle=a;exports.noEvents=ke;exports.previousTitle=u;exports.recurrenceEditorDailyInterval=M;exports.recurrenceEditorDailyRepeatEvery=P;exports.recurrenceEditorEndAfter=ne;exports.recurrenceEditorEndLabel=ie;exports.recurrenceEditorEndNever=oe;exports.recurrenceEditorEndOccurrence=ce;exports.recurrenceEditorEndOn=de;exports.recurrenceEditorFrequenciesDaily=B;exports.recurrenceEditorFrequenciesMonthly=G;exports.recurrenceEditorFrequenciesNever=H;exports.recurrenceEditorFrequenciesWeekly=J;exports.recurrenceEditorFrequenciesYearly=K;exports.recurrenceEditorMonthlyDay=C;exports.recurrenceEditorMonthlyInterval=A;exports.recurrenceEditorMonthlyRepeatEvery=b;exports.recurrenceEditorMonthlyRepeatOn=N;exports.recurrenceEditorOffsetPositionsFirst=Q;exports.recurrenceEditorOffsetPositionsFourth=_;exports.recurrenceEditorOffsetPositionsLast=$;exports.recurrenceEditorOffsetPositionsSecond=U;exports.recurrenceEditorOffsetPositionsThird=X;exports.recurrenceEditorRepeat=q;exports.recurrenceEditorWeekdaysDay=ee;exports.recurrenceEditorWeekdaysWeekday=re;exports.recurrenceEditorWeekdaysWeekendday=te;exports.recurrenceEditorWeeklyInterval=Y;exports.recurrenceEditorWeeklyRepeatEvery=Z;exports.recurrenceEditorWeeklyRepeatOn=I;exports.recurrenceEditorYearlyInterval=z;exports.recurrenceEditorYearlyOf=L;exports.recurrenceEditorYearlyRepeatEvery=x;exports.recurrenceEditorYearlyRepeatOn=j;exports.showFullDay=E;exports.showWorkDay=y;exports.timeTitle=Te;exports.timelineViewTitle=n;exports.today=t;exports.weekViewTitle=c;exports.workWeekViewTitle=i;
|
package/messages/index.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
const e = "scheduler.allEvents", r = "scheduler.allDay", t = "scheduler.today", c = "scheduler.timelineViewTitle", n = "scheduler.weekViewTitle", o = "scheduler.workWeekViewTitle", i = "scheduler.agendaViewTitle", d = "scheduler.dayViewTitle", s = "scheduler.monthViewTitle", l = "scheduler.deleteTitle", u = "scheduler.previousTitle", a = "scheduler.nextTitle", E = "scheduler.showFullDay", h = "scheduler.showWorkDay", y = "scheduler.editOccurrence", v = "scheduler.editSeries", T = "scheduler.editRecurringConfirmation", D = "scheduler.editRecurringDialogTitle", f = "scheduler.editSave", m = "scheduler.editCancel", R = "scheduler.editorTitle", k = "scheduler.editorEventTitle", p = "scheduler.editorEventStart", w = "scheduler.editorEventStartTimeZone", W = "scheduler.editorEventEnd", O = "scheduler.editorEventEndTimeZone", S = "scheduler.editorEventAllDay", g = "scheduler.editorEventDescription", F = "scheduler.editorEventSeparateTimeZones", V = "scheduler.editorEventTimeZone", q = "scheduler.recurrenceEditorRepeat", M = "scheduler.recurrenceEditorDailyInterval", Z = "scheduler.recurrenceEditorDailyRepeatEvery", P = "scheduler.recurrenceEditorWeeklyInterval", Y = "scheduler.recurrenceEditorWeeklyRepeatEvery", I = "scheduler.recurrenceEditorWeeklyRepeatOn", A = "scheduler.recurrenceEditorMonthlyDay", C = "scheduler.recurrenceEditorMonthlyInterval", N = "scheduler.recurrenceEditorMonthlyRepeatEvery", b = "scheduler.recurrenceEditorMonthlyRepeatOn", L = "scheduler.recurrenceEditorYearlyOf", x = "scheduler.recurrenceEditorYearlyRepeatEvery", j = "scheduler.recurrenceEditorYearlyRepeatOn", z = "scheduler.recurrenceEditorYearlyInterval", B = "scheduler.recurrenceEditorFrequenciesDaily", G = "scheduler.recurrenceEditorFrequenciesMonthly", H = "scheduler.recurrenceEditorFrequenciesNever", J = "scheduler.recurrenceEditorFrequenciesWeekly", K = "scheduler.recurrenceEditorFrequenciesYearly", Q = "scheduler.recurrenceEditorOffsetPositionsFirst", U = "scheduler.recurrenceEditorOffsetPositionsSecond", X = "scheduler.recurrenceEditorOffsetPositionsThird", _ = "scheduler.recurrenceEditorOffsetPositionsFourth", $ = "scheduler.recurrenceEditorOffsetPositionsLast", ee = "scheduler.recurrenceEditorWeekdaysDay", re = "scheduler.recurrenceEditorWeekdaysWeekday", te = "scheduler.recurrenceEditorWeekdaysWeekendday", ce = "scheduler.recurrenceEditorEndAfter", ne = "scheduler.recurrenceEditorEndOccurrence", oe = "scheduler.recurrenceEditorEndLabel", ie = "scheduler.recurrenceEditorEndNever", de = "scheduler.recurrenceEditorEndOn", se = "scheduler.editorDelete", le = "scheduler.deleteConfirmation", ue = "scheduler.deleteRecurringConfirmation", ae = "scheduler.deleteOccurrence", Ee = "scheduler.deleteSeries", he = "scheduler.deleteDialogTitle", ye = "scheduler.deleteRecurringDialogTitle", ve = "scheduler.dateTitle", Te = "scheduler.timeTitle", De = "scheduler.eventTitle", fe = "scheduler.editorValidationRequired", me = "scheduler.editorValidationStart", Re = "scheduler.editorValidationEnd", ke = "scheduler.noEvents", pe = "scheduler.moreEvents", we = {
|
|
10
9
|
[fe]: "Field is required.",
|
|
11
10
|
[me]: "Start time must be before End time.",
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1738077664,version:"9.4.0-develop.7",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
const e = {
|
|
10
9
|
name: "@progress/kendo-react-scheduler",
|
|
11
10
|
productName: "KendoReact",
|
|
12
11
|
productCode: "KENDOUIREACT",
|
|
13
12
|
productCodes: ["KENDOUIREACT"],
|
|
14
|
-
publishDate:
|
|
15
|
-
version: "9.4.0-develop.
|
|
13
|
+
publishDate: 1738077664,
|
|
14
|
+
version: "9.4.0-develop.7",
|
|
16
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui"
|
|
17
16
|
};
|
|
18
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-scheduler",
|
|
3
|
-
"version": "9.4.0-develop.
|
|
3
|
+
"version": "9.4.0-develop.7",
|
|
4
4
|
"description": "React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"@progress/kendo-date-math": "^1.4.1",
|
|
30
30
|
"@progress/kendo-drawing": "^1.21.2",
|
|
31
31
|
"@progress/kendo-licensing": "^1.3.4",
|
|
32
|
-
"@progress/kendo-react-buttons": "9.4.0-develop.
|
|
33
|
-
"@progress/kendo-react-common": "9.4.0-develop.
|
|
34
|
-
"@progress/kendo-react-dateinputs": "9.4.0-develop.
|
|
35
|
-
"@progress/kendo-react-dialogs": "9.4.0-develop.
|
|
36
|
-
"@progress/kendo-react-dropdowns": "9.4.0-develop.
|
|
37
|
-
"@progress/kendo-react-form": "9.4.0-develop.
|
|
38
|
-
"@progress/kendo-react-inputs": "9.4.0-develop.
|
|
39
|
-
"@progress/kendo-react-intl": "9.4.0-develop.
|
|
40
|
-
"@progress/kendo-react-popup": "9.4.0-develop.
|
|
32
|
+
"@progress/kendo-react-buttons": "9.4.0-develop.7",
|
|
33
|
+
"@progress/kendo-react-common": "9.4.0-develop.7",
|
|
34
|
+
"@progress/kendo-react-dateinputs": "9.4.0-develop.7",
|
|
35
|
+
"@progress/kendo-react-dialogs": "9.4.0-develop.7",
|
|
36
|
+
"@progress/kendo-react-dropdowns": "9.4.0-develop.7",
|
|
37
|
+
"@progress/kendo-react-form": "9.4.0-develop.7",
|
|
38
|
+
"@progress/kendo-react-inputs": "9.4.0-develop.7",
|
|
39
|
+
"@progress/kendo-react-intl": "9.4.0-develop.7",
|
|
40
|
+
"@progress/kendo-react-popup": "9.4.0-develop.7",
|
|
41
41
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
42
42
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
43
43
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"package": {
|
|
63
63
|
"productName": "KendoReact",
|
|
64
64
|
"productCode": "KENDOUIREACT",
|
|
65
|
-
"publishDate":
|
|
65
|
+
"publishDate": 1738077664,
|
|
66
66
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui"
|
|
67
67
|
}
|
|
68
68
|
},
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("react"),z=require("@progress/kendo-react-intl"),s=require("../messages/index.js"),J=require("@progress/kendo-recurrence"),M=require("@progress/kendo-date-math"),Q=require("./RecurrenceFrequencyEditor.js"),X=require("./RecurrenceRepeatOnWeekEditor.js"),u=require("./common.js"),k=require("@progress/kendo-react-labels"),b=require("@progress/kendo-react-inputs"),f=require("@progress/kendo-react-dropdowns"),$=require("@progress/kendo-react-dateinputs"),g=require("@progress/kendo-react-form"),ee=require("../context/SchedulerContext.js");function te(l){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const y in l)if(y!=="default"){const E=Object.getOwnPropertyDescriptor(l,y);Object.defineProperty(i,y,E.get?E:{enumerable:!0,get:()=>l[y]})}}return i.default=l,Object.freeze(i)}const e=te(V),P=l=>{const i=z.useInternationalization(),y=z.useLocalization(),{timezone:E}=ee.useSchedulerPropsContext(),[x,K]=e.useState(1),[F,T]=e.useState(M.ZonedDate.fromUTCDate(l.start)),c=e.useCallback((n,t)=>{const o=t?n:"scheduler.recurrenceEditor"+n;return y.toLanguageString(o,s.messages[o])},[y]),a=e.useMemo(()=>{var n;return u.getRule((n=l.value)!=null?n:ae.value)},[l.value]),U=e.useMemo(()=>u.getFrequencies(c),[c]),m=e.useMemo(()=>u.getFrequency(a),[a]),w=e.useMemo(()=>u.getExtendedWeekDays(i,c),[i,c]),v=e.useMemo(()=>u.getWeekDay(w,a,l.start),[w,a,l.start]),C=e.useMemo(()=>u.getMonths(i),[i]),N=e.useMemo(()=>u.getMonth(C,a),[C,a]),R=e.useMemo(()=>u.getOffsets(c),[c]),h=e.useMemo(()=>u.getOffset(R,a),[R,a]),D=e.useMemo(()=>u.getEndRule(a),[a]),p=e.useMemo(()=>u.getMonthDay(a,l.start),[a,l.start]),B=e.useMemo(()=>u.getUntil(a),[a.until]),O=e.useMemo(()=>u.getWeekDays(i),[i]),d=e.useMemo(()=>u.getRepeatOnRule(a),[a.byWeekDay,a.byMonthDay]),r=e.useCallback(n=>{n.freq==="never"?l.onChange({value:null}):(n.weekStart===void 0&&(n.weekStart=i.firstDay()),l.onChange({value:J.serializeRule(n,l.timezone)}))},[l.onChange,l.timezone]),G=e.useCallback(n=>{const t={};t.freq=n,t.interval=1,n==="weekly"&&(t.byWeekDay=[{day:M.ZonedDate.fromLocalDate(l.start,E).getDay(),offset:0}]),(n==="monthly"||n==="yearly")&&(t.byMonthDay=[l.start.getDate()]),n==="yearly"&&(t.byMonth=[l.start.getMonth()+1]),r(t)},[r,l.start,E]),Z=e.useCallback(n=>{const t=n.value;r(Object.assign({},a,{interval:t}))},[r,a]),_=e.useCallback(n=>{const t=n.value;r(Object.assign({},a,{count:t})),t!==null&&K(t)},[r,a]),Y=e.useCallback(n=>{const t=n.value;if(!t)return;const o=M.ZonedDate.fromLocalDate(t,l.timezone);r(Object.assign({},a,{until:o})),T(o)},[r,a,l.timezone]),A=e.useCallback(n=>{r(Object.assign({},a,{byWeekDay:O.filter(t=>n.some(o=>o===t.value)).map(t=>({offset:0,day:t.value}))}))},[r,a,O]),L=e.useCallback(n=>{const t=Object.assign({},a),o=n.target.value;typeof o.value=="string"?(t.byWeekDay=u.weekDayRuleFromString(o.value),t.bySetPosition=[h.value]):(t.bySetPosition=void 0,t.byWeekDay=[{day:o.value,offset:h.value}]),r(t)},[h.value,r,a]),S=e.useCallback(n=>{r(Object.assign({},a,{byMonthDay:[n.value]}))},[r,a]),q=e.useCallback(n=>{const t=n.value;r(Object.assign({},a,{byMonth:[t.value]}))},[r,a]),H=e.useCallback(n=>{const t=n.value,o=Object.assign({},a);switch(t){case"never":o.until=void 0,o.count=void 0;break;case"count":o.until=void 0,o.count=x;break;case"until":o.until=F,o.count=void 0;break}r(o)},[r,a,l.timezone]),I=e.useCallback(n=>{const t=Object.assign({},a);n.value==="monthday"?(t.byWeekDay=void 0,t.bySetPosition=void 0,t.byMonthDay=[p]):n.value==="weekday"&&(t.byMonthDay=void 0,typeof v.value=="string"?(t.bySetPosition=[h.value],t.byWeekDay=u.weekDayRuleFromString(v.value)):t.byWeekDay=[{day:v.value,offset:h.value}]),r(t)},[r,a,p,v]),j=e.useCallback(n=>{const t=Object.assign({},a),o=n.value;if(t.byWeekDay)switch(t.byWeekDay.length){case 7:case 5:case 2:t.bySetPosition=[o.value];break;case 1:t.byWeekDay[0].offset=o.value;break}r(t)},[r,a]);return e.createElement(e.Fragment,null,e.createElement(g.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},y.toLanguageString(s.recurrenceEditorRepeat,s.messages[s.recurrenceEditorRepeat])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(Q.RecurrenceFrequencyEditor,{value:m,data:U,onChange:G}))),m!=="never"&&e.createElement(g.FieldWrapper,null,e.createElement(k.Label,{editorId:"interval-editor",className:"k-form-label"},c(u.capitalize(m)+"RepeatEvery")),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(b.NumericTextBox,{min:1,step:1,defaultValue:1,value:a.interval,onChange:Z,id:"interval-editor",className:"k-recur-interval"})," ",e.createElement(k.Label,{editorId:"interval-editor",className:"k-form-label"},c(u.capitalize(m)+"Interval")))),m==="weekly"&&e.createElement(g.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},c(s.recurrenceEditorWeeklyRepeatOn,!0)),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(X.RecurrenceRepeatOnWeekEditor,{data:O,value:(a.byWeekDay||[]).map(({day:n})=>n),onChange:A}))),m==="monthly"&&e.createElement(g.FieldWrapper,null,e.createElement(k.Label,{key:"recurrence-repeat-on-monthly-label",className:"k-form-label"},c(s.recurrenceEditorMonthlyRepeatOn,!0)),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(b.RadioGroup,{value:d,onChange:I,item:W,className:"k-reset",data:[{value:"monthday",label:c(s.recurrenceEditorMonthlyDay,!0),children:[e.createElement(e.Fragment,{key:"separator"}," "),e.createElement(b.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:d!=="monthday",value:a&&a.byMonthDay&&a.byMonthDay[0],onChange:S,width:"auto"})]},{value:"weekday",label:" ",children:[e.createElement(f.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:d!=="weekday",data:R,value:h,onChange:j,style:{width:"auto"}}),e.createElement(e.Fragment,{key:"separator"}," "),e.createElement(f.DropDownList,{key:"weekday-value",disabled:d!=="weekday",value:v,data:w,onChange:L,textField:"text",dataItemKey:"value",style:{width:"auto"}})]}]}))),m==="yearly"&&e.createElement(g.FieldWrapper,null,e.createElement(k.Label,null,c(s.recurrenceEditorYearlyRepeatOn,!0)),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(b.RadioGroup,{value:d,item:W,onChange:I,className:"k-reset",data:[{value:"monthday",label:" ",children:[e.createElement(f.DropDownList,{key:"monthday-month",disabled:d!=="monthday",value:N,data:C,textField:"text",dataItemKey:"value",onChange:q,style:{width:"auto"}}),e.createElement(e.Fragment,{key:"separator"}," "),e.createElement(b.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:d!=="monthday",value:p,onChange:S,width:"auto"})]},{value:"weekday",label:" ",children:[e.createElement(f.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:d!=="weekday",data:R,value:h,onChange:j,style:{width:"auto"}}),e.createElement(e.Fragment,{key:"yearly-separator-1"}," "),e.createElement(f.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:d!=="weekday",value:v,data:w,onChange:L,style:{width:"auto"}}),e.createElement(e.Fragment,{key:"yearly-separator-2"}," "),e.createElement("span",{key:"yearly-weekday-of-label"},c(s.recurrenceEditorYearlyOf,!0)),e.createElement(e.Fragment,{key:"yearly-separator-3"}," "),e.createElement(f.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:d!=="weekday",value:N,data:C,onChange:q,style:{width:"auto"}})]}]}))),m!=="never"&&e.createElement("div",{className:"k-scheduler-recurrence-end-rule-editor"},e.createElement(g.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},c(s.recurrenceEditorEndLabel,!0)),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(b.RadioGroup,{item:W,value:D,onChange:H,data:[{value:"never",label:c(s.recurrenceEditorEndNever,!0)},{value:"count",label:c(s.recurrenceEditorEndAfter,!0),children:[e.createElement(e.Fragment,{key:"separator-1"}," "),e.createElement(b.NumericTextBox,{key:"endrule-after-editor",id:"k-endrule-after",className:"k-recur-count",min:1,width:"auto",value:D==="count"?a.count:x,onChange:_,disabled:D!=="count"}),e.createElement(e.Fragment,{key:"separator-2"}," "),e.createElement(k.Label,{key:"endrule-after-label",className:"k-radio-label",editorId:"k-endrule-after"},c(s.recurrenceEditorEndOccurrence,!0))]},{value:"until",label:c(s.recurrenceEditorEndOn,!0),children:[e.createElement(e.Fragment,{key:"separator"}," "),e.createElement($.DatePicker,{key:"k-endrule-until-editor",id:"k-endrule-until",disabled:D!=="until",min:l.start,value:D==="until"?B:M.toLocalDate(F),onChange:Y,width:"auto"})]}]})))))},W=l=>e.createElement("li",{...l},l.children),ae={value:""};P.displayName="KendoReactSchedulerRepeatEditor";exports.RecurrenceEditor=P;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as e from "react";
|
|
10
9
|
import { useInternationalization as Q, useLocalization as X } from "@progress/kendo-react-intl";
|
|
11
10
|
import { messages as L, recurrenceEditorRepeat as P, recurrenceEditorWeeklyRepeatOn as _, recurrenceEditorMonthlyRepeatOn as $, recurrenceEditorMonthlyDay as ee, recurrenceEditorYearlyRepeatOn as te, recurrenceEditorYearlyOf as ae, recurrenceEditorEndLabel as ne, recurrenceEditorEndNever as le, recurrenceEditorEndAfter as re, recurrenceEditorEndOccurrence as oe, recurrenceEditorEndOn as ce } from "../messages/index.mjs";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),u=require("@progress/kendo-react-buttons");function d(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const c=d(s),i=e=>{const{value:a,data:t,onChange:r,...o}=e,l=c.useCallback(n=>{r&&r.call(void 0,n.currentTarget.dataset.value)},[r]);return c.createElement(u.ButtonGroup,{className:"k-scheduler-recurrence-repeat",width:"100%",...o},t.map(n=>c.createElement(u.Button,{type:"button",key:n.value,selected:n.value===a,onClick:l,"data-value":n.value,togglable:!0},n.text)))};exports.RecurrenceFrequencyEditor=i;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as a from "react";
|
|
10
9
|
import { ButtonGroup as o, Button as s } from "@progress/kendo-react-buttons";
|
|
11
10
|
const p = (r) => {
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),u=require("@progress/kendo-react-buttons"),g=require("./common.js");function b(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const l=b(f),k=e=>{const{value:t,data:a,onChange:o,...d}={...i,...e},s=n=>{const r=Number(n.currentTarget.dataset.key);e.onChange&&e.onChange.call(void 0,t.some(c=>c===r)?t.filter(c=>c!==r):[...t,r])};return l.createElement(u.ButtonGroup,{width:"auto",...d},(e.data||i.data).map(n=>l.createElement(u.Button,{type:"button",key:n.value,"data-key":n.value,selected:t.some(r=>r===n.value),togglable:!0,onClick:s},g.capitalize(n.text))))},i={data:[],value:[]};exports.RecurrenceRepeatOnWeekEditor=k;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as r from "react";
|
|
10
9
|
import { ButtonGroup as d, Button as i } from "@progress/kendo-react-buttons";
|
|
11
10
|
import { capitalize as m } from "./common.mjs";
|