@progress/kendo-react-scheduler 9.0.0-develop.2 → 9.0.0-develop.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +28 -28
  2. package/Scheduler.mjs +42 -65
  3. package/components/BaseView.mjs +1 -10
  4. package/components/CurrentTimeMarket.mjs +31 -46
  5. package/components/DateHeaderCell.mjs +2 -8
  6. package/components/SchedulerForm.js +1 -1
  7. package/components/SchedulerForm.mjs +46 -24
  8. package/components/SchedulerOccurrenceDialog.mjs +5 -7
  9. package/components/SchedulerRemoveDialog.mjs +42 -31
  10. package/components/ShowMoreItemsButton.mjs +30 -32
  11. package/components/TimeHeaderCell.mjs +2 -8
  12. package/components/footer/SchedulerFooter.js +1 -1
  13. package/components/footer/SchedulerFooter.mjs +20 -21
  14. package/components/footer/bussiness-hours/BussinessHours.mjs +15 -16
  15. package/components/header/SchedulerHeader.mjs +18 -19
  16. package/components/header/navigation/NavigationDatePicker.mjs +12 -43
  17. package/components/header/navigation/SchedulerNavigation.mjs +15 -16
  18. package/components/header/view-selector/SchedulerViewSelector.mjs +15 -16
  19. package/components/header/view-selector/ViewSelectorItem.mjs +3 -6
  20. package/components/header/view-selector/ViewSelectorList.mjs +4 -7
  21. package/context/SchedulerContext.mjs +10 -2
  22. package/context/SchedulerEditItemContext.mjs +20 -4
  23. package/context/SchedulerEditSlotContext.mjs +4 -6
  24. package/context/SchedulerEditTaskContext.mjs +3 -1
  25. package/dist/cdn/js/kendo-react-scheduler.js +1 -1
  26. package/editors/FilterableComboBox.mjs +4 -10
  27. package/editors/SchedulerFormEditor.mjs +218 -297
  28. package/editors/ZonedDateTime.mjs +14 -27
  29. package/hooks/use-items-focus.mjs +2 -12
  30. package/hooks/use-items-selection.mjs +2 -12
  31. package/hooks/use-slots-focus.mjs +9 -1
  32. package/hooks/useCellSync.js +1 -1
  33. package/hooks/useCellSync.mjs +8 -9
  34. package/hooks/useRowSync.js +1 -1
  35. package/hooks/useRowSync.mjs +7 -5
  36. package/hooks/useSchedulerItem.js +1 -1
  37. package/hooks/useSchedulerItem.mjs +21 -16
  38. package/hooks/useSchedulerSlot.mjs +8 -10
  39. package/hooks/useSlotExpand.mjs +14 -21
  40. package/index.d.mts +88 -43
  41. package/index.d.ts +88 -43
  42. package/items/SchedulerEditItem.mjs +576 -471
  43. package/items/SchedulerItem.mjs +294 -304
  44. package/items/SchedulerItemContent.mjs +6 -10
  45. package/items/SchedulerProportionalViewItem.js +1 -1
  46. package/items/SchedulerProportionalViewItem.mjs +115 -111
  47. package/items/SchedulerViewItem.js +1 -1
  48. package/items/SchedulerViewItem.mjs +112 -108
  49. package/items/hooks/use-show-occurrence-dialog.mjs +5 -1
  50. package/package-metadata.mjs +1 -1
  51. package/package.json +11 -11
  52. package/recurrence/RecurrenceEditor.js +1 -1
  53. package/recurrence/RecurrenceEditor.mjs +73 -92
  54. package/recurrence/RecurrenceFrequencyEditor.mjs +10 -18
  55. package/recurrence/RecurrenceRepeatOnWeekEditor.js +1 -1
  56. package/recurrence/RecurrenceRepeatOnWeekEditor.mjs +7 -4
  57. package/recurrence/common.js +1 -1
  58. package/recurrence/common.mjs +45 -34
  59. package/services/itemsService.mjs +8 -9
  60. package/services/occurrenceService.mjs +1 -3
  61. package/slots/SchedulerEditSlot.mjs +111 -133
  62. package/slots/SchedulerSlot.mjs +148 -154
  63. package/slots/SchedulerViewSlot.mjs +7 -5
  64. package/tasks/SchedulerEditTask.mjs +108 -129
  65. package/tasks/SchedulerTask.mjs +39 -47
  66. package/tasks/SchedulerViewTask.mjs +8 -6
  67. package/utils/index.js +1 -1
  68. package/utils/index.mjs +99 -96
  69. package/views/agenda/AgendaView.mjs +50 -66
  70. package/views/common/HorizontalResourceIterator.mjs +33 -3
  71. package/views/common/VerticalResourceIterator.mjs +8 -1
  72. package/views/common/utils.js +1 -1
  73. package/views/common/utils.mjs +35 -34
  74. package/views/day/DayViewRowContent.mjs +3 -6
  75. package/views/day/MultiDayView.js +1 -1
  76. package/views/day/MultiDayView.mjs +156 -187
  77. package/views/month/MonthView.mjs +18 -28
  78. package/views/time/MultiDayTimelineView.js +1 -1
  79. package/views/time/MultiDayTimelineView.mjs +41 -90
  80. package/views/time/TimelineViewAllEventsRowContent.mjs +8 -1
  81. package/views/week/WeekView.mjs +1 -8
  82. package/views/week/WorkWeekView.mjs +1 -8
