@progress/kendo-vue-scheduler 9.3.0-develop.5 → 9.3.0-develop.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/Scheduler.d.ts +67 -4
  2. package/Scheduler.js +1 -1
  3. package/Scheduler.mjs +267 -115
  4. package/components/BaseView.js +1 -1
  5. package/components/BaseView.mjs +10 -4
  6. package/components/CurrentTimeMarker.js +1 -1
  7. package/components/CurrentTimeMarker.mjs +9 -9
  8. package/components/CurrentTimeMarkerArrow.js +1 -1
  9. package/components/CurrentTimeMarkerArrow.mjs +3 -3
  10. package/components/DateHeaderCell.js +1 -1
  11. package/components/DateHeaderCell.mjs +22 -13
  12. package/components/MoreEventsPopover.d.ts +77 -0
  13. package/components/MoreEventsPopover.js +8 -0
  14. package/components/MoreEventsPopover.mjs +125 -0
  15. package/components/SchedulerActionButtons.d.ts +6 -0
  16. package/components/SchedulerActionButtons.js +1 -1
  17. package/components/SchedulerActionButtons.mjs +25 -19
  18. package/components/SchedulerForm.d.ts +7 -0
  19. package/components/SchedulerForm.js +1 -1
  20. package/components/SchedulerForm.mjs +69 -61
  21. package/components/SchedulerOccurrenceDialog.d.ts +4 -4
  22. package/components/SchedulerOccurrenceDialog.js +1 -1
  23. package/components/SchedulerOccurrenceDialog.mjs +35 -26
  24. package/components/SchedulerRemoveDialog.d.ts +6 -0
  25. package/components/SchedulerRemoveDialog.js +1 -1
  26. package/components/SchedulerRemoveDialog.mjs +24 -23
  27. package/components/ShowMoreItemsButton.d.ts +10 -1
  28. package/components/ShowMoreItemsButton.js +1 -1
  29. package/components/ShowMoreItemsButton.mjs +40 -18
  30. package/components/footer/bussiness-hours/BusinessHours.js +1 -1
  31. package/components/footer/bussiness-hours/BusinessHours.mjs +16 -21
  32. package/components/header/SchedulerAdaptiveHeader.js +1 -1
  33. package/components/header/SchedulerAdaptiveHeader.mjs +28 -26
  34. package/components/header/SchedulerHeader.d.ts +5 -1
  35. package/components/header/SchedulerHeader.js +1 -1
  36. package/components/header/SchedulerHeader.mjs +11 -7
  37. package/components/header/navigation/NavigationDatePicker.d.ts +22 -3
  38. package/components/header/navigation/NavigationDatePicker.js +1 -1
  39. package/components/header/navigation/NavigationDatePicker.mjs +27 -30
  40. package/components/header/view-selector/ViewSelectorList.d.ts +26 -6
  41. package/components/header/view-selector/ViewSelectorList.js +1 -1
  42. package/components/header/view-selector/ViewSelectorList.mjs +55 -49
  43. package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
  44. package/editors/RemoveRecurrenceConfirmDialog.d.ts +29 -0
  45. package/editors/RemoveRecurrenceConfirmDialog.js +8 -0
  46. package/editors/RemoveRecurrenceConfirmDialog.mjs +65 -0
  47. package/editors/ResourceEditor.d.ts +3 -0
  48. package/editors/ResourceEditor.js +1 -1
  49. package/editors/ResourceEditor.mjs +12 -10
  50. package/editors/SchedulerFormEditor.d.ts +1067 -2953
  51. package/editors/SchedulerFormEditor.js +1 -1
  52. package/editors/SchedulerFormEditor.mjs +297 -365
  53. package/editors/SchedulerRecurrenceDialog.d.ts +143 -0
  54. package/editors/SchedulerRecurrenceDialog.js +8 -0
  55. package/editors/SchedulerRecurrenceDialog.mjs +575 -0
  56. package/editors/TimezoneDropDownList.d.ts +46 -0
  57. package/editors/TimezoneDropDownList.js +8 -0
  58. package/editors/TimezoneDropDownList.mjs +63 -0
  59. package/editors/ZonedSplitDateTime.d.ts +65 -0
  60. package/editors/ZonedSplitDateTime.js +8 -0
  61. package/editors/ZonedSplitDateTime.mjs +100 -0
  62. package/hooks/main.d.ts +1 -0
  63. package/hooks/useGroupRowHeightSync.d.ts +10 -0
  64. package/hooks/useRecurrenceSummary.d.ts +10 -0
  65. package/hooks/useRecurrenceSummary.js +8 -0
  66. package/hooks/useRecurrenceSummary.mjs +74 -0
  67. package/hooks/useRowSync.js +1 -1
  68. package/hooks/useRowSync.mjs +23 -4
  69. package/hooks/useSlotExpand.js +1 -1
  70. package/hooks/useSlotExpand.mjs +36 -28
  71. package/index.d.mts +9 -3
  72. package/index.d.ts +9 -3
  73. package/index.js +1 -1
  74. package/index.mjs +83 -71
  75. package/items/SchedulerEditItem.d.ts +14 -3
  76. package/items/SchedulerEditItem.js +1 -1
  77. package/items/SchedulerEditItem.mjs +130 -72
  78. package/items/SchedulerItem.d.ts +10 -0
  79. package/items/SchedulerItem.js +1 -1
  80. package/items/SchedulerItem.mjs +153 -135
  81. package/items/SchedulerProportionalViewItem.d.ts +183 -0
  82. package/items/SchedulerProportionalViewItem.js +8 -0
  83. package/items/SchedulerProportionalViewItem.mjs +378 -0
  84. package/items/SchedulerViewItem.d.ts +3 -0
  85. package/items/SchedulerViewItem.js +1 -1
  86. package/items/SchedulerViewItem.mjs +107 -67
  87. package/messages/main.d.ts +186 -0
  88. package/messages/main.js +1 -1
  89. package/messages/main.mjs +226 -102
  90. package/models/Item.d.ts +2 -0
  91. package/models/Occurrence.d.ts +2 -0
  92. package/models/SchedulerModelFields.d.ts +5 -0
  93. package/models/SchedulerResource.d.ts +6 -0
  94. package/models/SchedulerView.d.ts +2 -0
  95. package/package-metadata.js +1 -1
  96. package/package-metadata.mjs +2 -2
  97. package/package.json +12 -11
  98. package/recurrence/common.js +1 -1
  99. package/recurrence/common.mjs +36 -39
  100. package/services/itemsService.js +1 -1
  101. package/services/itemsService.mjs +31 -27
  102. package/services/occurrenceService.js +1 -1
  103. package/services/occurrenceService.mjs +41 -35
  104. package/slots/SchedulerEditSlot.d.ts +2 -0
  105. package/slots/SchedulerEditSlot.js +1 -1
  106. package/slots/SchedulerEditSlot.mjs +27 -28
  107. package/slots/SchedulerSlot.d.ts +4 -0
  108. package/slots/SchedulerSlot.js +1 -1
  109. package/slots/SchedulerSlot.mjs +10 -1
  110. package/slots/SchedulerViewSlot.d.ts +5 -0
  111. package/slots/SchedulerViewSlot.js +1 -1
  112. package/slots/SchedulerViewSlot.mjs +70 -50
  113. package/tasks/SchedulerEditTask.d.ts +6 -0
  114. package/tasks/SchedulerEditTask.js +1 -1
  115. package/tasks/SchedulerEditTask.mjs +64 -23
  116. package/tasks/SchedulerTask.d.ts +15 -0
  117. package/tasks/SchedulerTask.js +1 -1
  118. package/tasks/SchedulerTask.mjs +39 -28
  119. package/tasks/SchedulerViewTask.d.ts +9 -0
  120. package/tasks/SchedulerViewTask.js +1 -1
  121. package/tasks/SchedulerViewTask.mjs +10 -5
  122. package/utils/main.d.ts +4 -1
  123. package/utils/main.js +1 -1
  124. package/utils/main.mjs +133 -112
  125. package/views/agenda/AgendaView.js +1 -1
  126. package/views/agenda/AgendaView.mjs +28 -22
  127. package/views/agenda/AgendaViewBody.js +1 -1
  128. package/views/agenda/AgendaViewBody.mjs +44 -42
  129. package/views/agenda/AgendaViewHead.js +1 -1
  130. package/views/agenda/AgendaViewHead.mjs +14 -10
  131. package/views/common/SchedulerDrag.d.ts +12 -0
  132. package/views/common/SchedulerResize.d.ts +12 -0
  133. package/views/common/VerticalResourceIterator.d.ts +3 -0
  134. package/views/common/VerticalResourceIterator.js +1 -1
  135. package/views/common/VerticalResourceIterator.mjs +16 -9
  136. package/views/day/DayView.js +1 -1
  137. package/views/day/DayView.mjs +2 -2
  138. package/views/day/MultiDayView.js +1 -1
  139. package/views/day/MultiDayView.mjs +98 -127
  140. package/views/month/MonthView.d.ts +8 -2
  141. package/views/month/MonthView.js +1 -1
  142. package/views/month/MonthView.mjs +115 -109
  143. package/views/month/MonthViewBody.d.ts +7 -2
  144. package/views/month/MonthViewBody.js +1 -1
  145. package/views/month/MonthViewBody.mjs +15 -11
  146. package/views/time/MultiDayTimelineView.d.ts +5 -0
  147. package/views/time/MultiDayTimelineView.js +1 -1
  148. package/views/time/MultiDayTimelineView.mjs +125 -132
  149. package/views/time/TimelineView.js +1 -1
  150. package/views/time/TimelineView.mjs +2 -2
  151. package/views/week/WeekView.js +1 -1
  152. package/views/week/WeekView.mjs +2 -2
  153. package/views/week/WorkWeekView.js +1 -1
  154. package/views/week/WorkWeekView.mjs +9 -9
  155. package/components/header/navigation/DatePickerToggleButton.d.ts +0 -16
  156. package/editors/FilterableComboBox.d.ts +0 -38
  157. package/editors/FilterableComboBox.js +0 -8
  158. package/editors/FilterableComboBox.mjs +0 -61
  159. package/editors/ZonedDateTime.js +0 -8
  160. package/editors/ZonedDateTime.mjs +0 -57
