@progress/kendo-vue-scheduler 10.2.0-develop.10 → 10.2.0-develop.12
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.d.ts +157 -56
- package/Scheduler.js +1 -1
- package/Scheduler.mjs +242 -214
- package/components/EventOverviewPopover.d.ts +62 -0
- package/components/EventOverviewPopover.js +8 -0
- package/components/EventOverviewPopover.mjs +191 -0
- package/components/MoreEventsPopover.d.ts +3 -1
- package/components/MoreEventsPopover.js +1 -1
- package/components/MoreEventsPopover.mjs +31 -27
- package/components/SchedulerActionButtons.js +1 -1
- package/components/SchedulerActionButtons.mjs +1 -0
- package/components/SchedulerForm.d.ts +412 -2
- package/components/SchedulerForm.js +1 -1
- package/components/SchedulerForm.mjs +162 -60
- package/components/SchedulerQuickCreateForm.d.ts +118 -0
- package/components/SchedulerQuickCreateForm.js +8 -0
- package/components/SchedulerQuickCreateForm.mjs +249 -0
- package/constants/main.d.ts +2 -0
- package/constants/main.js +1 -1
- package/constants/main.mjs +10 -9
- package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
- package/editors/KeepResetCustomEventsDialog.d.ts +31 -0
- package/editors/KeepResetCustomEventsDialog.js +8 -0
- package/editors/KeepResetCustomEventsDialog.mjs +72 -0
- package/editors/SchedulerFormEditor.d.ts +151 -52
- package/editors/SchedulerFormEditor.js +1 -1
- package/editors/SchedulerFormEditor.mjs +192 -139
- package/editors/SchedulerRecurrenceDialog.d.ts +2 -2
- package/editors/SchedulerRecurrenceDialog.js +1 -1
- package/editors/SchedulerRecurrenceDialog.mjs +126 -131
- package/editors/ZonedSplitDateTime.d.ts +32 -3
- package/editors/ZonedSplitDateTime.js +1 -1
- package/editors/ZonedSplitDateTime.mjs +112 -47
- package/hooks/useCloseOnAnchorScrollOut.d.ts +10 -0
- package/hooks/useCloseOnAnchorScrollOut.js +8 -0
- package/hooks/useCloseOnAnchorScrollOut.mjs +43 -0
- package/hooks/useCustomEventsConfirmation.d.ts +20 -0
- package/hooks/useCustomEventsConfirmation.js +8 -0
- package/hooks/useCustomEventsConfirmation.mjs +48 -0
- package/hooks/useDeferredClick.d.ts +12 -0
- package/hooks/useDeferredClick.js +8 -0
- package/hooks/useDeferredClick.mjs +22 -0
- package/hooks/useExclusivePopover.d.ts +26 -0
- package/hooks/useExclusivePopover.js +8 -0
- package/hooks/useExclusivePopover.mjs +30 -0
- package/hooks/useRecurrenceSummary.d.ts +3 -0
- package/hooks/useRecurrenceSummary.js +1 -1
- package/hooks/useRecurrenceSummary.mjs +68 -41
- package/index.d.mts +4 -2
- package/index.d.ts +4 -2
- package/index.js +1 -1
- package/index.mjs +83 -78
- package/items/SchedulerEditItem.d.ts +116 -12
- package/items/SchedulerEditItem.js +1 -1
- package/items/SchedulerEditItem.mjs +212 -131
- package/items/SchedulerItem.d.ts +2 -1
- package/items/SchedulerItem.js +1 -1
- package/items/SchedulerItem.mjs +28 -23
- package/items/SchedulerProportionalViewItem.d.ts +1 -0
- package/items/SchedulerProportionalViewItem.js +1 -1
- package/items/SchedulerProportionalViewItem.mjs +83 -68
- package/items/SchedulerViewItem.d.ts +1 -0
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +84 -75
- package/items/hooks/use-drag-item.js +1 -1
- package/items/hooks/use-drag-item.mjs +49 -48
- package/items/hooks/use-form-item.d.ts +1 -1
- package/items/hooks/use-remove-item.d.ts +1 -1
- package/items/hooks/use-resize-item.js +1 -1
- package/items/hooks/use-resize-item.mjs +74 -65
- package/messages/main.d.ts +42 -0
- package/messages/main.js +1 -1
- package/messages/main.mjs +303 -275
- package/models/InternalDataAction.d.ts +13 -0
- package/models/SchedulerView.d.ts +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -12
- package/recurrence/RecurrenceEditor.js +1 -1
- package/recurrence/RecurrenceEditor.mjs +42 -42
- package/recurrence/common.d.ts +10 -0
- package/recurrence/common.js +1 -1
- package/recurrence/common.mjs +39 -35
- package/services/itemsService.d.ts +5 -2
- package/services/itemsService.js +1 -1
- package/services/itemsService.mjs +46 -33
- package/services/occurrenceService.js +1 -1
- package/services/occurrenceService.mjs +18 -18
- package/slots/SchedulerEditSlot.d.ts +70 -8
- package/slots/SchedulerEditSlot.js +1 -1
- package/slots/SchedulerEditSlot.mjs +222 -141
- package/slots/SchedulerSlot.js +1 -1
- package/slots/SchedulerSlot.mjs +20 -16
- package/slots/SchedulerViewSlot.d.ts +3 -0
- package/slots/SchedulerViewSlot.js +1 -1
- package/slots/SchedulerViewSlot.mjs +21 -15
- package/tasks/SchedulerEditTask.d.ts +13 -2
- package/tasks/SchedulerEditTask.js +1 -1
- package/tasks/SchedulerEditTask.mjs +45 -30
- package/utils/main.d.ts +27 -0
- package/utils/main.js +1 -1
- package/utils/main.mjs +172 -136
- package/views/agenda/AgendaView.d.ts +6 -2
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +31 -29
- package/views/agenda/AgendaViewBody.d.ts +3 -3
- package/views/agenda/AgendaViewBody.js +1 -1
- package/views/agenda/AgendaViewBody.mjs +31 -29
- package/views/common/SchedulerDrag.d.ts +4 -2
- package/views/common/SchedulerDrag.js +1 -1
- package/views/common/SchedulerDrag.mjs +8 -7
- package/views/common/SchedulerResize.d.ts +4 -2
- package/views/common/SchedulerResize.js +1 -1
- package/views/common/SchedulerResize.mjs +14 -12
- package/views/common/VerticalResourceIterator.d.ts +3 -3
- package/views/common/VerticalResourceIterator.js +1 -1
- package/views/common/VerticalResourceIterator.mjs +34 -33
- package/views/day/DayView.d.ts +2 -0
- package/views/day/DayView.js +1 -1
- package/views/day/DayView.mjs +9 -7
- package/views/day/DayViewAllDaySlots.d.ts +7 -5
- package/views/day/DayViewAllDaySlots.js +1 -1
- package/views/day/DayViewAllDaySlots.mjs +24 -21
- package/views/day/DayViewMiddleRow.d.ts +7 -5
- package/views/day/DayViewMiddleRow.js +1 -1
- package/views/day/DayViewMiddleRow.mjs +18 -13
- package/views/day/DayViewVerticalRow.d.ts +7 -5
- package/views/day/DayViewVerticalRow.js +1 -1
- package/views/day/DayViewVerticalRow.mjs +23 -17
- package/views/day/DayViewVerticalSlotsRow.d.ts +7 -5
- package/views/day/DayViewVerticalSlotsRow.js +1 -1
- package/views/day/DayViewVerticalSlotsRow.mjs +34 -29
- package/views/day/MultiDayView.d.ts +13 -7
- package/views/day/MultiDayView.js +1 -1
- package/views/day/MultiDayView.mjs +108 -95
- package/views/month/MonthView.d.ts +15 -4
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +105 -68
- package/views/month/MonthViewBody.d.ts +3 -3
- package/views/month/MonthViewBody.js +1 -1
- package/views/month/MonthViewBody.mjs +18 -16
- package/views/time/MultiDayTimelineView.d.ts +6 -4
- package/views/time/MultiDayTimelineView.js +1 -1
- package/views/time/MultiDayTimelineView.mjs +64 -63
- package/views/time/TimelineView.d.ts +2 -0
- package/views/time/TimelineView.js +1 -1
- package/views/time/TimelineView.mjs +5 -3
- package/views/time/TimelineViewBody.d.ts +7 -5
- package/views/time/TimelineViewBody.js +1 -1
- package/views/time/TimelineViewBody.mjs +29 -27
- package/views/week/WeekView.d.ts +2 -0
- package/views/week/WeekView.js +1 -1
- package/views/week/WeekView.mjs +11 -10
- package/views/week/WorkWeekView.d.ts +2 -0
- package/views/week/WorkWeekView.js +1 -1
- package/views/week/WorkWeekView.mjs +17 -16
|
@@ -38,7 +38,7 @@ export interface SchedulerViewProps {
|
|
|
38
38
|
/**
|
|
39
39
|
* Called every time any of the SchedulerView Slots or Items trigger a data action, through editing, deleting or creating new `DataItem`.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
onDataAction?: (action: DataAction) => void;
|
|
42
42
|
/**
|
|
43
43
|
* Specifies the number of days to be shown in the current view.
|
|
44
44
|
*/
|
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-scheduler",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-scheduler",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1793712830,version:"10.2.0-develop.12",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "10.2.0-develop.
|
|
13
|
+
publishDate: 1793712830,
|
|
14
|
+
version: "10.2.0-develop.12",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-scheduler",
|
|
3
|
-
"version": "10.2.0-develop.
|
|
3
|
+
"version": "10.2.0-develop.12",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -27,16 +27,17 @@
|
|
|
27
27
|
"@progress/kendo-date-math": "^1.5.13",
|
|
28
28
|
"@progress/kendo-drawing": "^1.20.1",
|
|
29
29
|
"@progress/kendo-licensing": "^1.12.0",
|
|
30
|
-
"@progress/kendo-vue-common": "10.2.0-develop.
|
|
31
|
-
"@progress/kendo-vue-buttons": "10.2.0-develop.
|
|
32
|
-
"@progress/kendo-vue-dateinputs": "10.2.0-develop.
|
|
33
|
-
"@progress/kendo-vue-dialogs": "10.2.0-develop.
|
|
34
|
-
"@progress/kendo-vue-dropdowns": "10.2.0-develop.
|
|
35
|
-
"@progress/kendo-vue-form": "10.2.0-develop.
|
|
36
|
-
"@progress/kendo-vue-inputs": "10.2.0-develop.
|
|
37
|
-
"@progress/kendo-vue-intl": "10.2.0-develop.
|
|
38
|
-
"@progress/kendo-vue-
|
|
39
|
-
"@progress/kendo-vue-
|
|
30
|
+
"@progress/kendo-vue-common": "10.2.0-develop.12",
|
|
31
|
+
"@progress/kendo-vue-buttons": "10.2.0-develop.12",
|
|
32
|
+
"@progress/kendo-vue-dateinputs": "10.2.0-develop.12",
|
|
33
|
+
"@progress/kendo-vue-dialogs": "10.2.0-develop.12",
|
|
34
|
+
"@progress/kendo-vue-dropdowns": "10.2.0-develop.12",
|
|
35
|
+
"@progress/kendo-vue-form": "10.2.0-develop.12",
|
|
36
|
+
"@progress/kendo-vue-inputs": "10.2.0-develop.12",
|
|
37
|
+
"@progress/kendo-vue-intl": "10.2.0-develop.12",
|
|
38
|
+
"@progress/kendo-vue-labels": "10.2.0-develop.12",
|
|
39
|
+
"@progress/kendo-vue-popup": "10.2.0-develop.12",
|
|
40
|
+
"@progress/kendo-vue-tooltip": "10.2.0-develop.12",
|
|
40
41
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
41
42
|
"vue": "^3.0.2"
|
|
42
43
|
},
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"package": {
|
|
62
63
|
"productName": "Kendo UI for Vue",
|
|
63
64
|
"productCode": "KENDOUIVUE",
|
|
64
|
-
"publishDate":
|
|
65
|
+
"publishDate": 1793712830,
|
|
65
66
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
66
67
|
}
|
|
67
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),p=require("@progress/kendo-vue-intl"),d=require("@progress/kendo-vue-form"),r=require("../messages/main.js"),V=require("@progress/kendo-recurrence"),f=require("@progress/kendo-date-math"),N=require("./RecurrenceFrequencyEditor.js"),O=require("./RecurrenceRepeatOnWeekEditor.js"),l=require("./common.js"),s=require("@progress/kendo-vue-labels"),u=require("@progress/kendo-vue-inputs"),h=require("@progress/kendo-vue-dropdowns"),M=require("@progress/kendo-vue-dateinputs");function i(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!a.isVNode(t)}const W=a.defineComponent({name:"KendoRecurrenceEditor",emits:{change:null},props:{name:String,value:{type:String,default:""},start:Date,timezone:String},inject:{ks:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},computed:{rrule(){return l.getRule(this.$props.value)},frequencies(){return l.getFrequencies(this.localizeMessage)},frequency(){return l.getFrequency(this.rrule)},extendedWeekDays(){return l.getExtendedWeekDays(this.intl,this.localizeMessage)},weekDay(){return l.getWeekDay(this.extendedWeekDays,this.rrule,this.$props.start)},months(){return l.getMonths(this.intl)},month(){return l.getMonth(this.months,this.rrule)},offsets(){return l.getOffsets(this.localizeMessage)},offset(){return l.getOffset(this.offsets,this.rrule)},endRule(){return l.getEndRule(this.rrule)},monthDay(){return l.getMonthDay(this.rrule,this.$props.start)},until(){return l.getUntil(this.rrule)},weekDays(){return l.getWeekDays(this.intl)},repeatOnRule(){return l.getRepeatOnRule(this.rrule)}},data(){return{defaultCount:1,defaultUntil:f.ZonedDate.fromUTCDate(this.$props.start)}},render(){let t,e,n,y,g,k,m;this.intl=p.provideIntlService(this),this.localization=p.provideLocalizationService(this),this.ks.timezone;const o={display:"flex",alignItems:"center",minHeight:30},v=function(){return[a.createVNode(h.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:this.repeatOnRule!=="weekday",dataItems:this.offsets,value:this.offset,onChange:this.handleOffsetChange,style:{width:"auto"}},null),a.createVNode(h.DropDownList,{key:"weekday-value",disabled:this.repeatOnRule!=="weekday",value:this.weekDay,dataItems:this.extendedWeekDays,onChange:this.handleWeekDayChange,textField:"text",dataItemKey:"value",style:{width:"auto"}},null)]},D=function(){return a.createVNode(u.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:this.repeatOnRule!=="monthday",value:this.rrule&&this.rrule.byMonthDay&&this.rrule.byMonthDay[0],onChange:this.handleMonthDayChange,style:{width:"auto"}},null)},b=function(){return[a.createVNode(h.DropDownList,{key:"monthday-month",disabled:this.repeatOnRule!=="monthday",value:this.month,dataItems:this.months,textField:"text",dataItemKey:"value",onChange:this.handleMonthChange,style:{width:"auto"}},null),a.createVNode(u.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:this.repeatOnRule!=="monthday",value:this.monthDay,onChange:this.handleMonthDayChange,style:{width:"auto"}},null)]},C=function(){return[a.createVNode(h.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:this.repeatOnRule!=="weekday",dataItems:this.offsets,value:this.offset,onChange:this.handleOffsetChange,style:{width:"auto"}},null),a.createVNode(h.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:this.repeatOnRule!=="weekday",value:this.weekDay,dataItems:this.extendedWeekDays,onChange:this.handleWeekDayChange,style:{width:"auto"}},null),a.createVNode("span",{key:"yearly-weekday-of-label"},[this.localizeMessage(r.recurrenceEditorYearlyOf,!0)]),a.createVNode(h.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:this.repeatOnRule!=="weekday",value:this.month,dataItems:this.months,onChange:this.handleMonthChange,style:{width:"auto"}},null)]},w=function(){let c;return[a.createVNode(u.NumericTextBox,{key:"endrule-after-editor",id:"k-endrule-after",min:1,style:{width:"70px"},value:this.endRule==="count"?this.rrule.count:this.defaultCount,onChange:this.handleCountChange,disabled:this.endRule!=="count"},null),a.createVNode(s.Label,{key:"endrule-after-label",class:"k-radio-label",editorId:"k-endrule-after"},i(c=this.localizeMessage(r.recurrenceEditorEndOccurrence,!0))?c:{default:()=>[c]})]},R=()=>a.createVNode(M.DatePicker,{key:"k-endrule-until-editor",id:"k-endrule-until",disabled:this.endRule!=="until",min:this.$props.start,value:this.endRule==="until"?this.until:f.toLocalDate(this.defaultUntil),onChange:this.handleUntilChange,style:{width:"auto"}},null);return a.createVNode("div",null,[a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{class:"k-form-label"},i(t=this.localization.toLanguageString(r.recurrenceEditorRepeat,r.messages[r.recurrenceEditorRepeat]))?t:{default:()=>[t]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(N.RecurrenceFrequencyEditor,{value:this.frequency,dataItems:this.frequencies,onChange:this.handleFrequencyChange},null)])]}),this.frequency!=="never"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{editorId:"interval-editor",class:"k-form-label"},i(e=this.localizeMessage(l.capitalize(this.frequency)+"RepeatEvery"))?e:{default:()=>[e]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(u.NumericTextBox,{min:1,step:1,defaultValue:1,value:this.rrule.interval,onChange:this.handleIntervalChange,id:"interval-editor"},null),a.createVNode(s.Label,{editorId:"interval-editor"},i(n=this.localizeMessage(l.capitalize(this.frequency)+"Interval"))?n:{default:()=>[n]})])]}),this.frequency==="weekly"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{class:"k-form-label"},i(y=this.localizeMessage(r.recurrenceEditorWeeklyRepeatOn,!0))?y:{default:()=>[y]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(O.RecurrenceRepeatOnWeekEditor,{dataItems:this.weekDays,value:(this.rrule.byWeekDay||[]).map(({day:c})=>c),onChange:this.handleWeekDaysChange},null)])]}),this.frequency==="monthly"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{key:"recurrence-repeat-on-monthly-label",class:"k-form-label"},i(g=this.localizeMessage(r.recurrenceEditorMonthlyRepeatOn,!0))?g:{default:()=>[g]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(u.RadioGroup,{value:this.repeatOnRule,onChange:this.handleRepeatOnRuleChange,class:"k-reset",dataItems:[{value:"monthday",style:o,label:this.localizeMessage(r.recurrenceEditorMonthlyDay,!0),content:D.call(this)},{value:"weekday",style:o,label:" ",content:v.call(this)}]},null)])]}),this.frequency==="yearly"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{class:"k-form-label"},i(k=this.localizeMessage(r.recurrenceEditorYearlyRepeatOn,!0))?k:{default:()=>[k]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(u.RadioGroup,{value:this.repeatOnRule,onChange:this.handleRepeatOnRuleChange,class:"k-reset",dataItems:[{value:"monthday",label:" ",style:o,content:b.call(this)},{value:"weekday",label:" ",style:o,content:C.call(this)}]},null)])]}),this.frequency!=="never"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{class:"k-form-label"},i(m=this.localizeMessage(r.recurrenceEditorEndLabel,!0))?m:{default:()=>[m]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(u.RadioGroup,{value:this.endRule,onChange:this.handleEndRuleChange,dataItems:[{value:"never",style:o,label:this.localizeMessage(r.recurrenceEditorEndNever,!0)},{value:"count",style:o,label:this.localizeMessage(r.recurrenceEditorEndAfter,!0),content:w.call(this)},{value:"until",style:o,label:this.localizeMessage(r.recurrenceEditorEndOn,!0),content:R.call(this)}]},null)])]})])},methods:{localizeMessage(t,e){const n=e?t:"scheduler.recurrenceEditor"+t;return this.localization.toLanguageString(n,r.messages[n])},onChangeHandler(t){t.freq==="never"?this.$emit("change",{value:null}):(t.weekStart===void 0&&(t.weekStart=this.intl.firstDay()),this.$emit("change",{value:V.serializeRule(t,this.$props.timezone)}))},handleFrequencyChange(t){const e={};e.freq=t,e.interval=1,t==="weekly"&&(e.byWeekDay=[{day:f.ZonedDate.fromLocalDate(this.$props.start,this.timezone).getDay(),offset:0}]),(t==="monthly"||t==="yearly")&&(e.byMonthDay=[this.$props.start.getDate()]),t==="yearly"&&(e.byMonth=[this.$props.start.getMonth()+1]),this.onChangeHandler(e)},handleIntervalChange(t){const e=t.value;this.onChangeHandler(Object.assign({},this.rrule,{interval:e}))},handleCountChange(t){const e=t.value;this.onChangeHandler(Object.assign({},this.rrule,{count:e})),e!==null&&(this.defaultCount=e)},handleUntilChange(t){const e=t.value;if(!e)return;const n=f.ZonedDate.fromLocalDate(e,this.$props.timezone);this.onChangeHandler(Object.assign({},this.rrule,{until:n})),this.defaultUntil=n},handleWeekDaysChange(t){this.onChangeHandler(Object.assign({},this.rrule,{byWeekDay:this.weekDays.filter(e=>t.some(n=>n===e.value)).map(e=>({offset:0,day:e.value}))}))},handleWeekDayChange(t){const e=Object.assign({},this.rrule),n=t.target.value;typeof n.value=="string"?(e.byWeekDay=l.weekDayRuleFromString(n.value),e.bySetPosition=[this.offset.value]):e.byWeekDay=[{day:n.value,offset:this.offset.value}],this.onChangeHandler(e)},handleMonthDayChange(t){this.onChangeHandler(Object.assign({},this.rrule,{byMonthDay:[t.value]}))},handleMonthChange(t){const e=t.value;this.onChangeHandler(Object.assign({},this.rrule,{byMonth:[e.value]}))},handleEndRuleChange(t){const e=t.value,n=Object.assign({},this.rrule);switch(e){case"never":n.until=void 0,n.count=void 0;break;case"count":n.until=void 0,n.count=this.defaultCount;break;case"until":n.until=this.defaultUntil,n.count=void 0;break}this.onChangeHandler(n)},handleRepeatOnRuleChange(t){const e=Object.assign({},this.rrule);t.value==="monthday"?(e.byWeekDay=void 0,e.bySetPosition=void 0,e.byMonthDay=[this.monthDay]):t.value==="weekday"&&(e.byMonthDay=void 0,typeof this.weekDay.value=="string"?(e.bySetPosition=[this.offset.value],e.byWeekDay=l.weekDayRuleFromString(this.weekDay.value)):e.byWeekDay=[{day:this.weekDay.value,offset:this.offset.value}]),this.onChangeHandler(e)},handleOffsetChange(t){const e=Object.assign({},this.rrule),n=t.value;if(e.byWeekDay)switch(e.byWeekDay.length){case 7:case 5:case 2:e.bySetPosition=[n.value];break;case 1:e.byWeekDay[0].offset=n.value;break}this.onChangeHandler(e)}}});exports.RecurrenceEditor=W;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),p=require("@progress/kendo-vue-intl"),d=require("@progress/kendo-vue-form"),r=require("../messages/main.js"),V=require("@progress/kendo-recurrence"),m=require("@progress/kendo-date-math"),N=require("./RecurrenceFrequencyEditor.js"),O=require("./RecurrenceRepeatOnWeekEditor.js"),l=require("./common.js"),s=require("@progress/kendo-vue-labels"),u=require("@progress/kendo-vue-inputs"),h=require("@progress/kendo-vue-dropdowns"),M=require("@progress/kendo-vue-dateinputs");function i(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!a.isVNode(t)}const W=a.defineComponent({name:"KendoRecurrenceEditor",emits:{change:null},props:{name:String,value:{type:String,default:""},start:Date,timezone:String},inject:{ks:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},computed:{rrule(){return l.getRule(this.$props.value)},frequencies(){return l.getFrequencies(this.localizeMessage)},frequency(){return l.getFrequency(this.rrule)},extendedWeekDays(){return l.getExtendedWeekDays(this.intl,this.localizeMessage)},weekDay(){return l.getWeekDay(this.extendedWeekDays,this.rrule,this.$props.start)},months(){return l.getMonths(this.intl)},month(){return l.getMonth(this.months,this.rrule)},offsets(){return l.getOffsets(this.localizeMessage)},offset(){return l.getOffset(this.offsets,this.rrule)},endRule(){return l.getEndRule(this.rrule)},monthDay(){return l.getMonthDay(this.rrule,this.$props.start)},until(){return l.getUntil(this.rrule)},weekDays(){return l.getWeekDays(this.intl)},repeatOnRule(){return l.getRepeatOnRule(this.rrule)}},data(){return{defaultCount:1,defaultUntil:l.toUntilEndOfDay(this.$props.start,this.$props.timezone)}},render(){let t,e,n,y,f,g,k;this.intl=p.provideIntlService(this),this.localization=p.provideLocalizationService(this),this.ks.timezone;const o={display:"flex",alignItems:"center",minHeight:30},v=function(){return[a.createVNode(h.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:this.repeatOnRule!=="weekday",dataItems:this.offsets,value:this.offset,onChange:this.handleOffsetChange,style:{width:"auto"}},null),a.createVNode(h.DropDownList,{key:"weekday-value",disabled:this.repeatOnRule!=="weekday",value:this.weekDay,dataItems:this.extendedWeekDays,onChange:this.handleWeekDayChange,textField:"text",dataItemKey:"value",style:{width:"auto"}},null)]},D=function(){return a.createVNode(u.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:this.repeatOnRule!=="monthday",value:this.rrule&&this.rrule.byMonthDay&&this.rrule.byMonthDay[0],onChange:this.handleMonthDayChange,style:{width:"auto"}},null)},b=function(){return[a.createVNode(h.DropDownList,{key:"monthday-month",disabled:this.repeatOnRule!=="monthday",value:this.month,dataItems:this.months,textField:"text",dataItemKey:"value",onChange:this.handleMonthChange,style:{width:"auto"}},null),a.createVNode(u.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:this.repeatOnRule!=="monthday",value:this.monthDay,onChange:this.handleMonthDayChange,style:{width:"auto"}},null)]},C=function(){return[a.createVNode(h.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:this.repeatOnRule!=="weekday",dataItems:this.offsets,value:this.offset,onChange:this.handleOffsetChange,style:{width:"auto"}},null),a.createVNode(h.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:this.repeatOnRule!=="weekday",value:this.weekDay,dataItems:this.extendedWeekDays,onChange:this.handleWeekDayChange,style:{width:"auto"}},null),a.createVNode("span",{key:"yearly-weekday-of-label"},[this.localizeMessage(r.recurrenceEditorYearlyOf,!0)]),a.createVNode(h.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:this.repeatOnRule!=="weekday",value:this.month,dataItems:this.months,onChange:this.handleMonthChange,style:{width:"auto"}},null)]},w=function(){let c;return[a.createVNode(u.NumericTextBox,{key:"endrule-after-editor",id:"k-endrule-after",min:1,style:{width:"70px"},value:this.endRule==="count"?this.rrule.count:this.defaultCount,onChange:this.handleCountChange,disabled:this.endRule!=="count"},null),a.createVNode(s.Label,{key:"endrule-after-label",class:"k-radio-label",editorId:"k-endrule-after"},i(c=this.localizeMessage(r.recurrenceEditorEndOccurrence,!0))?c:{default:()=>[c]})]},R=()=>a.createVNode(M.DatePicker,{key:"k-endrule-until-editor",id:"k-endrule-until",disabled:this.endRule!=="until",min:this.$props.start,value:this.endRule==="until"?this.until:m.toLocalDate(this.defaultUntil),onChange:this.handleUntilChange,style:{width:"auto"}},null);return a.createVNode("div",null,[a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{class:"k-form-label"},i(t=this.localization.toLanguageString(r.recurrenceEditorRepeat,r.messages[r.recurrenceEditorRepeat]))?t:{default:()=>[t]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(N.RecurrenceFrequencyEditor,{value:this.frequency,dataItems:this.frequencies,onChange:this.handleFrequencyChange},null)])]}),this.frequency!=="never"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{editorId:"interval-editor",class:"k-form-label"},i(e=this.localizeMessage(l.capitalize(this.frequency)+"RepeatEvery"))?e:{default:()=>[e]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(u.NumericTextBox,{min:1,step:1,defaultValue:1,value:this.rrule.interval,onChange:this.handleIntervalChange,id:"interval-editor"},null),a.createVNode(s.Label,{editorId:"interval-editor"},i(n=this.localizeMessage(l.capitalize(this.frequency)+"Interval"))?n:{default:()=>[n]})])]}),this.frequency==="weekly"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{class:"k-form-label"},i(y=this.localizeMessage(r.recurrenceEditorWeeklyRepeatOn,!0))?y:{default:()=>[y]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(O.RecurrenceRepeatOnWeekEditor,{dataItems:this.weekDays,value:(this.rrule.byWeekDay||[]).map(({day:c})=>c),onChange:this.handleWeekDaysChange},null)])]}),this.frequency==="monthly"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{key:"recurrence-repeat-on-monthly-label",class:"k-form-label"},i(f=this.localizeMessage(r.recurrenceEditorMonthlyRepeatOn,!0))?f:{default:()=>[f]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(u.RadioGroup,{value:this.repeatOnRule,onChange:this.handleRepeatOnRuleChange,class:"k-reset",dataItems:[{value:"monthday",style:o,label:this.localizeMessage(r.recurrenceEditorMonthlyDay,!0),content:D.call(this)},{value:"weekday",style:o,label:" ",content:v.call(this)}]},null)])]}),this.frequency==="yearly"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{class:"k-form-label"},i(g=this.localizeMessage(r.recurrenceEditorYearlyRepeatOn,!0))?g:{default:()=>[g]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(u.RadioGroup,{value:this.repeatOnRule,onChange:this.handleRepeatOnRuleChange,class:"k-reset",dataItems:[{value:"monthday",label:" ",style:o,content:b.call(this)},{value:"weekday",label:" ",style:o,content:C.call(this)}]},null)])]}),this.frequency!=="never"&&a.createVNode(d.FieldWrapper,null,{default:()=>[a.createVNode(s.Label,{class:"k-form-label"},i(k=this.localizeMessage(r.recurrenceEditorEndLabel,!0))?k:{default:()=>[k]}),a.createVNode("div",{class:"k-form-field-wrap"},[a.createVNode(u.RadioGroup,{value:this.endRule,onChange:this.handleEndRuleChange,dataItems:[{value:"never",style:o,label:this.localizeMessage(r.recurrenceEditorEndNever,!0)},{value:"count",style:o,label:this.localizeMessage(r.recurrenceEditorEndAfter,!0),content:w.call(this)},{value:"until",style:o,label:this.localizeMessage(r.recurrenceEditorEndOn,!0),content:R.call(this)}]},null)])]})])},methods:{localizeMessage(t,e){const n=e?t:"scheduler.recurrenceEditor"+t;return this.localization.toLanguageString(n,r.messages[n])},onChangeHandler(t){t.freq==="never"?this.$emit("change",{value:null}):(t.weekStart===void 0&&(t.weekStart=this.intl.firstDay()),this.$emit("change",{value:V.serializeRule(t,this.$props.timezone)}))},handleFrequencyChange(t){const e={};e.freq=t,e.interval=1,t==="weekly"&&(e.byWeekDay=[{day:m.ZonedDate.fromLocalDate(this.$props.start,this.timezone).getDay(),offset:0}]),(t==="monthly"||t==="yearly")&&(e.byMonthDay=[this.$props.start.getDate()]),t==="yearly"&&(e.byMonth=[this.$props.start.getMonth()+1]),this.onChangeHandler(e)},handleIntervalChange(t){const e=t.value;this.onChangeHandler(Object.assign({},this.rrule,{interval:e}))},handleCountChange(t){const e=t.value;this.onChangeHandler(Object.assign({},this.rrule,{count:e})),e!==null&&(this.defaultCount=e)},handleUntilChange(t){const e=t.value;if(!e)return;const n=l.toUntilEndOfDay(e,this.$props.timezone);this.onChangeHandler(Object.assign({},this.rrule,{until:n})),this.defaultUntil=n},handleWeekDaysChange(t){this.onChangeHandler(Object.assign({},this.rrule,{byWeekDay:this.weekDays.filter(e=>t.some(n=>n===e.value)).map(e=>({offset:0,day:e.value}))}))},handleWeekDayChange(t){const e=Object.assign({},this.rrule),n=t.target.value;typeof n.value=="string"?(e.byWeekDay=l.weekDayRuleFromString(n.value),e.bySetPosition=[this.offset.value]):e.byWeekDay=[{day:n.value,offset:this.offset.value}],this.onChangeHandler(e)},handleMonthDayChange(t){this.onChangeHandler(Object.assign({},this.rrule,{byMonthDay:[t.value]}))},handleMonthChange(t){const e=t.value;this.onChangeHandler(Object.assign({},this.rrule,{byMonth:[e.value]}))},handleEndRuleChange(t){const e=t.value,n=Object.assign({},this.rrule);switch(e){case"never":n.until=void 0,n.count=void 0;break;case"count":n.until=void 0,n.count=this.defaultCount;break;case"until":n.until=this.defaultUntil,n.count=void 0;break}this.onChangeHandler(n)},handleRepeatOnRuleChange(t){const e=Object.assign({},this.rrule);t.value==="monthday"?(e.byWeekDay=void 0,e.bySetPosition=void 0,e.byMonthDay=[this.monthDay]):t.value==="weekday"&&(e.byMonthDay=void 0,typeof this.weekDay.value=="string"?(e.bySetPosition=[this.offset.value],e.byWeekDay=l.weekDayRuleFromString(this.weekDay.value)):e.byWeekDay=[{day:this.weekDay.value,offset:this.offset.value}]),this.onChangeHandler(e)},handleOffsetChange(t){const e=Object.assign({},this.rrule),n=t.value;if(e.byWeekDay)switch(e.byWeekDay.length){case 7:case 5:case 2:e.bySetPosition=[n.value];break;case 1:e.byWeekDay[0].offset=n.value;break}this.onChangeHandler(e)}}});exports.RecurrenceEditor=W;
|
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
8
|
+
import { defineComponent as z, createVNode as a, isVNode as W } from "vue";
|
|
9
9
|
import { provideIntlService as E, provideLocalizationService as I } from "@progress/kendo-vue-intl";
|
|
10
10
|
import { FieldWrapper as r } from "@progress/kendo-vue-form";
|
|
11
|
-
import { messages as
|
|
11
|
+
import { messages as m, recurrenceEditorRepeat as k, recurrenceEditorWeeklyRepeatOn as x, recurrenceEditorMonthlyRepeatOn as S, recurrenceEditorMonthlyDay as j, recurrenceEditorYearlyRepeatOn as q, recurrenceEditorEndLabel as H, recurrenceEditorEndNever as $, recurrenceEditorEndAfter as U, recurrenceEditorEndOn as F, recurrenceEditorYearlyOf as L, recurrenceEditorEndOccurrence as _ } from "../messages/main.mjs";
|
|
12
12
|
import { serializeRule as K } from "@progress/kendo-recurrence";
|
|
13
|
-
import { ZonedDate as
|
|
14
|
-
import { RecurrenceFrequencyEditor as
|
|
15
|
-
import { RecurrenceRepeatOnWeekEditor as
|
|
16
|
-
import { weekDayRuleFromString as p, capitalize as b, getRepeatOnRule as
|
|
13
|
+
import { ZonedDate as P, toLocalDate as N } from "@progress/kendo-date-math";
|
|
14
|
+
import { RecurrenceFrequencyEditor as V } from "./RecurrenceFrequencyEditor.mjs";
|
|
15
|
+
import { RecurrenceRepeatOnWeekEditor as Y } from "./RecurrenceRepeatOnWeekEditor.mjs";
|
|
16
|
+
import { weekDayRuleFromString as v, toUntilEndOfDay as p, capitalize as b, getRepeatOnRule as A, getWeekDays as B, getUntil as G, getMonthDay as T, getEndRule as Z, getOffset as J, getOffsets as Q, getMonth as X, getMonths as ee, getWeekDay as te, getExtendedWeekDays as ae, getFrequency as ne, getFrequencies as le, getRule as se } from "./common.mjs";
|
|
17
17
|
import { Label as l } from "@progress/kendo-vue-labels";
|
|
18
|
-
import { NumericTextBox as d, RadioGroup as
|
|
18
|
+
import { NumericTextBox as d, RadioGroup as g } from "@progress/kendo-vue-inputs";
|
|
19
19
|
import { DropDownList as o } from "@progress/kendo-vue-dropdowns";
|
|
20
|
-
import { DatePicker as
|
|
20
|
+
import { DatePicker as ie } from "@progress/kendo-vue-dateinputs";
|
|
21
21
|
function s(t) {
|
|
22
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
22
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !W(t);
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const be = /* @__PURE__ */ z({
|
|
25
25
|
name: "KendoRecurrenceEditor",
|
|
26
26
|
emits: {
|
|
27
27
|
change: null
|
|
@@ -48,52 +48,52 @@ const pe = /* @__PURE__ */ W({
|
|
|
48
48
|
},
|
|
49
49
|
computed: {
|
|
50
50
|
rrule() {
|
|
51
|
-
return
|
|
51
|
+
return se(this.$props.value);
|
|
52
52
|
},
|
|
53
53
|
frequencies() {
|
|
54
|
-
return
|
|
54
|
+
return le(this.localizeMessage);
|
|
55
55
|
},
|
|
56
56
|
frequency() {
|
|
57
|
-
return
|
|
57
|
+
return ne(this.rrule);
|
|
58
58
|
},
|
|
59
59
|
extendedWeekDays() {
|
|
60
|
-
return
|
|
60
|
+
return ae(this.intl, this.localizeMessage);
|
|
61
61
|
},
|
|
62
62
|
weekDay() {
|
|
63
|
-
return
|
|
63
|
+
return te(this.extendedWeekDays, this.rrule, this.$props.start);
|
|
64
64
|
},
|
|
65
65
|
months() {
|
|
66
|
-
return
|
|
66
|
+
return ee(this.intl);
|
|
67
67
|
},
|
|
68
68
|
month() {
|
|
69
|
-
return
|
|
69
|
+
return X(this.months, this.rrule);
|
|
70
70
|
},
|
|
71
71
|
offsets() {
|
|
72
|
-
return
|
|
72
|
+
return Q(this.localizeMessage);
|
|
73
73
|
},
|
|
74
74
|
offset() {
|
|
75
|
-
return
|
|
75
|
+
return J(this.offsets, this.rrule);
|
|
76
76
|
},
|
|
77
77
|
endRule() {
|
|
78
|
-
return
|
|
78
|
+
return Z(this.rrule);
|
|
79
79
|
},
|
|
80
80
|
monthDay() {
|
|
81
|
-
return
|
|
81
|
+
return T(this.rrule, this.$props.start);
|
|
82
82
|
},
|
|
83
83
|
until() {
|
|
84
|
-
return
|
|
84
|
+
return G(this.rrule);
|
|
85
85
|
},
|
|
86
86
|
weekDays() {
|
|
87
|
-
return
|
|
87
|
+
return B(this.intl);
|
|
88
88
|
},
|
|
89
89
|
repeatOnRule() {
|
|
90
|
-
return
|
|
90
|
+
return A(this.rrule);
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
data() {
|
|
94
94
|
return {
|
|
95
95
|
defaultCount: 1,
|
|
96
|
-
defaultUntil:
|
|
96
|
+
defaultUntil: p(this.$props.start, this.$props.timezone)
|
|
97
97
|
};
|
|
98
98
|
},
|
|
99
99
|
render() {
|
|
@@ -187,7 +187,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
187
187
|
}
|
|
188
188
|
}, null), a("span", {
|
|
189
189
|
key: "yearly-weekday-of-label"
|
|
190
|
-
}, [this.localizeMessage(
|
|
190
|
+
}, [this.localizeMessage(L, !0)]), a(o, {
|
|
191
191
|
key: "yearly-weekday-month",
|
|
192
192
|
textField: "text",
|
|
193
193
|
dataItemKey: "value",
|
|
@@ -218,12 +218,12 @@ const pe = /* @__PURE__ */ W({
|
|
|
218
218
|
}, s(u = this.localizeMessage(_, !0)) ? u : {
|
|
219
219
|
default: () => [u]
|
|
220
220
|
})];
|
|
221
|
-
}, M = () => a(
|
|
221
|
+
}, M = () => a(ie, {
|
|
222
222
|
key: "k-endrule-until-editor",
|
|
223
223
|
id: "k-endrule-until",
|
|
224
224
|
disabled: this.endRule !== "until",
|
|
225
225
|
min: this.$props.start,
|
|
226
|
-
value: this.endRule === "until" ? this.until :
|
|
226
|
+
value: this.endRule === "until" ? this.until : N(this.defaultUntil),
|
|
227
227
|
onChange: this.handleUntilChange,
|
|
228
228
|
style: {
|
|
229
229
|
width: "auto"
|
|
@@ -232,11 +232,11 @@ const pe = /* @__PURE__ */ W({
|
|
|
232
232
|
return a("div", null, [a(r, null, {
|
|
233
233
|
default: () => [a(l, {
|
|
234
234
|
class: "k-form-label"
|
|
235
|
-
}, s(t = this.localization.toLanguageString(
|
|
235
|
+
}, s(t = this.localization.toLanguageString(k, m[k])) ? t : {
|
|
236
236
|
default: () => [t]
|
|
237
237
|
}), a("div", {
|
|
238
238
|
class: "k-form-field-wrap"
|
|
239
|
-
}, [a(
|
|
239
|
+
}, [a(V, {
|
|
240
240
|
value: this.frequency,
|
|
241
241
|
dataItems: this.frequencies,
|
|
242
242
|
onChange: this.handleFrequencyChange
|
|
@@ -268,7 +268,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
268
268
|
default: () => [h]
|
|
269
269
|
}), a("div", {
|
|
270
270
|
class: "k-form-field-wrap"
|
|
271
|
-
}, [a(
|
|
271
|
+
}, [a(Y, {
|
|
272
272
|
dataItems: this.weekDays,
|
|
273
273
|
value: (this.rrule.byWeekDay || []).map(({
|
|
274
274
|
day: u
|
|
@@ -283,7 +283,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
283
283
|
default: () => [y]
|
|
284
284
|
}), a("div", {
|
|
285
285
|
class: "k-form-field-wrap"
|
|
286
|
-
}, [a(
|
|
286
|
+
}, [a(g, {
|
|
287
287
|
value: this.repeatOnRule,
|
|
288
288
|
onChange: this.handleRepeatOnRuleChange,
|
|
289
289
|
class: "k-reset",
|
|
@@ -306,7 +306,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
306
306
|
default: () => [c]
|
|
307
307
|
}), a("div", {
|
|
308
308
|
class: "k-form-field-wrap"
|
|
309
|
-
}, [a(
|
|
309
|
+
}, [a(g, {
|
|
310
310
|
value: this.repeatOnRule,
|
|
311
311
|
onChange: this.handleRepeatOnRuleChange,
|
|
312
312
|
class: "k-reset",
|
|
@@ -329,7 +329,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
329
329
|
default: () => [f]
|
|
330
330
|
}), a("div", {
|
|
331
331
|
class: "k-form-field-wrap"
|
|
332
|
-
}, [a(
|
|
332
|
+
}, [a(g, {
|
|
333
333
|
value: this.endRule,
|
|
334
334
|
onChange: this.handleEndRuleChange,
|
|
335
335
|
dataItems: [{
|
|
@@ -339,12 +339,12 @@ const pe = /* @__PURE__ */ W({
|
|
|
339
339
|
}, {
|
|
340
340
|
value: "count",
|
|
341
341
|
style: i,
|
|
342
|
-
label: this.localizeMessage(
|
|
342
|
+
label: this.localizeMessage(U, !0),
|
|
343
343
|
content: O.call(this)
|
|
344
344
|
}, {
|
|
345
345
|
value: "until",
|
|
346
346
|
style: i,
|
|
347
|
-
label: this.localizeMessage(
|
|
347
|
+
label: this.localizeMessage(F, !0),
|
|
348
348
|
content: M.call(this)
|
|
349
349
|
}]
|
|
350
350
|
}, null)])]
|
|
@@ -353,7 +353,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
353
353
|
methods: {
|
|
354
354
|
localizeMessage(t, e) {
|
|
355
355
|
const n = e ? t : "scheduler.recurrenceEditor" + t;
|
|
356
|
-
return this.localization.toLanguageString(n,
|
|
356
|
+
return this.localization.toLanguageString(n, m[n]);
|
|
357
357
|
},
|
|
358
358
|
onChangeHandler(t) {
|
|
359
359
|
t.freq === "never" ? this.$emit("change", {
|
|
@@ -365,7 +365,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
365
365
|
handleFrequencyChange(t) {
|
|
366
366
|
const e = {};
|
|
367
367
|
e.freq = t, e.interval = 1, t === "weekly" && (e.byWeekDay = [{
|
|
368
|
-
day:
|
|
368
|
+
day: P.fromLocalDate(this.$props.start, this.timezone).getDay(),
|
|
369
369
|
offset: 0
|
|
370
370
|
}]), (t === "monthly" || t === "yearly") && (e.byMonthDay = [this.$props.start.getDate()]), t === "yearly" && (e.byMonth = [this.$props.start.getMonth() + 1]), this.onChangeHandler(e);
|
|
371
371
|
},
|
|
@@ -385,7 +385,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
385
385
|
const e = t.value;
|
|
386
386
|
if (!e)
|
|
387
387
|
return;
|
|
388
|
-
const n =
|
|
388
|
+
const n = p(e, this.$props.timezone);
|
|
389
389
|
this.onChangeHandler(Object.assign({}, this.rrule, {
|
|
390
390
|
until: n
|
|
391
391
|
})), this.defaultUntil = n;
|
|
@@ -400,7 +400,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
400
400
|
},
|
|
401
401
|
handleWeekDayChange(t) {
|
|
402
402
|
const e = Object.assign({}, this.rrule), n = t.target.value;
|
|
403
|
-
typeof n.value == "string" ? (e.byWeekDay =
|
|
403
|
+
typeof n.value == "string" ? (e.byWeekDay = v(n.value), e.bySetPosition = [this.offset.value]) : e.byWeekDay = [{
|
|
404
404
|
day: n.value,
|
|
405
405
|
offset: this.offset.value
|
|
406
406
|
}], this.onChangeHandler(e);
|
|
@@ -433,7 +433,7 @@ const pe = /* @__PURE__ */ W({
|
|
|
433
433
|
},
|
|
434
434
|
handleRepeatOnRuleChange(t) {
|
|
435
435
|
const e = Object.assign({}, this.rrule);
|
|
436
|
-
t.value === "monthday" ? (e.byWeekDay = void 0, e.bySetPosition = void 0, e.byMonthDay = [this.monthDay]) : t.value === "weekday" && (e.byMonthDay = void 0, typeof this.weekDay.value == "string" ? (e.bySetPosition = [this.offset.value], e.byWeekDay =
|
|
436
|
+
t.value === "monthday" ? (e.byWeekDay = void 0, e.bySetPosition = void 0, e.byMonthDay = [this.monthDay]) : t.value === "weekday" && (e.byMonthDay = void 0, typeof this.weekDay.value == "string" ? (e.bySetPosition = [this.offset.value], e.byWeekDay = v(this.weekDay.value)) : e.byWeekDay = [{
|
|
437
437
|
day: this.weekDay.value,
|
|
438
438
|
offset: this.offset.value
|
|
439
439
|
}]), this.onChangeHandler(e);
|
|
@@ -456,5 +456,5 @@ const pe = /* @__PURE__ */ W({
|
|
|
456
456
|
}
|
|
457
457
|
});
|
|
458
458
|
export {
|
|
459
|
-
|
|
459
|
+
be as RecurrenceEditor
|
|
460
460
|
};
|
package/recurrence/common.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { OffsetPosition } from './types/OffsetPosition';
|
|
9
9
|
import { RecurrenceRule } from '@progress/kendo-recurrence';
|
|
10
|
+
import { ZonedDate } from '@progress/kendo-date-math';
|
|
10
11
|
import { Frequency } from './types/Frequency';
|
|
11
12
|
import { WeekDayRule } from './types/WeekDayRule';
|
|
12
13
|
import { FrequencyEntity } from './types/FrequencyEntity';
|
|
@@ -58,6 +59,15 @@ export declare const getRepeatOnRule: (rrule: RecurrenceRule) => RepeatOnRule |
|
|
|
58
59
|
export declare const getMonth: (months: MonthEntity[], rrule: RecurrenceRule) => MonthEntity;
|
|
59
60
|
/** @hidden */
|
|
60
61
|
export declare const getMonthDay: (rrule: RecurrenceRule, start: Date) => number;
|
|
62
|
+
/**
|
|
63
|
+
* @hidden
|
|
64
|
+
*
|
|
65
|
+
* Builds the recurrence UNTIL boundary for the selected calendar day. The time is
|
|
66
|
+
* pinned to the end of that day (23:59:59) in the scheduler `timezone`, so every
|
|
67
|
+
* occurrence on the last day is included regardless of the event's start time or
|
|
68
|
+
* the editor's browser timezone.
|
|
69
|
+
*/
|
|
70
|
+
export declare const toUntilEndOfDay: (date: Date, timezone: string) => ZonedDate;
|
|
61
71
|
/** @hidden */
|
|
62
72
|
export declare const getUntilEnd: (start: Date, until: Date | null) => Date;
|
|
63
73
|
/** @hidden */
|
package/recurrence/common.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../utils/main.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../utils/main.js"),g=require("@progress/kendo-recurrence"),r=require("@progress/kendo-date-math"),y=e=>e.charAt(0).toUpperCase()+e.slice(1),c=["first","second","third","fourth","last"],i=["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}],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}],D=e=>{switch(e){case"day":return d;case"weekday":return u;case"weekend":return f}},b=e=>g.parseRule({recurrenceRule:e})||{},m=e=>i.map(t=>({value:t,text:e("Frequencies"+y(t))})),h=e=>s.isPresent(e)&&!s.isNullOrEmptyString(e.freq)?e.freq:"never",p=e=>s.isPresent(e.until)?r.toLocalDate(e.until):null,R=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,o)=>({text:a,value:o}));return n.slice(t).concat(n.slice(0,t))},W=(e,t,n)=>{let a=n.getDay();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}return e.find(o=>a===o.value)||e[0]},v=(e,t)=>{const n=e.firstDay(),a=e.dateFormatNames({type:"days",nameType:"wide"}).map((l,k)=>({text:l,value:k})),o=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(o)},F=(e,t)=>e.find(n=>n.value===(t.bySetPosition?t.bySetPosition[0]:t.byWeekDay&&t.byWeekDay[0]?t.byWeekDay[0].offset:1))||e[0],O=e=>{const t=[1,2,3,4,-1];return c.map((n,a)=>({text:e("OffsetPositions"+y(n)),value:t[a]}))},E=e=>s.isPresent(e.count)?"count":s.isPresent(e.until)?"until":"never",S=e=>{if(s.isPresent(e.byWeekDay))return"weekday";if(s.isPresent(e.byMonthDay))return"monthday"},P=(e,t)=>e.find(n=>(t.byMonth?t.byMonth[0]:null)===n.value)||e[0],M=(e,t)=>s.isPresent(e.byMonthDay)&&e.byMonthDay.length>0?e.byMonthDay[0]:t.getDate(),N=(e,t)=>r.ZonedDate.fromUTCDate(new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59)),t);exports.FREQUENCIES=i;exports.OFFSET_POSITIONS=c;exports.capitalize=y;exports.dayRule=d;exports.getEndRule=E;exports.getExtendedWeekDays=v;exports.getFrequencies=m;exports.getFrequency=h;exports.getMonth=P;exports.getMonthDay=M;exports.getMonths=R;exports.getOffset=F;exports.getOffsets=O;exports.getRepeatOnRule=S;exports.getRule=b;exports.getUntil=p;exports.getWeekDay=W;exports.getWeekDays=w;exports.toUntilEndOfDay=N;exports.weekDayRuleFromString=D;exports.weekdayRule=u;exports.weekendRule=f;
|
package/recurrence/common.mjs
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { isPresent as s, isNullOrEmptyString as
|
|
9
|
-
import { parseRule as
|
|
10
|
-
import {
|
|
11
|
-
const y = (e) => e.charAt(0).toUpperCase() + e.slice(1),
|
|
8
|
+
import { isPresent as s, isNullOrEmptyString as f } from "../utils/main.mjs";
|
|
9
|
+
import { parseRule as d } from "@progress/kendo-recurrence";
|
|
10
|
+
import { ZonedDate as i, toLocalDate as u } from "@progress/kendo-date-math";
|
|
11
|
+
const y = (e) => e.charAt(0).toUpperCase() + e.slice(1), l = ["first", "second", "third", "fourth", "last"], k = ["never", "daily", "weekly", "monthly", "yearly"], D = [
|
|
12
12
|
{ day: 0, offset: 0 },
|
|
13
13
|
{ day: 1, offset: 0 },
|
|
14
14
|
{ day: 2, offset: 0 },
|
|
@@ -22,29 +22,29 @@ const y = (e) => e.charAt(0).toUpperCase() + e.slice(1), u = ["first", "second",
|
|
|
22
22
|
{ day: 3, offset: 0 },
|
|
23
23
|
{ day: 4, offset: 0 },
|
|
24
24
|
{ day: 5, offset: 0 }
|
|
25
|
-
],
|
|
25
|
+
], b = [
|
|
26
26
|
{ day: 0, offset: 0 },
|
|
27
27
|
{ day: 6, offset: 0 }
|
|
28
|
-
],
|
|
28
|
+
], v = (e) => {
|
|
29
29
|
switch (e) {
|
|
30
30
|
case "day":
|
|
31
|
-
return
|
|
31
|
+
return D;
|
|
32
32
|
case "weekday":
|
|
33
33
|
return m;
|
|
34
34
|
case "weekend":
|
|
35
|
-
return
|
|
35
|
+
return b;
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, W = (e) => d({ recurrenceRule: e }) || {}, R = (e) => k.map((t) => ({
|
|
38
38
|
value: t,
|
|
39
39
|
text: e("Frequencies" + y(t))
|
|
40
|
-
})),
|
|
40
|
+
})), F = (e) => s(e) && !f(e.freq) ? e.freq : "never", x = (e) => s(e.until) ? u(e.until) : null, N = (e) => e.dateFormatNames({
|
|
41
41
|
type: "months",
|
|
42
42
|
nameType: "wide",
|
|
43
43
|
standAlone: !0
|
|
44
44
|
}).map((t, a) => ({
|
|
45
45
|
text: t,
|
|
46
46
|
value: a + 1
|
|
47
|
-
})),
|
|
47
|
+
})), O = (e) => {
|
|
48
48
|
const t = e.firstDay(), a = e.dateFormatNames({
|
|
49
49
|
type: "days",
|
|
50
50
|
nameType: "abbreviated"
|
|
@@ -53,7 +53,7 @@ const y = (e) => e.charAt(0).toUpperCase() + e.slice(1), u = ["first", "second",
|
|
|
53
53
|
value: o
|
|
54
54
|
}));
|
|
55
55
|
return a.slice(t).concat(a.slice(0, t));
|
|
56
|
-
},
|
|
56
|
+
}, E = (e, t, a) => {
|
|
57
57
|
let n = a.getDay();
|
|
58
58
|
if (s(t.byWeekDay))
|
|
59
59
|
switch (t.byWeekDay.length) {
|
|
@@ -71,7 +71,7 @@ const y = (e) => e.charAt(0).toUpperCase() + e.slice(1), u = ["first", "second",
|
|
|
71
71
|
break;
|
|
72
72
|
}
|
|
73
73
|
return e.find((o) => n === o.value) || e[0];
|
|
74
|
-
},
|
|
74
|
+
}, M = (e, t) => {
|
|
75
75
|
const a = e.firstDay(), n = e.dateFormatNames({
|
|
76
76
|
type: "days",
|
|
77
77
|
nameType: "wide"
|
|
@@ -84,38 +84,42 @@ const y = (e) => e.charAt(0).toUpperCase() + e.slice(1), u = ["first", "second",
|
|
|
84
84
|
{ text: t("WeekdaysWeekday"), value: "weekday" },
|
|
85
85
|
{ text: t("WeekdaysWeekendday"), value: "weekend" }
|
|
86
86
|
].concat(o);
|
|
87
|
-
},
|
|
87
|
+
}, S = (e, t) => e.find((a) => a.value === (t.bySetPosition ? t.bySetPosition[0] : t.byWeekDay && t.byWeekDay[0] ? t.byWeekDay[0].offset : 1)) || e[0], T = (e) => {
|
|
88
88
|
const t = [1, 2, 3, 4, -1];
|
|
89
|
-
return
|
|
89
|
+
return l.map((a, n) => ({
|
|
90
90
|
text: e("OffsetPositions" + y(a)),
|
|
91
91
|
value: t[n]
|
|
92
92
|
}));
|
|
93
|
-
},
|
|
93
|
+
}, C = (e) => s(e.count) ? "count" : s(e.until) ? "until" : "never", U = (e) => {
|
|
94
94
|
if (s(e.byWeekDay))
|
|
95
95
|
return "weekday";
|
|
96
96
|
if (s(e.byMonthDay))
|
|
97
97
|
return "monthday";
|
|
98
|
-
},
|
|
98
|
+
}, P = (e, t) => e.find((a) => (t.byMonth ? t.byMonth[0] : null) === a.value) || e[0], q = (e, t) => s(e.byMonthDay) && e.byMonthDay.length > 0 ? e.byMonthDay[0] : t.getDate(), I = (e, t) => i.fromUTCDate(
|
|
99
|
+
new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), 23, 59, 59)),
|
|
100
|
+
t
|
|
101
|
+
);
|
|
99
102
|
export {
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
k as FREQUENCIES,
|
|
104
|
+
l as OFFSET_POSITIONS,
|
|
102
105
|
y as capitalize,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
D as dayRule,
|
|
107
|
+
C as getEndRule,
|
|
108
|
+
M as getExtendedWeekDays,
|
|
109
|
+
R as getFrequencies,
|
|
110
|
+
F as getFrequency,
|
|
111
|
+
P as getMonth,
|
|
112
|
+
q as getMonthDay,
|
|
113
|
+
N as getMonths,
|
|
114
|
+
S as getOffset,
|
|
115
|
+
T as getOffsets,
|
|
116
|
+
U as getRepeatOnRule,
|
|
117
|
+
W as getRule,
|
|
115
118
|
x as getUntil,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
E as getWeekDay,
|
|
120
|
+
O as getWeekDays,
|
|
121
|
+
I as toUntilEndOfDay,
|
|
122
|
+
v as weekDayRuleFromString,
|
|
119
123
|
m as weekdayRule,
|
|
120
|
-
|
|
124
|
+
b as weekendRule
|
|
121
125
|
};
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Occurrence, Group, Range, Item, Slot } from '../models/main';
|
|
9
9
|
/** @hidden */
|
|
10
|
-
export declare const toItems: (occurrences: Occurrence[], { timezone }: {
|
|
10
|
+
export declare const toItems: (occurrences: Occurrence[], { timezone, ignoreIsAllDay }: {
|
|
11
11
|
timezone: any;
|
|
12
|
+
ignoreIsAllDay?: boolean;
|
|
12
13
|
}, { groups, ranges }: {
|
|
13
14
|
groups: Group[];
|
|
14
15
|
ranges: Range[];
|
|
@@ -18,4 +19,6 @@ export declare const inGroup: (occurrence: Occurrence, group: Group) => boolean;
|
|
|
18
19
|
/** @hidden */
|
|
19
20
|
export declare const inSlot: (occurrence: Occurrence, slot: Slot) => boolean;
|
|
20
21
|
/** @hidden */
|
|
21
|
-
export declare const
|
|
22
|
+
export declare const inTimeRange: (item: Item, min: Date, max: Date) => boolean;
|
|
23
|
+
/** @hidden */
|
|
24
|
+
export declare const inRange: (occurrence: Occurrence, range: Range, timezone?: string, ignoreIsAllDay?: boolean) => boolean;
|
package/services/itemsService.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../utils/main.js"),A=require("@progress/kendo-data-query"),l=require("@progress/kendo-date-math"),B=(e,{timezone:t,ignoreIsAllDay:s=!1},{groups:n,ranges:d})=>{const o=[];return A.orderBy(e,[{field:"start",dir:"asc"},{field:"end",dir:"desc"},{field:"isAllDay",dir:"desc"},{field:"title",dir:"asc"},{field:"uid",dir:"asc"}]).forEach(a=>{n.forEach(f=>{const u=n.length===1?z(a,f):f;m(a,u)&&d.forEach(i=>{var D;if(y(a,i,t,s)){const T={},g={},p=i.end<a.end,R=a.start<i.start,v=l.ZonedDate.fromLocalDate(a.start,t),I=l.ZonedDate.fromLocalDate(a.end,t),h={...a,refTo:g,itemRef:T,head:p,tail:R,order:null,zonedStart:v,zonedEnd:I,group:u,range:i,slots:[],isRecurring:!!a.recurrenceRule,isException:!a.recurrenceRule&&a.recurrenceId!==null&&a.recurrenceId!==void 0,isAllDay:!!a.isAllDay,readonly:(D=a.readonly)!=null?D:void 0};o.push(h)}})})}),o},z=(e,t)=>({index:0,resources:t.resources.filter(s=>C(e,s))}),C=(e,t)=>t.multiple?(e.dataItem[t.field]||[]).some(s=>t[t.valueField]===s):e.dataItem[t.field]===t[t.valueField],m=(e,t)=>!t.resources.some(s=>s.multiple?!e.dataItem[s.field].some(n=>s[s.valueField]===n):e.dataItem[s.field]!==s[s.valueField]),S=(e,t,s)=>{if(t.getTime()===s.getTime())return!0;const n=e.range.zonedStart.toUTCDate(),d=e.range.zonedStart.toUTCDate();n.setUTCHours(t.getHours(),t.getMinutes(),0,0),d.setUTCHours(s.getHours(),s.getMinutes(),0,0);const o=e.range.zonedStart.timezone;return r.intersects(l.ZonedDate.fromUTCDate(n,o),l.ZonedDate.fromUTCDate(d,o),e.start,e.end)},y=(e,t,s,n=!1)=>r.intersects(t.start,t.end,e.start,e.end)?n||t.isAllDay===void 0||!!e.isAllDay==!!t.isAllDay?!0:t.isAllDay&&r.crossesDayBoundary(e.start,e.end,s):!1;exports.inGroup=m;exports.inRange=y;exports.inTimeRange=S;exports.toItems=B;
|