@@ -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 client";"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"),h=require("@progress/kendo-react-inputs"),g=require("@progress/kendo-react-dropdowns"),$=require("@progress/kendo-react-dateinputs"),f=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]),b=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]),v=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=[v.value]):t.byWeekDay=[{day:o.value,offset:v.value}],r(t)},[r,a]),q=e.useCallback(n=>{r(Object.assign({},a,{byMonthDay:[n.value]}))},[r,a]),S=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 b.value=="string"?(t.bySetPosition=[v.value],t.byWeekDay=u.weekDayRuleFromString(b.value)):t.byWeekDay=[{day:b.value,offset:v.value}]),r(t)},[r,a,p,b]),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(f.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(f.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(h.NumericTextBox,{min:1,step:1,defaultValue:1,value:a.interval,onChange:Z,id:"interval-editor",className:"k-recur-interval"}),e.createElement(e.Fragment,null," "),e.createElement(k.Label,{editorId:"interval-editor",className:"k-form-label"},c(u.capitalize(m)+"Interval")))),m==="weekly"&&e.createElement(f.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(f.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(h.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(h.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:d!=="monthday",value:a&&a.byMonthDay&&a.byMonthDay[0],onChange:q,width:"auto"})]},{value:"weekday",label:" ",children:[e.createElement(g.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:d!=="weekday",data:R,value:v,onChange:j,style:{width:"auto"}}),e.createElement(e.Fragment,{key:"separator"}," "),e.createElement(g.DropDownList,{key:"weekday-value",disabled:d!=="weekday",value:b,data:w,onChange:L,textField:"text",dataItemKey:"value",style:{width:"auto"}})]}]}))),m==="yearly"&&e.createElement(f.FieldWrapper,null,e.createElement(k.Label,null,c(s.recurrenceEditorYearlyRepeatOn,!0)),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(h.RadioGroup,{value:d,item:W,onChange:I,className:"k-reset",data:[{value:"monthday",label:" ",children:[e.createElement(g.DropDownList,{key:"monthday-month",disabled:d!=="monthday",value:N,data:C,textField:"text",dataItemKey:"value",onChange:S,style:{width:"auto"}}),e.createElement(e.Fragment,{key:"separator"}," "),e.createElement(h.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:d!=="monthday",value:p,onChange:q,width:"auto"})]},{value:"weekday",label:" ",children:[e.createElement(g.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:d!=="weekday",data:R,value:v,onChange:j,style:{width:"auto"}}),e.createElement(e.Fragment,{key:"yearly-separator-1"}," "),e.createElement(g.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:d!=="weekday",value:b,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(g.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:d!=="weekday",value:N,data:C,onChange:S,style:{width:"auto"}})]}]}))),m!=="never"&&e.createElement("div",{className:"k-scheduler-recurrence-end-rule-editor"},e.createElement(f.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},c(s.recurrenceEditorEndLabel,!0)),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(h.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(h.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;
8
+ "use client";"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;
@@ -8,12 +8,12 @@
8
8
  "use client";
9
9
  import * as e from "react";
10
10
  import { useInternationalization as Q, useLocalization as X } from "@progress/kendo-react-intl";