@@ -5,16 +5,16 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as l, createVNode as e, isVNode as r } from "vue";
9
- import { showFullDay as i, showWorkDay as s, messages as n } from "../../../messages/main.mjs";
10
- import { ToolbarItem as a, Button as c } from "@progress/kendo-vue-buttons";
8
+ import { defineComponent as s, createVNode as l, isVNode as r } from "vue";
9
+ import { showFullDay as t, showWorkDay as e, messages as n } from "../../../messages/main.mjs";
11
10
  import { getDefaultSlots as u } from "@progress/kendo-vue-common";
12
- import { provideLocalizationService as h } from "@progress/kendo-vue-intl";
13
- import { clockIcon as m } from "@progress/kendo-svg-icons";
14
- function d(o) {
11
+ import { Button as a } from "@progress/kendo-vue-buttons";
12
+ import { provideLocalizationService as c } from "@progress/kendo-vue-intl";
13
+ import { clockIcon as h } from "@progress/kendo-svg-icons";
14
+ function m(o) {
15
15
  return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !r(o);
16
16
  }
17
- const w = /* @__PURE__ */ l({
17
+ const g = /* @__PURE__ */ s({
18
18
  name: "KendoBusinessHours",
19
19
  emits: {
20
20
  click: null
@@ -32,19 +32,14 @@ const w = /* @__PURE__ */ l({
32
32
  },
33
33
  render() {
34
34
  let o;
35
- const t = u(this);
36
- return this.localization = h(this), this.slotDuration && this.slotDuration < 1440 ? e(a, {
37
- class: "k-scheduler-navigation"
38
- }, {
39
- default: () => [t || e(c, {
40
- tabIndex: -1,
41
- class: "k-scheduler-fullday",
42
- icon: "clock",
43
- svgIcon: m,
44
- onClick: this.handleShowWorkHoursClick
45
- }, d(o = this.localization.toLanguageString(this.ks.showWorkHours ? i : s, n[this.ks.showWorkHours ? i : s])) ? o : {
46
- default: () => [o]
47
- })]
35
+ const i = u(this);
36
+ return this.localization = c(this), this.slotDuration && this.slotDuration < 1440 ? i || l(a, {
37
+ tabIndex: -1,
38
+ class: "k-toolbar-button k-scheduler-fullday",
39
+ svgIcon: h,
40
+ onClick: this.handleShowWorkHoursClick
41
+ }, m(o = this.localization.toLanguageString(this.ks.showWorkHours ? t : e, n[this.ks.showWorkHours ? t : e])) ? o : {
42
+ default: () => [o]
48
43
  }) : null;
49
44
  },
50
45
  methods: {
@@ -54,5 +49,5 @@ const w = /* @__PURE__ */ l({
54
49
  }
55
50
  });
56
51
  export {
57
- w as BusinessHours
52
+ g as BusinessHours
58
53
  };
@@ -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=require("vue"),t=require("@progress/kendo-vue-buttons"),a=require("@progress/kendo-vue-intl"),l=require("../../messages/main.js"),o=require("@progress/kendo-svg-icons"),u=require("./view-selector/ViewSelectorList.js");function d(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!e.isVNode(n)}const v=e.defineComponent({name:"KendoSchedulerAdaptiveHeader",props:{isRtl:Boolean,onPrevclick:Function,onNextclick:Function,onTodayclick:Function,onCreateclick:Function,onCalendarclick:Function,onPdfclick:Function},inject:{ks:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},render(){const n=a.provideLocalizationService(this),s=a.provideIntlService(this),i=n.toLanguageString(l.previousTitle,l.messages[l.previousTitle]),r=n.toLanguageString(l.nextTitle,l.messages[l.nextTitle]),c=s.formatDate(this.ks.currentDate,this.ks.shortDateFormat);return e.createVNode("div",null,[e.createVNode(t.Toolbar,{overflow:"none",class:"k-scheduler-toolbar"},{default:()=>[e.createVNode(t.ButtonGroup,{class:"k-scheduler-tools"},{default:()=>[e.createVNode(t.Button,{class:"k-pdf",icon:"file-pdf",svgIcon:o.filePdfIcon,tabIndex:-1,onClick:this.$props.onPdfclick},null),e.createVNode(t.Button,{class:"k-nav-calendar",icon:"calendar",svgIcon:o.calendarIcon,tabIndex:-1,onClick:this.$props.onCalendarclick},null),e.createVNode(t.Button,{class:"k-create-event",icon:"plus",svgIcon:o.plusIcon,tabIndex:-1,onClick:this.$props.onCreateclick},null)]}),e.createVNode(t.ToolbarSpacer,null,null),e.createVNode(u.ViewSelectorList,null,null)]}),e.createVNode(t.Toolbar,{overflow:"none",class:"k-scheduler-toolbar"},{default:()=>[e.createVNode(t.Button,{class:"k-nav-prev",icon:this.isRtl?"chevron-right":"chevron-left",svgIcon:this.isRtl?o.chevronRightIcon:o.chevronLeftIcon,title:i,"aria-label":i,tabIndex:-1,onClick:this.handlePrevClick},null),e.createVNode(t.ToolbarSpacer,null,null),e.createVNode(t.Button,{class:"k-nav-current",fillMode:"flat",tabIndex:-1},d(c)?c:{default:()=>[c]}),e.createVNode(t.ToolbarSpacer,null,null),e.createVNode(t.Button,{class:"k-nav-next",icon:this.isRtl?"chevron-left":"chevron-right",svgIcon:this.isRtl?o.chevronLeftIcon:o.chevronRightIcon,title:r,"aria-label":r,tabIndex:-1,onClick:this.handleNextClick},null)]})])},methods:{handlePrevClick(n){this.$emit("prevclick",n)},handleNextClick(n){this.$emit("nextclick",n)}}});exports.SchedulerAdaptiveHeader=v;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("@progress/kendo-vue-buttons"),s=require("@progress/kendo-vue-intl"),r=require("../../messages/main.js"),c=require("@progress/kendo-svg-icons"),u=require("./view-selector/ViewSelectorList.js");function d(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!e.isVNode(n)}const v=e.defineComponent({name:"KendoSchedulerAdaptiveHeader",props:{isRtl:Boolean,onPrevclick:Function,onNextclick:Function,onTodayclick:Function,onCreateclick:Function,onCalendarclick:Function,onPdfclick:Function},inject:{ks:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},render(){const n=s.provideLocalizationService(this),l=s.provideIntlService(this),o=n.toLanguageString(r.previousTitle,r.messages[r.previousTitle]),a=n.toLanguageString(r.nextTitle,r.messages[r.nextTitle]),i=l.formatDate(this.ks.currentDate,this.ks.shortDateFormat);return e.createVNode("div",null,[e.createVNode(t.Toolbar,{overflow:"none",class:"k-scheduler-toolbar"},{default:()=>[e.createVNode(t.ButtonGroup,{class:"k-scheduler-tools"},{default:()=>[e.createVNode(t.Button,{class:"k-pdf",icon:"file-pdf",svgIcon:c.filePdfIcon,tabIndex:-1,onClick:this.$props.onPdfclick},null),e.createVNode(t.Button,{class:"k-nav-calendar",icon:"calendar",svgIcon:c.calendarIcon,tabIndex:-1,onClick:this.$props.onCalendarclick},null),e.createVNode(t.Button,{class:"k-create-event",icon:"plus",svgIcon:c.plusIcon,tabIndex:-1,onClick:this.$props.onCreateclick},null)]}),e.createVNode(t.ToolbarSpacer,null,null),e.createVNode(u.ViewSelectorList,null,null)]}),e.createVNode(t.Toolbar,{overflow:"none",class:"k-scheduler-toolbar"},{default:()=>[e.createVNode(t.Button,{class:"k-nav-prev",icon:this.isRtl?"chevron-right":"chevron-left",svgIcon:this.isRtl?c.chevronRightIcon:c.chevronLeftIcon,title:o,"aria-label":o,tabIndex:-1,onClick:this.handlePrevClick},null),e.createVNode(t.ToolbarSpacer,null,null),e.createVNode(t.Button,{class:"k-nav-current",fillMode:"flat",tabIndex:-1},d(i)?i:{default:()=>[i]}),e.createVNode(t.ToolbarSpacer,null,null),e.createVNode(t.Button,{class:"k-nav-next",icon:this.isRtl?"chevron-left":"chevron-right",svgIcon:this.isRtl?c.chevronLeftIcon:c.chevronRightIcon,title:a,"aria-label":a,tabIndex:-1,onClick:this.handleNextClick},null)]})])},methods:{handlePrevClick(n){var l,o;(o=(l=this.$props).onPrevclick)==null||o.call(l,n)},handleNextClick(n){var l,o;(o=(l=this.$props).onNextclick)==null||o.call(l,n)}}});exports.SchedulerAdaptiveHeader=v;
@@ -5,16 +5,16 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as v, createVNode as e, isVNode as p } from "vue";
9
- import { Toolbar as r, ButtonGroup as f, Button as t, ToolbarSpacer as o } from "@progress/kendo-vue-buttons";
8
+ import { defineComponent as k, createVNode as e, isVNode as v } from "vue";
9
+ import { Toolbar as a, ButtonGroup as f, Button as o, ToolbarSpacer as i } from "@progress/kendo-vue-buttons";
10
10
  import { provideLocalizationService as m, provideIntlService as I } from "@progress/kendo-vue-intl";
11
- import { previousTitle as a, messages as s, nextTitle as u } from "../../messages/main.mjs";
12
- import { filePdfIcon as x, calendarIcon as g, plusIcon as b, chevronRightIcon as d, chevronLeftIcon as h } from "@progress/kendo-svg-icons";
11
+ import { previousTitle as s, messages as u, nextTitle as d } from "../../messages/main.mjs";
12
+ import { filePdfIcon as x, calendarIcon as g, plusIcon as b, chevronRightIcon as p, chevronLeftIcon as h } from "@progress/kendo-svg-icons";
13
13
  import { ViewSelectorList as C } from "./view-selector/ViewSelectorList.mjs";
14
14
  function S(n) {
15
- return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !p(n);
15
+ return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !v(n);
16
16
  }
17
- const $ = /* @__PURE__ */ v({
17
+ const $ = /* @__PURE__ */ k({
18
18
  name: "KendoSchedulerAdaptiveHeader",
19
19
  props: {
20
20
  isRtl: Boolean,
@@ -37,58 +37,58 @@ const $ = /* @__PURE__ */ v({
37
37
  }
38
38
  },
39
39
  render() {
40
- const n = m(this), k = I(this), c = n.toLanguageString(a, s[a]), i = n.toLanguageString(u, s[u]), l = k.formatDate(this.ks.currentDate, this.ks.shortDateFormat);
41
- return e("div", null, [e(r, {
40
+ const n = m(this), l = I(this), t = n.toLanguageString(s, u[s]), r = n.toLanguageString(d, u[d]), c = l.formatDate(this.ks.currentDate, this.ks.shortDateFormat);
41
+ return e("div", null, [e(a, {
42
42
  overflow: "none",
43
43
  class: "k-scheduler-toolbar"
44
44
  }, {
45
45
  default: () => [e(f, {
46
46
  class: "k-scheduler-tools"
47
47
  }, {
48
- default: () => [e(t, {
48
+ default: () => [e(o, {
49
49
  class: "k-pdf",
50
50
  icon: "file-pdf",
51
51
  svgIcon: x,
52
52
  tabIndex: -1,
53
53
  onClick: this.$props.onPdfclick
54
- }, null), e(t, {
54
+ }, null), e(o, {
55
55
  class: "k-nav-calendar",
56
56
  icon: "calendar",
57
57
  svgIcon: g,
58
58
  tabIndex: -1,
59
59
  onClick: this.$props.onCalendarclick
60
- }, null), e(t, {
60
+ }, null), e(o, {
61
61
  class: "k-create-event",
62
62
  icon: "plus",
63
63
  svgIcon: b,
64
64
  tabIndex: -1,
65
65
  onClick: this.$props.onCreateclick
66
66
  }, null)]
67
- }), e(o, null, null), e(C, null, null)]
68
- }), e(r, {
67
+ }), e(i, null, null), e(C, null, null)]
68
+ }), e(a, {
69
69
  overflow: "none",
70
70
  class: "k-scheduler-toolbar"
71
71
  }, {
72
- default: () => [e(t, {
72
+ default: () => [e(o, {
73
73
  class: "k-nav-prev",
74
74
  icon: this.isRtl ? "chevron-right" : "chevron-left",
75
- svgIcon: this.isRtl ? d : h,
76
- title: c,
77
- "aria-label": c,
75
+ svgIcon: this.isRtl ? p : h,
76
+ title: t,
77
+ "aria-label": t,
78
78
  tabIndex: -1,
79
79
  onClick: this.handlePrevClick
80
- }, null), e(o, null, null), e(t, {
80
+ }, null), e(i, null, null), e(o, {
81
81
  class: "k-nav-current",
82
82
  fillMode: "flat",
83
83
  tabIndex: -1
84
- }, S(l) ? l : {
85
- default: () => [l]
86
- }), e(o, null, null), e(t, {
84
+ }, S(c) ? c : {
85
+ default: () => [c]
86
+ }), e(i, null, null), e(o, {
87
87
  class: "k-nav-next",
88
88
  icon: this.isRtl ? "chevron-left" : "chevron-right",
89
- svgIcon: this.isRtl ? h : d,
90
- title: i,
91
- "aria-label": i,
89
+ svgIcon: this.isRtl ? h : p,
90
+ title: r,
91
+ "aria-label": r,
92
92
  tabIndex: -1,
93
93
  onClick: this.handleNextClick
94
94
  }, null)]
@@ -96,10 +96,12 @@ const $ = /* @__PURE__ */ v({
96
96
  },
97
97
  methods: {
98
98
  handlePrevClick(n) {
99
- this.$emit("prevclick", n);
99
+ var l, t;
100
+ (t = (l = this.$props).onPrevclick) == null || t.call(l, n);
100
101
  },
101
102
  handleNextClick(n) {
102
- this.$emit("nextclick", n);
103
+ var l, t;
104
+ (t = (l = this.$props).onNextclick) == null || t.call(l, n);
103
105
  }
104
106
  }
105
107
  });
@@ -19,5 +19,9 @@ export interface SchedulerHeaderHandle {
19
19
  /**
20
20
  * @hidden
21
21
  */
22
- declare const SchedulerHeader: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
+ declare const SchedulerHeader: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
23
+ ariaLabel: StringConstructor;
24
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
25
+ ariaLabel: StringConstructor;
26
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
23
27
  export { SchedulerHeader };
@@ -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 o=require("vue"),t=require("@progress/kendo-vue-common"),r=require("@progress/kendo-vue-buttons");function n(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const u=o.defineComponent({name:"KendoSchedulerHeader",render(){const e=t.getDefaultSlots(this);return o.createVNode(r.Toolbar,{overflow:"none",class:"k-scheduler-toolbar"},n(e)?e:{default:()=>[e]})}});exports.SchedulerHeader=u;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("@progress/kendo-vue-common"),r=require("@progress/kendo-vue-buttons");function n(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const a=t.defineComponent({name:"KendoSchedulerHeader",props:{ariaLabel:String},render(){const e=o.getDefaultSlots(this);return t.createVNode(r.Toolbar,{overflow:"none",class:"k-scheduler-toolbar",ariaLabel:this.ariaLabel},n(e)?e:{default:()=>[e]})}});exports.SchedulerHeader=a;
@@ -6,23 +6,27 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { defineComponent as o, createVNode as t, isVNode as r } from "vue";
9
- import { getDefaultSlots as n } from "@progress/kendo-vue-common";
9
+ import { getDefaultSlots as a } from "@progress/kendo-vue-common";
10
10
  import { Toolbar as l } from "@progress/kendo-vue-buttons";
11
- function c(e) {
11
+ function n(e) {
12
12
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !r(e);
13
13
  }
14
- const i = /* @__PURE__ */ o({
14
+ const f = /* @__PURE__ */ o({
15
15
  name: "KendoSchedulerHeader",
16
+ props: {
17
+ ariaLabel: String
18
+ },
16
19
  render() {
17
- const e = n(this);
20
+ const e = a(this);
18
21
  return t(l, {
19
22
  overflow: "none",
20
- class: "k-scheduler-toolbar"
21
- }, c(e) ? e : {
23
+ class: "k-scheduler-toolbar",
24
+ ariaLabel: this.ariaLabel
25
+ }, n(e) ? e : {
22
26
  default: () => [e]
23
27
  });
24
28
  }
25
29
  });
26
30
  export {
27
- i as SchedulerHeader
31
+ f as SchedulerHeader
28
32
  };
@@ -5,18 +5,32 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
+ import { DatePickerProps } from '@progress/kendo-vue-dateinputs';
8
9
  import { PropType } from 'vue';
10
+ /**
11
+ * @hidden
12
+ */
13
+ export interface NavigationDatePickerProps extends DatePickerProps {
14
+ /**
15
+ * Responsive collapse level from the parent toolbar.
16
+ * When >= 2 the short date format is used.
17
+ */
18
+ level?: number;
19
+ }
9
20
  /**
10
21
  * @hidden
11
22
  */
12
23
  declare const NavigationDatePicker: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
13
24
  value: PropType<Date>;
14
25
  onChange: PropType<(event: import('@progress/kendo-vue-dateinputs').DatePickerChangeEvent) => void>;
26
+ level: {
27
+ type: PropType<number>;
28
+ default: number;
29
+ };
15
30
  }>, {}, {
16
31
  hasMounted: boolean;
17
32
  show: boolean;
18
33
  focused: boolean;
19
- media: string;
20
34
  }, {}, {
21
35
  handleChange(event: any): void;
22
36
  handleClick(): void;
@@ -26,9 +40,14 @@ declare const NavigationDatePicker: import('vue').DefineComponent<import('vue').
26
40
  createBlurTimeout(): void;
27
41
  calendarKeydown(e: any): void;
28
42
  hideAndFocusButton(): void;
29
- calculateMedia(): void;
30
43
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
31
44
  value: PropType<Date>;
32
45
  onChange: PropType<(event: import('@progress/kendo-vue-dateinputs').DatePickerChangeEvent) => void>;
33
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
46
+ level: {
47
+ type: PropType<number>;
48
+ default: number;
49
+ };
50
+ }>> & Readonly<{}>, {
51
+ level: number;
52
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
34
53
  export { NavigationDatePicker };
@@ -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 n=require("vue"),c=require("@progress/kendo-vue-dateinputs"),i=require("@progress/kendo-date-math"),h=require("@progress/kendo-vue-popup"),l=require("@progress/kendo-vue-intl"),m=require("@progress/kendo-vue-buttons"),f=require("../../../utils/main.js"),t=require("@progress/kendo-vue-common"),k=require("@progress/kendo-svg-icons"),p=n.defineComponent({name:"KendoNavigationDatePicker",props:{value:[Date,Object],onChange:Function},inject:{kendoIntlService:{default:null},ks:{default:null}},created(){this.buttonId=t.guid(),this._popupId="popup"+t.guid()},data(){return{hasMounted:!1,show:!1,focused:!1,media:"desktop"}},mounted(){this.buttonRef=this.$refs.button,this.calculateMedia(),t.canUseDOM&&window.ResizeObserver&&(this.observer=new window.ResizeObserver(this.calculateMedia),this.ks.scheduler&&this.ks.scheduler.$el&&this.observer.observe(this.ks.scheduler.$el)),this.hasMounted=!0},unmounted(){this.observer&&this.observer.disconnect()},updated(){this.show&&this.focused&&this.$refs.calendar&&this.$refs.calendar.focus()},render(){const e=i.ZonedDate.fromLocalDate(this.$props.value||this.ks.currentDate,this.ks.timezone),s=i.getDate(e),a=this.show,o=this.ks.dateRange.end.getTime()-this.ks.dateRange.start.getTime()>i.MS_PER_DAY*27,d=l.provideIntlService(this),r=d.format(this.ks.dateFormat,o?this.ks.currentDate:this.ks.dateRange.zonedStart,o?this.ks.currentDate:this.ks.dateRange.zonedEnd.addDays(-1)),u=d.format(this.ks.shortDateFormat,o?this.ks.currentDate:this.ks.dateRange.zonedStart,o?this.ks.currentDate:this.ks.dateRange.zonedEnd.addDays(-1));return n.createVNode(m.Button,{ref:"button",id:this.buttonId,onFocus:this.onFocus,onBlur:this.onBlur,fillMode:"flat",class:"k-nav-current","aria-live":"polite",tabIndex:-1,icon:"calendar",svgIcon:k.calendarIcon,onClick:this.handleClick},{default:()=>[this.media==="desktop"?r:u,n.createVNode(h.Popup,{id:this._popupId,anchor:this.buttonId,show:a},{default:()=>[this.hasMounted&&n.createVNode(c.Calendar,{ref:"calendar",onBlur:this.onCalendarBlur,onChange:this.handleChange,onKeydown:this.calendarKeydown,value:s},null)]})]})},methods:{handleChange(e){const s=i.ZonedDate.fromUTCDate(f.toUTCDateTime(e.value),this.ks.timezone);this.$emit("change",{...e,value:s}),this.hideAndFocusButton()},handleClick(){this.show=!this.show},onFocus(){clearTimeout(this._blurTimeout),this.focused=!0},onBlur(){this.focused=!1},onCalendarBlur(){clearTimeout(this._blurTimeout),this.createBlurTimeout()},createBlurTimeout(){const e=this;this._blurTimeout=setTimeout(()=>{this.focused=!1;const s=document.activeElement&&document.activeElement.closest(`#${e._popupId}`);t.canUseDOM&&document.activeElement!==e.$refs.button.$el&&!s&&(e.show=!1)},200)},calendarKeydown(e){e.keyCode===t.Keys.esc&&this.hideAndFocusButton()},hideAndFocusButton(){this.show=!1,this.$refs.button.focus()},calculateMedia(){t.canUseDOM&&window.matchMedia&&(this.media=window.matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")}}});exports.NavigationDatePicker=p;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),c=require("@progress/kendo-vue-dateinputs"),n=require("@progress/kendo-date-math"),h=require("@progress/kendo-vue-popup"),l=require("@progress/kendo-vue-intl"),f=require("@progress/kendo-vue-buttons"),m=require("../../../utils/main.js"),a=require("@progress/kendo-vue-common"),k=require("@progress/kendo-svg-icons"),p=s.defineComponent({name:"KendoNavigationDatePicker",props:{value:[Date,Object],onChange:Function,level:{type:Number,default:0}},inject:{kendoIntlService:{default:null},ks:{default:null}},created(){this.buttonId=a.guid(),this._popupId="popup"+a.guid()},data(){return{hasMounted:!1,show:!1,focused:!1}},mounted(){this.buttonRef=this.$refs.button,this.hasMounted=!0},updated(){this.show&&this.focused&&this.$refs.calendar&&this.$refs.calendar.focus()},render(){const e=n.ZonedDate.fromLocalDate(this.$props.value||this.ks.currentDate,this.ks.timezone),t=n.getDate(e),i=this.show,o=this.ks.dateRange.end.getTime()-this.ks.dateRange.start.getTime()>n.MS_PER_DAY*27,u=l.provideIntlService(this),r=u.format(this.ks.dateFormat,o?this.ks.currentDate:this.ks.dateRange.zonedStart,o?this.ks.currentDate:this.ks.dateRange.zonedEnd.addDays(-1)),d=u.format(this.ks.shortDateFormat,o?this.ks.currentDate:this.ks.dateRange.zonedStart,o?this.ks.currentDate:this.ks.dateRange.zonedEnd.addDays(-1));return s.createVNode(f.Button,{ref:"button",id:this.buttonId,onFocus:this.onFocus,onBlur:this.onBlur,fillMode:"flat",class:"k-nav-current k-toolbar-button","aria-live":"polite",tabIndex:-1,icon:"calendar",svgIcon:k.calendarIcon,onClick:this.handleClick},{default:()=>[this.$props.level>=2?d:r,s.createVNode(h.Popup,{id:this._popupId,anchor:this.buttonId,show:i},{default:()=>[this.hasMounted&&s.createVNode(c.Calendar,{ref:"calendar",onBlur:this.onCalendarBlur,onChange:this.handleChange,onKeydown:this.calendarKeydown,value:t},null)]})]})},methods:{handleChange(e){const t=n.ZonedDate.fromUTCDate(m.toUTCDateTime(e.value),this.ks.timezone);this.$emit("change",{...e,value:t}),this.hideAndFocusButton()},handleClick(){this.show=!this.show},onFocus(){clearTimeout(this._blurTimeout),this.focused=!0},onBlur(){this.focused=!1},onCalendarBlur(){clearTimeout(this._blurTimeout),this.createBlurTimeout()},createBlurTimeout(){const e=this;this._blurTimeout=setTimeout(()=>{this.focused=!1;const t=document.activeElement&&document.activeElement.closest(`#${e._popupId}`);a.canUseDOM&&document.activeElement!==e.$refs.button.$el&&!t&&(e.show=!1)},200)},calendarKeydown(e){e.keyCode===a.Keys.esc&&this.hideAndFocusButton()},hideAndFocusButton(){this.show=!1,this.$refs.button.focus()}}});exports.NavigationDatePicker=p;
@@ -5,20 +5,24 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as c, createVNode as o } from "vue";
8
+ import { defineComponent as h, createVNode as s } from "vue";
9
9
  import { Calendar as l } from "@progress/kendo-vue-dateinputs";
10
- import { ZonedDate as r, getDate as m, MS_PER_DAY as f } from "@progress/kendo-date-math";
11
- import { Popup as p } from "@progress/kendo-vue-popup";
12
- import { provideIntlService as k } from "@progress/kendo-vue-intl";
13
- import { Button as v } from "@progress/kendo-vue-buttons";
14
- import { toUTCDateTime as w } from "../../../utils/main.mjs";
15
- import { canUseDOM as i, Keys as b, guid as d } from "@progress/kendo-vue-common";
16
- import { calendarIcon as g } from "@progress/kendo-svg-icons";
17
- const F = /* @__PURE__ */ c({
10
+ import { ZonedDate as i, getDate as c, MS_PER_DAY as m } from "@progress/kendo-date-math";
11
+ import { Popup as f } from "@progress/kendo-vue-popup";
12
+ import { provideIntlService as p } from "@progress/kendo-vue-intl";
13
+ import { Button as k } from "@progress/kendo-vue-buttons";
14
+ import { toUTCDateTime as v } from "../../../utils/main.mjs";
15
+ import { Keys as g, canUseDOM as D, guid as r } from "@progress/kendo-vue-common";
16
+ import { calendarIcon as b } from "@progress/kendo-svg-icons";
17
+ const R = /* @__PURE__ */ h({
18
18
  name: "KendoNavigationDatePicker",
19
19
  props: {
20
20
  value: [Date, Object],
21
- onChange: Function
21
+ onChange: Function,
22
+ level: {
23
+ type: Number,
24
+ default: 0
25
+ }
22
26
  },
23
27
  inject: {
24
28
  kendoIntlService: {
@@ -29,46 +33,42 @@ const F = /* @__PURE__ */ c({
29
33
  }
30
34
  },
31
35
  created() {
32
- this.buttonId = d(), this._popupId = "popup" + d();
36
+ this.buttonId = r(), this._popupId = "popup" + r();
33
37
  },
34
38
  data() {
35
39
  return {
36
40
  hasMounted: !1,
37
41
  show: !1,
38
- focused: !1,
39
- media: "desktop"
42
+ focused: !1
40
43
  };
41
44
  },
42
45
  mounted() {
43
- this.buttonRef = this.$refs.button, this.calculateMedia(), i && window.ResizeObserver && (this.observer = new window.ResizeObserver(this.calculateMedia), this.ks.scheduler && this.ks.scheduler.$el && this.observer.observe(this.ks.scheduler.$el)), this.hasMounted = !0;
44
- },
45
- unmounted() {
46
- this.observer && this.observer.disconnect();
46
+ this.buttonRef = this.$refs.button, this.hasMounted = !0;
47
47
  },
48
48
  updated() {
49
49
  this.show && this.focused && this.$refs.calendar && this.$refs.calendar.focus();
50
50
  },
51
51
  render() {
52
- const t = r.fromLocalDate(this.$props.value || this.ks.currentDate, this.ks.timezone), e = m(t), n = this.show, s = this.ks.dateRange.end.getTime() - this.ks.dateRange.start.getTime() > f * 27, a = k(this), h = a.format(this.ks.dateFormat, s ? this.ks.currentDate : this.ks.dateRange.zonedStart, s ? this.ks.currentDate : this.ks.dateRange.zonedEnd.addDays(-1)), u = a.format(this.ks.shortDateFormat, s ? this.ks.currentDate : this.ks.dateRange.zonedStart, s ? this.ks.currentDate : this.ks.dateRange.zonedEnd.addDays(-1));
53
- return o(v, {
52
+ const t = i.fromLocalDate(this.$props.value || this.ks.currentDate, this.ks.timezone), e = c(t), n = this.show, o = this.ks.dateRange.end.getTime() - this.ks.dateRange.start.getTime() > m * 27, a = p(this), u = a.format(this.ks.dateFormat, o ? this.ks.currentDate : this.ks.dateRange.zonedStart, o ? this.ks.currentDate : this.ks.dateRange.zonedEnd.addDays(-1)), d = a.format(this.ks.shortDateFormat, o ? this.ks.currentDate : this.ks.dateRange.zonedStart, o ? this.ks.currentDate : this.ks.dateRange.zonedEnd.addDays(-1));
53
+ return s(k, {
54
54
  ref: "button",
55
55
  id: this.buttonId,
56
56
  onFocus: this.onFocus,
57
57
  onBlur: this.onBlur,
58
58
  fillMode: "flat",
59
- class: "k-nav-current",
59
+ class: "k-nav-current k-toolbar-button",
60
60
  "aria-live": "polite",
61
61
  tabIndex: -1,
62
62
  icon: "calendar",
63
- svgIcon: g,
63
+ svgIcon: b,
64
64
  onClick: this.handleClick
65
65
  }, {
66
- default: () => [this.media === "desktop" ? h : u, o(p, {
66
+ default: () => [this.$props.level >= 2 ? d : u, s(f, {
67
67
  id: this._popupId,
68
68
  anchor: this.buttonId,
69
69
  show: n
70
70
  }, {
71
- default: () => [this.hasMounted && o(l, {
71
+ default: () => [this.hasMounted && s(l, {
72
72
  ref: "calendar",
73
73
  onBlur: this.onCalendarBlur,
74
74
  onChange: this.handleChange,
@@ -80,7 +80,7 @@ const F = /* @__PURE__ */ c({
80
80
  },
81
81
  methods: {
82
82
  handleChange(t) {
83
- const e = r.fromUTCDate(w(t.value), this.ks.timezone);
83
+ const e = i.fromUTCDate(v(t.value), this.ks.timezone);
84
84
  this.$emit("change", {
85
85
  ...t,
86
86
  value: e
@@ -103,20 +103,17 @@ const F = /* @__PURE__ */ c({
103
103
  this._blurTimeout = setTimeout(() => {
104
104
  this.focused = !1;
105
105
  const e = document.activeElement && document.activeElement.closest(`#${t._popupId}`);
106
- i && document.activeElement !== t.$refs.button.$el && !e && (t.show = !1);
106
+ D && document.activeElement !== t.$refs.button.$el && !e && (t.show = !1);
107
107
  }, 200);
108
108
  },
109
109
  calendarKeydown(t) {
110
- t.keyCode === b.esc && this.hideAndFocusButton();
110
+ t.keyCode === g.esc && this.hideAndFocusButton();
111
111
  },
112
112
  hideAndFocusButton() {
113
113
  this.show = !1, this.$refs.button.focus();
114
- },
115
- calculateMedia() {
116
- i && window.matchMedia && (this.media = window.matchMedia("(min-width: 1024px)").matches ? "desktop" : "mobile");
117
114
  }
118
115
  }
119
116
  });
120
117
  export {
121
- F as NavigationDatePicker
118
+ R as NavigationDatePicker
122
119
  };
@@ -5,14 +5,34 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
+ import { PropType } from 'vue';
8
9
  /**
9
10
  * @hidden
10
11
  */
11
- declare const ViewSelectorList: import('vue').DefineComponent<{}, {}, {
12
- media: string;
13
- }, {}, {
12
+ export interface ViewSelectorListProps {
13
+ /**
14
+ * Responsive collapse level from the parent toolbar.
15
+ * When >= 1 the SegmentedControl collapses to a MenuButton.
16
+ */
17
+ level?: number;
18
+ }
19
+ /**
20
+ * @hidden
21
+ */
22
+ declare const ViewSelectorList: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
23
+ level: {
24
+ type: PropType<number>;
25
+ default: number;
26
+ };
27
+ }>, {}, {}, {}, {
14
28
  handleViewChange(value: string): void;
15
- ddlChange(event: any): void;
16
- calculateMedia(): void;
17
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
29
+ handleItemClick(event: any): void;
30
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
31
+ level: {
32
+ type: PropType<number>;
33
+ default: number;
34
+ };
35
+ }>> & Readonly<{}>, {
36
+ level: number;
37
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
18
38
  export { ViewSelectorList };
@@ -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("vue"),u=require("@progress/kendo-vue-buttons"),m=require("@progress/kendo-vue-intl"),i=require("../../../messages/main.js"),r=require("@progress/kendo-vue-common"),h=s.defineComponent({name:"KendoViewSelectorList",inject:{kendoLocalizationService:{default:null},ks:{default:null},setActiveViewName:{default:null}},mounted(){this.calculateMedia(),r.canUseDOM&&window.ResizeObserver&&(this.observer=new window.ResizeObserver(this.calculateMedia),this.ks.scheduler&&this.ks.scheduler.$el&&this.observer.observe(this.ks.scheduler.$el))},unmounted(){this.observer&&this.observer.disconnect()},data(){return{media:"desktop"}},render(){const t=this.ks.views;this.localization=m.provideLocalizationService(this);const o=t.find(e=>e.name===this.ks.activeViewName),l="scheduler."+o.name+"ViewTitle";this.localization.toLanguageString(l,i.messages[l])||o.name;const c=function(){return s.createVNode("select",{"tab-index":-1,class:"k-views-dropdown k-dropdown k-picker k-picker-solid k-rounded-md k-picker-md","aria-label":this.localization.toLanguageString(i.dropdownlistSelectViewAriaLabel,i.messages[i.dropdownlistSelectViewAriaLabel]),onChange:this.ddlChange},[t.map(function(e){const a="scheduler."+e.name+"ViewTitle",n=this.localization.toLanguageString(a,i.messages[a])||e.name;return s.createVNode("option",{value:e.name||e.title||n,selected:e.name===this.ks.activeViewName},[e.title||n])},this)])},d=t.map(e=>{const a="scheduler."+e.name+"ViewTitle",n=this.localization.toLanguageString(a,i.messages[a])||e.name;return{value:e.name,text:e.title||n}});return o&&this.media==="mobile"?c.call(this):s.createVNode(u.SegmentedControl,{class:"k-toolbar-button-group k-scheduler-views",items:d,value:this.ks.activeViewName,onChange:this.handleViewChange},null)},methods:{handleViewChange(t){this.setActiveViewName(t)},ddlChange(t){this.setActiveViewName(t.target.value)},calculateMedia(){r.canUseDOM&&window.matchMedia&&(this.media=window.matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")}}});exports.ViewSelectorList=h;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),c=require("@progress/kendo-vue-buttons"),m=require("@progress/kendo-vue-intl"),s=require("../../../messages/main.js"),d=require("@progress/kendo-vue-common"),h=require("@progress/kendo-svg-icons"),V=n.defineComponent({name:"KendoViewSelectorList",props:{level:{type:Number,default:0}},inject:{kendoLocalizationService:{default:null},ks:{default:null},setActiveViewName:{default:null}},render(){const e=this.ks.views;this.localization=m.provideLocalizationService(this);const a=e.find(t=>t.name===this.ks.activeViewName);if(this.$props.level>=1&&a){const t="scheduler."+a.name+"ViewTitle",o=this.localization.toLanguageString(t,s.messages[t])||a.name;return n.createVNode(c.DropDownButton,{class:"k-toolbar-menu-button",fillMode:"flat",onItemclick:this.handleItemClick,popupSettings:{popupClass:"k-scheduler-toolbar"},textField:"title",items:e.map(i=>{const l="scheduler."+i.name+"ViewTitle",u=this.localization.toLanguageString(l,s.messages[l])||i.name;return{...i,selected:i.name===this.ks.activeViewName,title:i.title||u}}),text:a.title||o},{default:()=>[n.createVNode("span",{class:"k-menu-button-arrow k-button-arrow"},[n.createVNode(d.SvgIcon,{icon:h.chevronDownIcon},null)])]})}const r=e.map(t=>{const o="scheduler."+t.name+"ViewTitle",i=this.localization.toLanguageString(o,s.messages[o])||t.name;return{value:t.name,text:t.title||i}});return n.createVNode(c.SegmentedControl,{class:"k-scheduler-views",items:r,value:this.ks.activeViewName,onChange:this.handleViewChange},null)},methods:{handleViewChange(e){this.setActiveViewName(e)},handleItemClick(e){this.setActiveViewName&&(e.event&&e.event.preventDefault(),this.setActiveViewName(e.item.name))}}});exports.ViewSelectorList=V;
@@ -5,13 +5,20 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as h, createVNode as o } from "vue";
9
- import { SegmentedControl as u } from "@progress/kendo-vue-buttons";
10
- import { provideLocalizationService as w } from "@progress/kendo-vue-intl";
11
- import { messages as n, dropdownlistSelectViewAriaLabel as r } from "../../../messages/main.mjs";
12
- import { canUseDOM as c } from "@progress/kendo-vue-common";
13
- const V = /* @__PURE__ */ h({
8
+ import { defineComponent as c, createVNode as o } from "vue";
9
+ import { DropDownButton as u, SegmentedControl as h } from "@progress/kendo-vue-buttons";
10
+ import { provideLocalizationService as d } from "@progress/kendo-vue-intl";
11
+ import { messages as l } from "../../../messages/main.mjs";
12
+ import { SvgIcon as p } from "@progress/kendo-vue-common";
13
+ import { chevronDownIcon as f } from "@progress/kendo-svg-icons";
14
+ const S = /* @__PURE__ */ c({
14
15
  name: "KendoViewSelectorList",
16
+ props: {
17
+ level: {
18
+ type: Number,
19
+ default: 0
20
+ }
21
+ },
15
22
  inject: {
16
23
  kendoLocalizationService: {
17
24
  default: null
@@ -23,61 +30,60 @@ const V = /* @__PURE__ */ h({
23
30
  default: null
24
31
  }
25
32
  },
26
- mounted() {
27
- this.calculateMedia(), c && window.ResizeObserver && (this.observer = new window.ResizeObserver(this.calculateMedia), this.ks.scheduler && this.ks.scheduler.$el && this.observer.observe(this.ks.scheduler.$el));
28
- },
29
- unmounted() {
30
- this.observer && this.observer.disconnect();
31
- },
32
- data() {
33
- return {
34
- media: "desktop"
35
- };
36
- },
37
33
  render() {
38
- const t = this.ks.views;
39
- this.localization = w(this);
40
- const s = t.find((e) => e.name === this.ks.activeViewName), l = "scheduler." + s.name + "ViewTitle";
41
- this.localization.toLanguageString(l, n[l]) || s.name;
42
- const d = function() {
43
- return o("select", {
44
- "tab-index": -1,
45
- class: "k-views-dropdown k-dropdown k-picker k-picker-solid k-rounded-md k-picker-md",
46
- "aria-label": this.localization.toLanguageString(r, n[r]),
47
- onChange: this.ddlChange
48
- }, [t.map(function(e) {
49
- const i = "scheduler." + e.name + "ViewTitle", a = this.localization.toLanguageString(i, n[i]) || e.name;
50
- return o("option", {
51
- value: e.name || e.title || a,
52
- selected: e.name === this.ks.activeViewName
53
- }, [e.title || a]);
54
- }, this)]);
55
- }, m = t.map((e) => {
56
- const i = "scheduler." + e.name + "ViewTitle", a = this.localization.toLanguageString(i, n[i]) || e.name;
34
+ const e = this.ks.views;
35
+ this.localization = d(this);
36
+ const n = e.find((t) => t.name === this.ks.activeViewName);
37
+ if (this.$props.level >= 1 && n) {
38
+ const t = "scheduler." + n.name + "ViewTitle", a = this.localization.toLanguageString(t, l[t]) || n.name;
39
+ return o(u, {
40
+ class: "k-toolbar-menu-button",
41
+ fillMode: "flat",
42
+ onItemclick: this.handleItemClick,
43
+ popupSettings: {
44
+ popupClass: "k-scheduler-toolbar"
45
+ },
46
+ textField: "title",
47
+ items: e.map((i) => {
48
+ const s = "scheduler." + i.name + "ViewTitle", m = this.localization.toLanguageString(s, l[s]) || i.name;
49
+ return {
50
+ ...i,
51
+ selected: i.name === this.ks.activeViewName,
52
+ title: i.title || m
53
+ };
54
+ }),
55
+ text: n.title || a
56
+ }, {
57
+ default: () => [o("span", {
58
+ class: "k-menu-button-arrow k-button-arrow"
59
+ }, [o(p, {
60
+ icon: f
61
+ }, null)])]
62
+ });
63
+ }
64
+ const r = e.map((t) => {
65
+ const a = "scheduler." + t.name + "ViewTitle", i = this.localization.toLanguageString(a, l[a]) || t.name;
57
66
  return {
58
- value: e.name,
59
- text: e.title || a
67
+ value: t.name,
68
+ text: t.title || i
60
69
  };
61
70
  });
62
- return s && this.media === "mobile" ? d.call(this) : o(u, {
63
- class: "k-toolbar-button-group k-scheduler-views",
64
- items: m,
71
+ return o(h, {
72
+ class: "k-scheduler-views",
73
+ items: r,
65
74
  value: this.ks.activeViewName,
66
75
  onChange: this.handleViewChange
67
76
  }, null);
68
77
  },
69
78
  methods: {
70
- handleViewChange(t) {
71
- this.setActiveViewName(t);
72
- },
73
- ddlChange(t) {
74
- this.setActiveViewName(t.target.value);
79
+ handleViewChange(e) {
80
+ this.setActiveViewName(e);
75
81
  },
76
- calculateMedia() {
77
- c && window.matchMedia && (this.media = window.matchMedia("(min-width: 1024px)").matches ? "desktop" : "mobile");
82
+ handleItemClick(e) {
83
+ this.setActiveViewName && (e.event && e.event.preventDefault(), this.setActiveViewName(e.item.name));
78
84
  }
79
85
  }
80
86
  });
81
87
  export {
82
- V as ViewSelectorList
88
+ S as ViewSelectorList
83
89
  };