11
- import { messages as L, recurrenceEditorRepeat as K, 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";
11
+ 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";
12
12
  import { serializeRule as se } from "@progress/kendo-recurrence";
13
13
  import { ZonedDate as M, toLocalDate as ue } from "@progress/kendo-date-math";
14
14
  import { RecurrenceFrequencyEditor as ie } from "./RecurrenceFrequencyEditor.mjs";
15
15
  import { RecurrenceRepeatOnWeekEditor as de } from "./RecurrenceRepeatOnWeekEditor.mjs";
16
- import { getRule as me, getFrequencies as ye, getFrequency as ke, getExtendedWeekDays as he, getWeekDay as fe, getMonths as ve, getMonth as ge, getOffsets as be, getOffset as Ee, getEndRule as Ce, getMonthDay as De, getUntil as we, getWeekDays as Me, getRepeatOnRule as Re, weekDayRuleFromString as P, capitalize as U } from "./common.mjs";
16
+ import { getRule as me, getFrequencies as ye, getFrequency as ke, getExtendedWeekDays as he, getWeekDay as ve, getMonths as fe, getMonth as be, getOffsets as ge, getOffset as Ee, getEndRule as Ce, getMonthDay as De, getUntil as we, getWeekDays as Me, getRepeatOnRule as Re, weekDayRuleFromString as K, capitalize as U } from "./common.mjs";
17
17
  import { Label as i } from "@progress/kendo-react-labels";
18
18
  import { NumericTextBox as E, RadioGroup as R } from "@progress/kendo-react-inputs";
19
19
  import { DropDownList as k } from "@progress/kendo-react-dropdowns";
@@ -33,43 +33,13 @@ const Ne = (l) => {
33
33
  return me((n = l.value) != null ? n : xe.value);
34
34
  },
35
35
  [l.value]
36
- ), T = e.useMemo(
37
- () => ye(c),
38
- [c]
39
- ), u = e.useMemo(
40
- () => ke(a),
41
- [a]
42
- ), v = e.useMemo(
36
+ ), T = e.useMemo(() => ye(c), [c]), u = e.useMemo(() => ke(a), [a]), f = e.useMemo(
43
37
  () => he(d, c),
44
38
  [d, c]
45
- ), m = e.useMemo(
46
- () => fe(v, a, l.start),
47
- [v, a, l.start]
48
- ), g = e.useMemo(
49
- () => ve(d),
50
- [d]
51
- ), F = e.useMemo(
52
- () => ge(g, a),
53
- [g, a]
54
- ), b = e.useMemo(
55
- () => be(c),
56
- [c]
57
39
  ), y = e.useMemo(
58
- () => Ee(b, a),
59
- [b, a]
60
- ), f = e.useMemo(
61
- () => Ce(a),
62
- [a]
63
- ), D = e.useMemo(
64
- () => De(a, l.start),
65
- [a, l.start]
66
- ), Y = e.useMemo(
67
- () => we(a),
68
- [a.until]
69
- ), w = e.useMemo(
70
- () => Me(d),
71
- [d]
72
- ), s = e.useMemo(
40
+ () => ve(f, a, l.start),
41
+ [f, a, l.start]
42
+ ), b = e.useMemo(() => fe(d), [d]), F = e.useMemo(() => be(b, a), [b, a]), g = e.useMemo(() => ge(c), [c]), m = e.useMemo(() => Ee(g, a), [g, a]), v = e.useMemo(() => Ce(a), [a]), D = e.useMemo(() => De(a, l.start), [a, l.start]), Y = e.useMemo(() => we(a), [a.until]), w = e.useMemo(() => Me(d), [d]), s = e.useMemo(
73
43
  () => Re(a),
74
44
  [a.byWeekDay, a.byMonthDay]
75
45
  ), r = e.useCallback(
@@ -80,26 +50,32 @@ const Ne = (l) => {
80
50
  ), A = e.useCallback(
81
51
  (n) => {
82
52
  const t = {};
83
- t.freq = n, t.interval = 1, n === "weekly" && (t.byWeekDay = [{
84
- day: M.fromLocalDate(l.start, W).getDay(),
85
- offset: 0
86
- }]), (n === "monthly" || n === "yearly") && (t.byMonthDay = [l.start.getDate()]), n === "yearly" && (t.byMonth = [l.start.getMonth() + 1]), r(t);
53
+ t.freq = n, t.interval = 1, n === "weekly" && (t.byWeekDay = [
54
+ {
55
+ day: M.fromLocalDate(l.start, W).getDay(),
56
+ offset: 0
57
+ }
58
+ ]), (n === "monthly" || n === "yearly") && (t.byMonthDay = [l.start.getDate()]), n === "yearly" && (t.byMonth = [l.start.getMonth() + 1]), r(t);
87
59
  },
88
60
  [r, l.start, W]
89
61
  ), B = e.useCallback(
90
62
  (n) => {
91
63
  const t = n.value;
92
- r(Object.assign({}, a, {
93
- interval: t
94
- }));
64
+ r(
65
+ Object.assign({}, a, {
66
+ interval: t
67
+ })
68
+ );
95
69
  },
96
70
  [r, a]
97
71
  ), H = e.useCallback(
98
72
  (n) => {
99
73
  const t = n.value;
100
- r(Object.assign({}, a, {
101
- count: t
102
- })), t !== null && q(t);
74
+ r(
75
+ Object.assign({}, a, {
76
+ count: t
77
+ })
78
+ ), t !== null && q(t);
103
79
  },
104
80
  [r, a]
105
81
  ), V = e.useCallback(
@@ -108,40 +84,50 @@ const Ne = (l) => {
108
84
  if (!t)
109
85
  return;
110
86
  const o = M.fromLocalDate(t, l.timezone);
111
- r(Object.assign({}, a, {
112
- until: o
113
- })), G(o);
87
+ r(
88
+ Object.assign({}, a, {
89
+ until: o
90
+ })
91
+ ), G(o);
114
92
  },
115
93
  [r, a, l.timezone]
116
94
  ), Z = e.useCallback(
117
95
  (n) => {
118
- r(Object.assign({}, a, {
119
- byWeekDay: w.filter((t) => n.some((o) => o === t.value)).map((t) => ({ offset: 0, day: t.value }))
120
- }));
96
+ r(
97
+ Object.assign({}, a, {
98
+ byWeekDay: w.filter((t) => n.some((o) => o === t.value)).map((t) => ({ offset: 0, day: t.value }))
99
+ })
100
+ );
121
101
  },
122
102
  [r, a, w]
123
103
  ), p = e.useCallback(
124
104
  (n) => {
125
105
  const t = Object.assign({}, a), o = n.target.value;
126
- typeof o.value == "string" ? (t.byWeekDay = P(o.value), t.bySetPosition = [y.value]) : t.byWeekDay = [{
127
- day: o.value,
128
- offset: y.value
129
- }], r(t);
106
+ typeof o.value == "string" ? (t.byWeekDay = K(o.value), t.bySetPosition = [m.value]) : (t.bySetPosition = void 0, t.byWeekDay = [
107
+ {
108
+ day: o.value,
109
+ offset: m.value
110
+ }
111
+ ]), r(t);
130
112
  },
131
- [r, a]
113
+ [m.value, r, a]
132
114
  ), I = e.useCallback(
133
115
  (n) => {
134
- r(Object.assign({}, a, {
135
- byMonthDay: [n.value]
136
- }));
116
+ r(
117
+ Object.assign({}, a, {
118
+ byMonthDay: [n.value]
119
+ })
120
+ );
137
121
  },
138
122
  [r, a]
139
123
  ), S = e.useCallback(
140
124
  (n) => {
141
125
  const t = n.value;
142
- r(Object.assign({}, a, {
143
- byMonth: [t.value]
144
- }));
126
+ r(
127
+ Object.assign({}, a, {
128
+ byMonth: [t.value]
129
+ })
130
+ );
145
131
  },
146
132
  [r, a]
147
133
  ), J = e.useCallback(
@@ -164,12 +150,14 @@ const Ne = (l) => {
164
150
  ), z = e.useCallback(
165
151
  (n) => {
166
152
  const t = Object.assign({}, a);
167
- n.value === "monthday" ? (t.byWeekDay = void 0, t.bySetPosition = void 0, t.byMonthDay = [D]) : n.value === "weekday" && (t.byMonthDay = void 0, typeof m.value == "string" ? (t.bySetPosition = [y.value], t.byWeekDay = P(m.value)) : t.byWeekDay = [{
168
- day: m.value,
169
- offset: y.value
170
- }]), r(t);
153
+ n.value === "monthday" ? (t.byWeekDay = void 0, t.bySetPosition = void 0, t.byMonthDay = [D]) : n.value === "weekday" && (t.byMonthDay = void 0, typeof y.value == "string" ? (t.bySetPosition = [m.value], t.byWeekDay = K(y.value)) : t.byWeekDay = [
154
+ {
155
+ day: y.value,
156
+ offset: m.value
157
+ }
158
+ ]), r(t);
171
159
  },
172
- [r, a, D, m]
160
+ [r, a, D, y]
173
161
  ), j = e.useCallback(
174
162
  (n) => {
175
163
  const t = Object.assign({}, a), o = n.value;
@@ -188,14 +176,7 @@ const Ne = (l) => {
188
176
  },
189
177
  [r, a]
190
178
  );
191
- return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement(i, { className: "k-form-label" }, C.toLanguageString(K, L[K])), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
192
- ie,
193
- {
194
- value: u,
195
- data: T,
196
- onChange: A
197
- }
198
- ))), u !== "never" && /* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement(i, { editorId: "interval-editor", className: "k-form-label" }, c(U(u) + "RepeatEvery")), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
179
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement(i, { className: "k-form-label" }, C.toLanguageString(P, L[P])), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(ie, { value: u, data: T, onChange: A }))), u !== "never" && /* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement(i, { editorId: "interval-editor", className: "k-form-label" }, c(U(u) + "RepeatEvery")), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
199
180
  E,
200
181
  {
201
182
  min: 1,
@@ -206,7 +187,7 @@ const Ne = (l) => {
206
187
  id: "interval-editor",
207
188
  className: "k-recur-interval"
208
189
  }
209
- ), /* @__PURE__ */ e.createElement(e.Fragment, null, " "), /* @__PURE__ */ e.createElement(i, { editorId: "interval-editor", className: "k-form-label" }, c(U(u) + "Interval")))), u === "weekly" && /* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement(i, { className: "k-form-label" }, c(_, !0)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
190
+ ), " ", /* @__PURE__ */ e.createElement(i, { editorId: "interval-editor", className: "k-form-label" }, c(U(u) + "Interval")))), u === "weekly" && /* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement(i, { className: "k-form-label" }, c(_, !0)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
210
191
  de,
211
192
  {
212
193
  data: w,
@@ -251,8 +232,8 @@ const Ne = (l) => {
251
232
  textField: "text",
252
233
  dataItemKey: "value",
253
234
  disabled: s !== "weekday",
254
- data: b,
255
- value: y,
235
+ data: g,
236
+ value: m,
256
237
  onChange: j,
257
238
  style: { width: "auto" }
258
239
  }
@@ -263,8 +244,8 @@ const Ne = (l) => {
263
244
  {
264
245
  key: "weekday-value",
265
246
  disabled: s !== "weekday",
266
- value: m,
267
- data: v,
247
+ value: y,
248
+ data: f,
268
249
  onChange: p,
269
250
  textField: "text",
270
251
  dataItemKey: "value",
@@ -293,7 +274,7 @@ const Ne = (l) => {
293
274
  key: "monthday-month",
294
275
  disabled: s !== "monthday",
295
276
  value: F,
296
- data: g,
277
+ data: b,
297
278
  textField: "text",
298
279
  dataItemKey: "value",
299
280
  onChange: S,
@@ -326,8 +307,8 @@ const Ne = (l) => {
326
307
  textField: "text",
327
308
  dataItemKey: "value",
328
309
  disabled: s !== "weekday",
329
- data: b,
330
- value: y,
310
+ data: g,
311
+ value: m,
331
312
  onChange: j,
332
313
  style: { width: "auto" }
333
314
  }
@@ -340,8 +321,8 @@ const Ne = (l) => {
340
321
  textField: "text",
341
322
  dataItemKey: "value",
342
323
  disabled: s !== "weekday",
343
- value: m,
344
- data: v,
324
+ value: y,
325
+ data: f,
345
326
  onChange: p,
346
327
  style: { width: "auto" }
347
328
  }
@@ -357,7 +338,7 @@ const Ne = (l) => {
357
338
  dataItemKey: "value",
358
339
  disabled: s !== "weekday",
359
340
  value: F,
360
- data: g,
341
+ data: b,
361
342
  onChange: S,
362
343
  style: { width: "auto" }
363
344
  }
@@ -370,7 +351,7 @@ const Ne = (l) => {
370
351
  R,
371
352
  {
372
353
  item: O,
373
- value: f,
354
+ value: v,
374
355
  onChange: J,
375
356
  data: [
376
357
  {
@@ -390,9 +371,9 @@ const Ne = (l) => {
390
371
  className: "k-recur-count",
391
372
  min: 1,
392
373
  width: "auto",
393
- value: f === "count" ? a.count : N,
374
+ value: v === "count" ? a.count : N,
394
375
  onChange: H,
395
- disabled: f !== "count"
376
+ disabled: v !== "count"
396
377
  }
397
378
  ),
398
379
  /* @__PURE__ */ e.createElement(e.Fragment, { key: "separator-2" }, " "),
@@ -417,9 +398,9 @@ const Ne = (l) => {
417
398
  {
418
399
  key: "k-endrule-until-editor",
419
400
  id: "k-endrule-until",
420
- disabled: f !== "until",
401
+ disabled: v !== "until",
421
402
  min: l.start,
422
- value: f === "until" ? Y : ue(x),
403
+ value: v === "until" ? Y : ue(x),
423
404
  onChange: V,
424
405
  width: "auto"
425
406
  }
@@ -15,26 +15,18 @@ const p = (r) => {
15
15
  },
16
16
  [t]
17
17
  );
18
- return /* @__PURE__ */ a.createElement(
19
- o,
18
+ return /* @__PURE__ */ a.createElement(o, { className: "k-scheduler-recurrence-repeat", width: "100%", ...u }, c.map((e) => /* @__PURE__ */ a.createElement(
19
+ s,
20
20
  {
21
- className: "k-scheduler-recurrence-repeat",
22
- width: "100%",
23
- ...u
21
+ type: "button",
22
+ key: e.value,
23
+ selected: e.value === l,
24
+ onClick: n,
25
+ "data-value": e.value,
26
+ togglable: !0
24
27
  },
25
- c.map((e) => /* @__PURE__ */ a.createElement(
26
- s,
27
- {
28
- type: "button",
29
- key: e.value,
30
- selected: e.value === l,
31
- onClick: n,
32
- "data-value": e.value,
33
- togglable: !0
34
- },
35
- e.text
36
- ))
37
- );
28
+ e.text
29
+ )));
38
30
  };
39
31
  export {
40
32
  p as RecurrenceFrequencyEditor
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),l=require("@progress/kendo-react-buttons"),f=require("./common.js");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,c.get?c:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const o=m(g),b=e=>{const{value:t,data:a,onChange:c,...d}={...i,...e},s=n=>{const r=Number(n.currentTarget.dataset.key);e.onChange&&e.onChange.call(void 0,t.some(u=>u===r)?t.filter(u=>u!==r):[...t,r])};return o.createElement(o.Fragment,null,o.createElement(l.ButtonGroup,{width:"auto",...d},(e.data||i.data).map(n=>o.createElement(l.Button,{type:"button",key:n.value,"data-key":n.value,selected:t.some(r=>r===n.value),togglable:!0,onClick:s},f.capitalize(n.text)))))},i={data:[],value:[]};exports.RecurrenceRepeatOnWeekEditor=b;
8
+ "use client";"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;
@@ -10,11 +10,14 @@ import * as r from "react";
10
10
  import { ButtonGroup as d, Button as i } from "@progress/kendo-react-buttons";
11
11
  import { capitalize as m } from "./common.mjs";
12
12
  const h = (a) => {
13
- const { value: n, data: s, onChange: g, ...u } = { ...l, ...a }, c = (e) => {
13
+ const { value: n, data: s, onChange: k, ...u } = { ...l, ...a }, c = (e) => {
14
14
  const t = Number(e.currentTarget.dataset.key);
15
- a.onChange && a.onChange.call(void 0, n.some((o) => o === t) ? n.filter((o) => o !== t) : [...n, t]);
15
+ a.onChange && a.onChange.call(
16
+ void 0,
17
+ n.some((o) => o === t) ? n.filter((o) => o !== t) : [...n, t]
18
+ );
16
19
  };
17
- return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(d, { width: "auto", ...u }, (a.data || l.data).map((e) => /* @__PURE__ */ r.createElement(
20
+ return /* @__PURE__ */ r.createElement(d, { width: "auto", ...u }, (a.data || l.data).map((e) => /* @__PURE__ */ r.createElement(
18
21
  i,
19
22
  {
20
23
  type: "button",
@@ -25,7 +28,7 @@ const h = (a) => {
25
28
  onClick: c
26
29
  },
27
30
  m(e.text)
28
- ))));
31
+ )));
29
32
  }, l = {
30
33
  data: [],
31
34
  value: []
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../utils/index.js"),g=require("@progress/kendo-recurrence"),D=require("@progress/kendo-date-math"),o=e=>e.charAt(0).toUpperCase()+e.slice(1),r=["first","second","third","fourth","last"],c=["never","daily","weekly","monthly","yearly"],d=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],i=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],u=[{day:0,offset:0},{day:6,offset:0}],b=e=>{switch(e){case"day":return d;case"weekday":return i;case"weekend":return u}},m=e=>g.parseRule({recurrenceRule:e})||{},h=e=>c.map(t=>({value:t,text:e("Frequencies"+o(t))})),p=e=>s.isPresent(e)&&!s.isNullOrEmptyString(e.freq)?e.freq:"never",R=e=>s.isPresent(e.until)?D.toLocalDate(e.until):null,w=e=>e.dateFormatNames({type:"months",nameType:"wide",standAlone:!0}).map((t,n)=>({text:t,value:n+1})),W=e=>{const t=e.firstDay(),n=e.dateFormatNames({type:"days",nameType:"abbreviated"}).map((y,a)=>({text:y,value:a}));return n.slice(t).concat(n.slice(0,t))},v=(e,t,n)=>e.find(y=>{let a;if(s.isPresent(t.byWeekDay))switch(t.byWeekDay.length){case 7:a="day";break;case 5:a="weekday";break;case 2:a="weekend";break;case 1:a=t.byWeekDay[0].day;break;default:a=n.getDay();break}return a===y.value})||e[0],F=(e,t)=>{const n=e.firstDay();let y=e.dateFormatNames({type:"days",nameType:"wide"}).map((l,k)=>({text:l,value:k}));const a=y.slice(n).concat(y.slice(0,n));return[{text:t("WeekdaysDay"),value:"day"},{text:t("WeekdaysWeekday"),value:"weekday"},{text:t("WeekdaysWeekendday"),value:"weekend"}].concat(a)},O=(e,t)=>e.find(n=>n.value===(t.bySetPosition?t.bySetPosition[0]:t.byWeekDay&&t.byWeekDay[0]?t.byWeekDay[0].offset:1))||e[0],S=e=>{const t=[1,2,3,4,-1];return r.map((n,y)=>({text:e("OffsetPositions"+o(n)),value:t[y]}))},P=e=>s.isPresent(e.count)?"count":s.isPresent(e.until)?"until":"never",E=e=>{if(s.isPresent(e.byWeekDay))return"weekday";if(s.isPresent(e.byMonthDay))return"monthday"},M=(e,t)=>e.find(n=>(t.byMonth?t.byMonth[0]:null)===n.value)||e[0],x=(e,t)=>s.isPresent(e.byMonthDay)&&e.byMonthDay.length>0?e.byMonthDay[0]:t.getDate();exports.FREQUENCIES=c;exports.OFFSET_POSITIONS=r;exports.capitalize=o;exports.dayRule=d;exports.getEndRule=P;exports.getExtendedWeekDays=F;exports.getFrequencies=h;exports.getFrequency=p;exports.getMonth=M;exports.getMonthDay=x;exports.getMonths=w;exports.getOffset=O;exports.getOffsets=S;exports.getRepeatOnRule=E;exports.getRule=m;exports.getUntil=R;exports.getWeekDay=v;exports.getWeekDays=W;exports.weekDayRuleFromString=b;exports.weekdayRule=i;exports.weekendRule=u;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../utils/index.js"),g=require("@progress/kendo-recurrence"),D=require("@progress/kendo-date-math"),r=e=>e.charAt(0).toUpperCase()+e.slice(1),c=["first","second","third","fourth","last"],d=["never","daily","weekly","monthly","yearly"],i=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],u=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],f=[{day:0,offset:0},{day:6,offset:0}],b=e=>{switch(e){case"day":return i;case"weekday":return u;case"weekend":return f}},m=e=>g.parseRule({recurrenceRule:e})||{},h=e=>d.map(t=>({value:t,text:e("Frequencies"+r(t))})),p=e=>s.isPresent(e)&&!s.isNullOrEmptyString(e.freq)?e.freq:"never",R=e=>s.isPresent(e.until)?D.toLocalDate(e.until):null,w=e=>e.dateFormatNames({type:"months",nameType:"wide",standAlone:!0}).map((t,n)=>({text:t,value:n+1})),W=e=>{const t=e.firstDay(),n=e.dateFormatNames({type:"days",nameType:"abbreviated"}).map((a,y)=>({text:a,value:y}));return n.slice(t).concat(n.slice(0,t))},v=(e,t,n)=>{var y;let a;if(s.isPresent(t.byWeekDay))switch(t.byWeekDay.length){case 7:a="day";break;case 5:a="weekday";break;case 2:a="weekend";break;case 1:a=t.byWeekDay[0].day;break;default:a=n.getDay();break}else a=n.getDay();return(y=e.find(o=>a===o.value))!=null?y:e[0]},F=(e,t)=>{const n=e.firstDay(),a=e.dateFormatNames({type:"days",nameType:"wide"}).map((l,k)=>({text:l,value:k})),y=a.slice(n).concat(a.slice(0,n));return[{text:t("WeekdaysDay"),value:"day"},{text:t("WeekdaysWeekday"),value:"weekday"},{text:t("WeekdaysWeekendday"),value:"weekend"}].concat(y)},O=(e,t)=>e.find(n=>n.value===(t.bySetPosition?t.bySetPosition[0]:t.byWeekDay&&t.byWeekDay[0]?t.byWeekDay[0].offset:1))||e[0],S=e=>{const t=[1,2,3,4,-1];return c.map((n,a)=>({text:e("OffsetPositions"+r(n)),value:t[a]}))},P=e=>s.isPresent(e.count)?"count":s.isPresent(e.until)?"until":"never",E=e=>{if(s.isPresent(e.byWeekDay))return"weekday";if(s.isPresent(e.byMonthDay))return"monthday"},M=(e,t)=>e.find(n=>(t.byMonth?t.byMonth[0]:null)===n.value)||e[0],x=(e,t)=>s.isPresent(e.byMonthDay)&&e.byMonthDay.length>0?e.byMonthDay[0]:t.getDate();exports.FREQUENCIES=d;exports.OFFSET_POSITIONS=c;exports.capitalize=r;exports.dayRule=i;exports.getEndRule=P;exports.getExtendedWeekDays=F;exports.getFrequencies=h;exports.getFrequency=p;exports.getMonth=M;exports.getMonthDay=x;exports.getMonths=w;exports.getOffset=O;exports.getOffsets=S;exports.getRepeatOnRule=E;exports.getRule=m;exports.getUntil=R;exports.getWeekDay=v;exports.getWeekDays=W;exports.weekDayRuleFromString=b;exports.weekdayRule=u;exports.weekendRule=f;
@@ -6,10 +6,10 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import { isPresent as y, isNullOrEmptyString as f } from "../utils/index.mjs";
9
+ import { isPresent as s, isNullOrEmptyString as f } from "../utils/index.mjs";
10
10
  import { parseRule as i } from "@progress/kendo-recurrence";
11
11
  import { toLocalDate as u } from "@progress/kendo-date-math";
12
- const o = (e) => e.charAt(0).toUpperCase() + e.slice(1), l = ["first", "second", "third", "fourth", "last"], k = ["never", "daily", "weekly", "monthly", "yearly"], m = [
12
+ const r = (e) => e.charAt(0).toUpperCase() + e.slice(1), l = ["first", "second", "third", "fourth", "last"], k = ["never", "daily", "weekly", "monthly", "yearly"], m = [
13
13
  { day: 0, offset: 0 },
14
14
  { day: 1, offset: 0 },
15
15
  { day: 2, offset: 0 },
@@ -37,26 +37,31 @@ const o = (e) => e.charAt(0).toUpperCase() + e.slice(1), l = ["first", "second",
37
37
  }
38
38
  }, v = (e) => i({ recurrenceRule: e }) || {}, W = (e) => k.map((t) => ({
39
39
  value: t,
40
- text: e("Frequencies" + o(t))
41
- })), R = (e) => y(e) && !f(e.freq) ? e.freq : "never", x = (e) => y(e.until) ? u(e.until) : null, F = (e) => e.dateFormatNames({
40
+ text: e("Frequencies" + r(t))
41
+ })), R = (e) => s(e) && !f(e.freq) ? e.freq : "never", x = (e) => s(e.until) ? u(e.until) : null, F = (e) => e.dateFormatNames({
42
42
  type: "months",
43
43
  nameType: "wide",
44
44
  standAlone: !0
45
- }).map((t, a) => ({
46
- text: t,
47
- value: a + 1
48
- })), N = (e) => {
45
+ }).map(
46
+ (t, a) => ({
47
+ text: t,
48
+ value: a + 1
49
+ })
50
+ ), N = (e) => {
49
51
  const t = e.firstDay(), a = e.dateFormatNames({
50
52
  type: "days",
51
53
  nameType: "abbreviated"
52
- }).map((s, n) => ({
53
- text: s,
54
- value: n
55
- }));
54
+ }).map(
55
+ (n, y) => ({
56
+ text: n,
57
+ value: y
58
+ })
59
+ );
56
60
  return a.slice(t).concat(a.slice(0, t));
57
- }, O = (e, t, a) => e.find((s) => {
61
+ }, O = (e, t, a) => {
62
+ var y;
58
63
  let n;
59
- if (y(t.byWeekDay))
64
+ if (s(t.byWeekDay))
60
65
  switch (t.byWeekDay.length) {
61
66
  case 7:
62
67
  n = "day";
@@ -74,38 +79,44 @@ const o = (e) => e.charAt(0).toUpperCase() + e.slice(1), l = ["first", "second",
74
79
  n = a.getDay();
75
80
  break;
76
81
  }
77
- return n === s.value;
78
- }) || e[0], S = (e, t) => {
79
- const a = e.firstDay();
80
- let s = e.dateFormatNames({
82
+ else
83
+ n = a.getDay();
84
+ return (y = e.find((o) => n === o.value)) != null ? y : e[0];
85
+ }, S = (e, t) => {
86
+ const a = e.firstDay(), n = e.dateFormatNames({
81
87
  type: "days",
82
88
  nameType: "wide"
83
- }).map((c, d) => ({
84
- text: c,
85
- value: d
86
- }));
87
- const n = s.slice(a).concat(s.slice(0, a));
89
+ }).map(
90
+ (c, d) => ({
91
+ text: c,
92
+ value: d
93
+ })
94
+ ), y = n.slice(a).concat(n.slice(0, a));
88
95
  return [
89
96
  { text: t("WeekdaysDay"), value: "day" },
90
97
  { text: t("WeekdaysWeekday"), value: "weekday" },
91
98
  { text: t("WeekdaysWeekendday"), value: "weekend" }
92
- ].concat(n);
93
- }, E = (e, t) => e.find((a) => a.value === (t.bySetPosition ? t.bySetPosition[0] : t.byWeekDay && t.byWeekDay[0] ? t.byWeekDay[0].offset : 1)) || e[0], M = (e) => {
99
+ ].concat(y);
100
+ }, E = (e, t) => e.find(
101
+ (a) => a.value === (t.bySetPosition ? t.bySetPosition[0] : t.byWeekDay && t.byWeekDay[0] ? t.byWeekDay[0].offset : 1)
102
+ ) || e[0], M = (e) => {
94
103
  const t = [1, 2, 3, 4, -1];
95
- return l.map((a, s) => ({
96
- text: e("OffsetPositions" + o(a)),
97
- value: t[s]
98
- }));
99
- }, P = (e) => y(e.count) ? "count" : y(e.until) ? "until" : "never", T = (e) => {
100
- if (y(e.byWeekDay))
104
+ return l.map(
105
+ (a, n) => ({
106
+ text: e("OffsetPositions" + r(a)),
107
+ value: t[n]
108
+ })
109
+ );
110
+ }, P = (e) => s(e.count) ? "count" : s(e.until) ? "until" : "never", T = (e) => {
111
+ if (s(e.byWeekDay))
101
112
  return "weekday";
102
- if (y(e.byMonthDay))
113
+ if (s(e.byMonthDay))
103
114
  return "monthday";
104
- }, q = (e, t) => e.find((a) => (t.byMonth ? t.byMonth[0] : null) === a.value) || e[0], C = (e, t) => y(e.byMonthDay) && e.byMonthDay.length > 0 ? e.byMonthDay[0] : t.getDate();
115
+ }, q = (e, t) => e.find((a) => (t.byMonth ? t.byMonth[0] : null) === a.value) || e[0], C = (e, t) => s(e.byMonthDay) && e.byMonthDay.length > 0 ? e.byMonthDay[0] : t.getDate();
105
116
  export {
106
117
  k as FREQUENCIES,
107
118
  l as OFFSET_POSITIONS,
108
- o as capitalize,
119
+ r as capitalize,
109
120
  m as dayRule,
110
121
  P as getEndRule,
111
122
  S as getExtendedWeekDays,
@@ -12,14 +12,11 @@ import { orderBy as h } from "@progress/kendo-data-query";
12
12
  import { ZonedDate as m } from "@progress/kendo-date-math";
13
13
  const S = (l, { timezone: t }, { groups: i, ranges: a }) => {
14
14
  const e = [];
15
- return h(
16
- l,
17
- [
18
- { field: "start", dir: "asc" },
19
- { field: "end", dir: "desc" },
20
- { field: "isAllDay", dir: "desc" }
21
- ]
22
- ).forEach((d) => {
15
+ return h(l, [
16
+ { field: "start", dir: "asc" },
17
+ { field: "end", dir: "desc" },
18
+ { field: "isAllDay", dir: "desc" }
19
+ ]).forEach((d) => {
23
20
  i.forEach((o) => {
24
21
  const n = i.length === 1 ? u(d, o) : o;
25
22
  B(d, n) && a.forEach((s) => {
@@ -48,7 +45,9 @@ const S = (l, { timezone: t }, { groups: i, ranges: a }) => {
48
45
  }, u = (l, t) => ({
49
46
  index: 0,
50
47
  resources: t.resources.filter((i) => E(l, i))
51
- }), E = (l, t) => t.multiple ? (l.dataItem[t.field] || []).some((i) => t[t.valueField] === i) : l.dataItem[t.field] === t[t.valueField], B = (l, t) => !t.resources.some((i) => i.multiple ? !l.dataItem[i.field].some((a) => i[i.valueField] === a) : l.dataItem[i.field] !== i[i.valueField]), F = (l, t) => I(t.start, t.end, l.start, l.end) && (t.isAllDay === void 0 || l.isAllDay === void 0 || l.isAllDay === t.isAllDay);
48
+ }), E = (l, t) => t.multiple ? (l.dataItem[t.field] || []).some((i) => t[t.valueField] === i) : l.dataItem[t.field] === t[t.valueField], B = (l, t) => !t.resources.some(
49
+ (i) => i.multiple ? !l.dataItem[i.field].some((a) => i[i.valueField] === a) : l.dataItem[i.field] !== i[i.valueField]
50
+ ), F = (l, t) => I(t.start, t.end, l.start, l.end) && (t.isAllDay === void 0 || l.isAllDay === void 0 || l.isAllDay === t.isAllDay);
52
51
  export {
53
52
  B as inGroup,
54
53
  F as inRange,
@@ -32,9 +32,7 @@ const F = (e, { dateRange: r, fields: n, timezone: o }) => e.map(z(n)).reduce(I(
32
32
  const c = e.recurrenceRule, a = m({ recurrenceRule: c });
33
33
  a.start || (a.start = d.fromLocalDate(e.start, n)), a.end || (a.end = d.fromLocalDate(e.end, n));
34
34
  const D = e.recurrenceExceptions;
35
- D && (a.exceptionDates = D.map(
36
- (u) => d.fromLocalDate(u, n)
37
- ));
35
+ D && (a.exceptionDates = D.map((u) => d.fromLocalDate(u, n)));
38
36
  const x = r.zonedStart, L = r.zonedEnd, g = E(a, {
39
37
  rangeStart: x,
40
38
  rangeEnd: L