@progress/kendo-angular-dateinputs 19.1.2-develop.3 → 19.1.2-develop.4

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 (91) hide show
  1. package/calendar/calendar.component.d.ts +37 -56
  2. package/calendar/calendar.module.d.ts +10 -21
  3. package/calendar/calendars.module.d.ts +10 -21
  4. package/calendar/localization/calendar-custom-messages.component.d.ts +9 -1
  5. package/calendar/localization/multiview-calendar-custom-messages.component.d.ts +9 -1
  6. package/calendar/models/orientation.d.ts +10 -1
  7. package/calendar/models/selection-range-end.type.d.ts +11 -1
  8. package/calendar/models/selection-range.interface.d.ts +18 -3
  9. package/calendar/models/selection.d.ts +19 -4
  10. package/calendar/models/type.d.ts +7 -3
  11. package/calendar/models/view.type.d.ts +12 -1
  12. package/calendar/multiview-calendar.component.d.ts +46 -40
  13. package/calendar/multiview-calendar.module.d.ts +1 -0
  14. package/calendar/templates/cell-template.directive.d.ts +16 -19
  15. package/calendar/templates/century-cell-template.directive.d.ts +15 -19
  16. package/calendar/templates/decade-cell-template.directive.d.ts +15 -19
  17. package/calendar/templates/footer-template.directive.d.ts +16 -17
  18. package/calendar/templates/header-template.directive.d.ts +19 -18
  19. package/calendar/templates/header-title-template.directive.d.ts +15 -18
  20. package/calendar/templates/month-cell-template.directive.d.ts +15 -17
  21. package/calendar/templates/navigation-item-template.directive.d.ts +15 -18
  22. package/calendar/templates/weeknumber-cell-template.directive.d.ts +15 -17
  23. package/calendar/templates/year-cell-template.directive.d.ts +15 -20
  24. package/dateinput/dateinput.component.d.ts +43 -119
  25. package/dateinput/dateinput.module.d.ts +15 -2
  26. package/dateinput/localization/dateinput-custom-messages.component.d.ts +18 -1
  27. package/dateinput/models/format-placeholder.model.d.ts +15 -20
  28. package/dateinput/models/format-settings.model.d.ts +14 -4
  29. package/dateinput/models/incremental-steps.model.d.ts +16 -1
  30. package/datepicker/datepicker.component.d.ts +65 -127
  31. package/datepicker/datepicker.module.d.ts +11 -2
  32. package/datepicker/localization/datepicker-custom-messages.component.d.ts +11 -1
  33. package/daterange/auto-correct-on.type.d.ts +2 -1
  34. package/daterange/date-range-end-input.directive.d.ts +22 -24
  35. package/daterange/date-range-popup-template.directive.d.ts +13 -2
  36. package/daterange/date-range-popup.component.d.ts +83 -73
  37. package/daterange/date-range-selection.directive.d.ts +10 -9
  38. package/daterange/date-range-start-input.directive.d.ts +26 -27
  39. package/daterange/date-range.component.d.ts +1 -6
  40. package/daterange/date-range.service.d.ts +27 -27
  41. package/datetimepicker/datetimepicker.component.d.ts +88 -79
  42. package/datetimepicker/datetimepicker.module.d.ts +16 -2
  43. package/datetimepicker/localization/datetimepicker-custom-messages.component.d.ts +10 -1
  44. package/esm2022/calendar/calendar.component.mjs +37 -56
  45. package/esm2022/calendar/calendar.module.mjs +10 -21
  46. package/esm2022/calendar/calendars.module.mjs +10 -21
  47. package/esm2022/calendar/localization/calendar-custom-messages.component.mjs +9 -1
  48. package/esm2022/calendar/localization/multiview-calendar-custom-messages.component.mjs +9 -1
  49. package/esm2022/calendar/models/selection-range.interface.mjs +2 -0
  50. package/esm2022/calendar/models/selection.mjs +11 -0
  51. package/esm2022/calendar/multiview-calendar.component.mjs +46 -40
  52. package/esm2022/calendar/multiview-calendar.module.mjs +1 -0
  53. package/esm2022/calendar/templates/cell-template.directive.mjs +16 -19
  54. package/esm2022/calendar/templates/century-cell-template.directive.mjs +15 -19
  55. package/esm2022/calendar/templates/decade-cell-template.directive.mjs +15 -19
  56. package/esm2022/calendar/templates/footer-template.directive.mjs +16 -17
  57. package/esm2022/calendar/templates/header-template.directive.mjs +19 -18
  58. package/esm2022/calendar/templates/header-title-template.directive.mjs +15 -18
  59. package/esm2022/calendar/templates/month-cell-template.directive.mjs +15 -17
  60. package/esm2022/calendar/templates/navigation-item-template.directive.mjs +15 -18
  61. package/esm2022/calendar/templates/weeknumber-cell-template.directive.mjs +15 -17
  62. package/esm2022/calendar/templates/year-cell-template.directive.mjs +15 -20
  63. package/esm2022/dateinput/dateinput.component.mjs +44 -120
  64. package/esm2022/dateinput/dateinput.module.mjs +15 -2
  65. package/esm2022/dateinput/localization/dateinput-custom-messages.component.mjs +18 -1
  66. package/esm2022/datepicker/datepicker.component.mjs +65 -127
  67. package/esm2022/datepicker/datepicker.module.mjs +11 -2
  68. package/esm2022/datepicker/localization/datepicker-custom-messages.component.mjs +11 -1
  69. package/esm2022/daterange/date-range-end-input.directive.mjs +22 -24
  70. package/esm2022/daterange/date-range-popup-template.directive.mjs +13 -2
  71. package/esm2022/daterange/date-range-popup.component.mjs +83 -73
  72. package/esm2022/daterange/date-range-selection.directive.mjs +10 -9
  73. package/esm2022/daterange/date-range-start-input.directive.mjs +26 -27
  74. package/esm2022/daterange/date-range.component.mjs +1 -6
  75. package/esm2022/daterange/date-range.service.mjs +27 -27
  76. package/esm2022/datetimepicker/datetimepicker.component.mjs +88 -79
  77. package/esm2022/datetimepicker/datetimepicker.module.mjs +16 -2
  78. package/esm2022/datetimepicker/localization/datetimepicker-custom-messages.component.mjs +10 -1
  79. package/esm2022/package-metadata.mjs +2 -2
  80. package/esm2022/timepicker/localization/messages.mjs +14 -14
  81. package/esm2022/timepicker/localization/timepicker-custom-messages.component.mjs +12 -1
  82. package/esm2022/timepicker/timepicker.component.mjs +54 -119
  83. package/esm2022/timepicker/timepicker.module.mjs +13 -2
  84. package/esm2022/timepicker/timeselector.component.mjs +24 -40
  85. package/fesm2022/progress-kendo-angular-dateinputs.mjs +870 -1003
  86. package/package.json +13 -12
  87. package/timepicker/localization/messages.d.ts +14 -14
  88. package/timepicker/localization/timepicker-custom-messages.component.d.ts +12 -1
  89. package/timepicker/timepicker.component.d.ts +50 -115
  90. package/timepicker/timepicker.module.d.ts +13 -2
  91. package/timepicker/timeselector.component.d.ts +24 -40
@@ -69,140 +69,161 @@ export class DateRangePopupComponent {
69
69
  */
70
70
  showCalendarHeader = true;
71
71
  /**
72
- * Sets or gets the `focusedDate` property of the MultiViewCalendar and
73
- * defines the focused date of the component
74
- * ([see example]({% slug dates_multiviewcalendar %}#toc-focused-dates)).
72
+ * Specifies the focused date of the MultiViewCalendar component.
73
+ * Defines which date receives focus when the component loads ([see example]({% slug dates_multiviewcalendar %}#toc-focused-dates)).
75
74
  *
76
- * > If the MultiViewCalendar is out of the min or max range, it normalizes the defined `focusedDate`.
75
+ * If the MultiViewCalendar is out of the min or max range, it normalizes the defined `focusedDate`.
77
76
  */
78
77
  focusedDate;
79
78
  /**
80
- * Sets the dates of the MultiViewCalendar that will be disabled
81
- * ([see example]({% slug disabled_dates_multiviewcalendar %})).
79
+ * Specifies the dates in the MultiViewCalendar that you want to disable ([see example]({% slug disabled_dates_multiviewcalendar %})).
82
80
  */
83
81
  disabledDates;
84
82
  /**
85
- * Defines the active view that the MultiViewCalendar initially renders
86
- * ([see example]({% slug viewoptions_multiviewcalendar %})).
83
+ * Specifies the initial view that the MultiViewCalendar displays when it loads ([see example]({% slug viewoptions_multiviewcalendar %})).
87
84
  * By default, the active view is `month`.
88
85
  *
89
- * > You have to set `activeView` within the `topView`-`bottomView` range.
86
+ * You have to set `activeView` within the `topView`-`bottomView` range.
87
+ *
88
+ * @default 'month
90
89
  */
91
90
  activeView = CalendarViewEnum[CalendarViewEnum.month];
92
91
  /**
93
- * Defines the bottommost view, to which the user can navigate
94
- * ([see example](slug:viewdepth_multiviewcalendar)).
92
+ * Specifies the lowest view level that users can navigate to ([see example](slug:viewdepth_multiviewcalendar)).
93
+ *
94
+ * @default 'month'
95
95
  */
96
96
  bottomView = CalendarViewEnum[CalendarViewEnum.month];
97
97
  /**
98
- * Defines the topmost view, to which the user can navigate.
98
+ * Specifies the highest view level that users can navigate to ([see example](slug:viewdepth_multiviewcalendar)).
99
+ *
100
+ * @default 'century'
99
101
  */
100
102
  topView = CalendarViewEnum[CalendarViewEnum.century];
101
103
  /**
102
- * Sets or gets the `min` property of the MultiViewCalendar and
103
- * defines the minimum allowed date value.
104
- * By default, the `min` value is `1900-1-1`.
104
+ * Specifies the minimum date that users can select ([see example]({% slug dates_multiviewcalendar %}#toc-focused-dates)).
105
+ *
106
+ * @default '1900-01-01'
105
107
  */
106
108
  min;
107
109
  /**
108
- * Sets or gets the `max` property of the MultiViewCalendar and
109
- * defines the maximum allowed date value.
110
- * By default, the `max` value is `2099-12-31`.
110
+ * Specifies the maximum date that users can select ([see example]({% slug dates_multiviewcalendar %}#toc-focused-dates)).
111
+ *
112
+ * @default '2099-12-31'
111
113
  */
112
114
  max;
113
115
  /**
114
- * Allows reverse selection.
115
- * If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
116
+ * Determines whether users can select dates in reverse order.
117
+ * When you set `allowReverse` to `true`, the component does not validate if the start date comes after the end date.
116
118
  *
117
119
  * @default false
118
120
  */
119
121
  allowReverse = false;
120
122
  /**
121
- * Determines whether to enable animation when navigating to previous/next view.
123
+ * Determines whether to animate transitions when users navigate between views.
124
+ *
122
125
  * @default false
123
126
  */
124
127
  animateNavigation = false;
125
128
  /**
126
- * Sets or gets the `disabled` property of the MultiViewCalendar and
127
- * determines whether the component is active
128
- * ([see example]({% slug disabled_multiviewcalendar %})).
129
+ * Determines whether the MultiViewCalendar is interactive ([see example]({% slug disabled_multiviewcalendar %})).
130
+ * When you set `disabled` to `true`, users cannot interact with the component.
131
+ *
132
+ * @default false
129
133
  */
130
134
  disabled = false;
131
135
  /**
132
- * Sets or gets the `views` property of the MultiViewCalendar and
133
- * defines the number of rendered months.
136
+ * Specifies the number of calendar views to display side by side.
134
137
  *
135
138
  * @default 2
136
139
  */
137
140
  views = 2;
138
141
  /**
139
- * Determines whether to display a week number column in the `month` view
140
- * ([see example]({% slug weeknumcolumn_multiviewcalendar %})).
142
+ * Determines whether to display week numbers in the `month` view ([see example]({% slug weeknumcolumn_multiviewcalendar %})).
143
+ *
144
+ * @default false
141
145
  */
142
146
  weekNumber = false;
143
147
  /**
144
- * Controls the popup animation.
145
- * By default, the opening and closing animations are enabled.
148
+ * Controls the popup animations.
149
+ * When you set `animate` to `true`, the popup displays opening and closing animations.
146
150
  * For more information about controlling the popup animations,
147
151
  * refer to the article on [animations]({% slug animations_popup %}).
152
+ *
153
+ * @default true
148
154
  */
149
155
  animate = true;
150
156
  /**
151
- * Specifies the element that will be used as an anchor. The popup opens next to that element.
157
+ * Specifies the element that serves as an anchor for the popup.
158
+ * The popup opens next to this element.
152
159
  * For more information, refer to the section on
153
160
  * [aligning to specific components]({% slug alignmentpositioning_popup %}#toc-aligning-to-components).
154
161
  */
155
162
  anchor;
156
163
  /**
157
- * Specifies the anchor pivot point.
164
+ * Specifies the alignment point for the anchor element.
158
165
  * For more information, refer to the section on
159
166
  * [positioning]({% slug alignmentpositioning_popup %}#toc-positioning).
160
167
  */
161
168
  anchorAlign;
162
169
  /**
163
- * Determines whether to display a header for every view (for example the month name).
170
+ * Determines whether to display a header for each view ([see example]({% slug viewheader_multiviewcalendar %})).
171
+ * For example, displays the month name in the month view.
164
172
  *
165
173
  * @default false
166
174
  */
167
175
  showViewHeader = false;
168
176
  /**
169
- * Displays the days that fall out of the current month ([see example]({% slug viewoptions_multiviewcalendar %}#toc-displaying-other-month-days)).
177
+ * Determines whether to display days from adjacent months in the current month view ([see example]({% slug viewoptions_multiviewcalendar %}#toc-displaying-other-month-days)).
178
+ *
170
179
  * @default false
171
180
  */
172
181
  showOtherMonthDays = false;
173
182
  /**
174
- * Controls the popup container. By default, the popup is appended to the root component.
183
+ * Specifies where to render the popup container.
184
+ * By default, the popup renders in the root component.
185
+ *
186
+ * @default 'root'
175
187
  */
176
188
  appendTo;
177
189
  /**
178
- * Configures the collision behavior of the popup.
190
+ * Configures how the popup behaves when it encounters viewport boundaries.
179
191
  * For more information, refer to the article on
180
192
  * [viewport boundary detection]({% slug viewportboundarydetection_popup %}).
193
+ *
194
+ * @default { horizontal: 'fit', vertical: 'flip' }
181
195
  */
182
196
  collision = { horizontal: 'fit', vertical: 'flip' };
183
197
  /**
184
- * Specifies the pivot point of the popup.
198
+ * Specifies the alignment point for the popup element.
185
199
  * For more information, refer to the section on
186
200
  * [positioning]({% slug alignmentpositioning_popup %}#toc-positioning).
187
201
  */
188
202
  popupAlign;
189
203
  /**
190
- * Specifies the margin value that will be added to the popup dimensions in pixels
191
- * and leaves a blank space between the popup and the anchor.
204
+ * Specifies the margin around the popup in pixels.
205
+ * Creates empty space between the popup and its anchor element.
192
206
  */
193
207
  margin;
194
208
  /**
195
- * Enables or disables the adaptive mode. By default the adaptive rendering is disabled.
209
+ * Determines whether the component uses adaptive rendering for different screen sizes.
210
+ * By default, adaptive rendering is disabled.
211
+ *
212
+ * @default 'none'
196
213
  */
197
214
  adaptiveMode = 'none';
198
215
  /**
199
- * Sets the title of the input element of the DateRangePopup and the title text rendered
200
- * in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
216
+ * Specifies the title text for the input element and the header of the action sheet.
217
+ * Applies only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
218
+ *
219
+ * @default ""
201
220
  */
202
221
  adaptiveTitle = "";
203
222
  /**
204
- * Sets the subtitle text rendered in the header of the popup(action sheet).
205
- * Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
223
+ * Specifies the subtitle text displayed in the header of the action sheet.
224
+ * Applies only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
225
+ *
226
+ * @default ""
206
227
  */
207
228
  adaptiveSubtitle = "";
208
229
  /**
@@ -210,46 +231,35 @@ export class DateRangePopupComponent {
210
231
  *
211
232
  * TODO: Make visible when the Infinite Calendar is fixed to set properly the size option.
212
233
  * Sets the size of the component.
213
- *
214
- * The possible values are:
215
- * * `small`
216
- * * `medium` (Default)
217
- * * `large`
218
- * * `none`
219
- *
234
+ * @default 'medium'
220
235
  */
221
236
  size;
222
237
  /**
223
- * Fires each time the popup is about to open
224
- * ([see example](slug:popup_daterange#toc-events)).
225
- * This event is preventable. If you cancel the event, the popup will remain closed.
238
+ * Fires when the popup is about to open ([see example](slug:popup_daterange#toc-events)).
239
+ * You can prevent this event to keep the popup closed.
226
240
  */
227
241
  open = new EventEmitter();
228
242
  /**
229
- * Fires each time the popup is about to close
230
- * ([see example](slug:popup_daterange#toc-events)).
231
- * This event is preventable. If you cancel the event, the popup will remain open.
243
+ * Fires when the popup is about to close ([see example](slug:popup_daterange#toc-events)).
244
+ * You can prevent this event to keep the popup open.
232
245
  */
233
246
  close = new EventEmitter();
234
247
  /**
235
- * Fires each time the calendar element is blurred
236
- * ([see example](slug:popup_daterange#toc-events)).
248
+ * Fires when the calendar element loses focus ([see example](slug:popup_daterange#toc-events)).
237
249
  */
238
250
  onBlur = new EventEmitter();
239
251
  /**
240
- * Fires each time the calendar element is focused
241
- * ([see example](slug:popup_daterange#toc-events)).
252
+ * Fires when the calendar element receives focus ([see example](slug:popup_daterange#toc-events)).
242
253
  */
243
254
  onFocus = new EventEmitter();
244
255
  /**
245
- * Fires each time the popup is closed either on `ESC` keypress or on leaving the viewport
246
- * ([see example](slug:popup_daterange#toc-events)).
256
+ * Fires when the popup closes due to an `ESC` keypress or when it leaves the viewport ([see example](slug:popup_daterange#toc-events)).
247
257
  */
248
258
  cancel = new EventEmitter();
249
259
  /**
250
- * The active calendar that is visible in the popup
260
+ * Gets the active calendar that displays in the popup.
251
261
  *
252
- * > When the popup is closed, the property returns `null`.
262
+ * When the popup is closed, the property returns `null`.
253
263
  */
254
264
  get calendar() {
255
265
  return this._calendar;
@@ -260,7 +270,7 @@ export class DateRangePopupComponent {
260
270
  }
261
271
  /**
262
272
  * Gets the active state of the component.
263
- * When the opened calendar is active, returns `true`.
273
+ * Returns `true` when the opened calendar is active.
264
274
  */
265
275
  get isActive() {
266
276
  // The actionsheet is expanding before the calendar gets activated
@@ -408,7 +418,7 @@ export class DateRangePopupComponent {
408
418
  }
409
419
  }
410
420
  /**
411
- * Opens the popup component and focuses the calendar.
421
+ * Opens the popup component and focuses the calendar.
412
422
  */
413
423
  activate() {
414
424
  if (this.show === true) {
@@ -427,7 +437,7 @@ export class DateRangePopupComponent {
427
437
  });
428
438
  }
429
439
  /**
430
- * Focuses the calendar (if available).
440
+ * Focuses the calendar if it is available.
431
441
  */
432
442
  focus() {
433
443
  if (this.calendar) {
@@ -435,9 +445,9 @@ export class DateRangePopupComponent {
435
445
  }
436
446
  }
437
447
  /**
438
- * Checks if a focused element ids placed inside the popup.
448
+ * Checks if a focused element is inside the popup.
439
449
  *
440
- * @return boolean;
450
+ * @returns {boolean} Returns `true` if the focused element is inside the popup.
441
451
  */
442
452
  hasActiveContent() {
443
453
  if (!isDocumentAvailable() || !this.popupRef) {
@@ -446,11 +456,11 @@ export class DateRangePopupComponent {
446
456
  return this.popupRef.popupElement.contains(document.activeElement);
447
457
  }
448
458
  /**
449
- * Toggles the visibility of the popup or actionSheet.
450
- * If you use the `toggle` method to show or hide the popup or actionSheet,
459
+ * Toggles the visibility of the popup or action sheet.
460
+ * When you use the `toggle` method to show or hide the popup or action sheet,
451
461
  * the `open` and `close` events do not fire.
452
462
  *
453
- * @param show The state of the popup.
463
+ * @param {boolean} show The state of the popup.
454
464
  */
455
465
  toggle(show) {
456
466
  this.resolvedPromise.then(() => {
@@ -13,9 +13,9 @@ import * as i0 from "@angular/core";
13
13
  import * as i1 from "../calendar/multiview-calendar.component";
14
14
  import * as i2 from "./date-range.service";
15
15
  /**
16
- * A directive which manages the MultiViewCalendar range selection.
16
+ * Manages the MultiViewCalendar range selection.
17
17
  * This directive will be `deprecated` in a future version.
18
- * We recommend using the MultiViewCalendar [range selection]({% slug selection_multiviewcalendar %}#toc-range-selection).
18
+ * Use the MultiViewCalendar [range selection]({% slug selection_multiviewcalendar %}#toc-range-selection) instead.
19
19
  */
20
20
  export class DateRangeSelectionDirective {
21
21
  calendar;
@@ -24,15 +24,17 @@ export class DateRangeSelectionDirective {
24
24
  dateRangeService;
25
25
  /**
26
26
  * Specifies the auto-correction behavior. If the start date is greater than the end date,
27
- * the directive fixes the date range to a single date either on input change or on blur
27
+ * the directive corrects the date range to a single date either on input change or on blur
28
28
  * ([see example](slug:autocorrect_daterange#toc-calendar-selection-directive)).
29
29
  *
30
- * By default, the auto-correction is triggered on change.
30
+ * By default, the auto-correction triggers on change.
31
31
  * To disable this behavior, set the `autoCorrectOn` property to `none`.
32
+ *
33
+ * @default 'change'
32
34
  */
33
35
  autoCorrectOn = 'change';
34
36
  /**
35
- * Gets or sets the selection range of the calendar. When a new range is set,
37
+ * Gets or sets the selection range of the calendar. When you set a new range,
36
38
  * the connected DateRangeService notifies all related parties.
37
39
  */
38
40
  get selectionRange() {
@@ -52,8 +54,7 @@ export class DateRangeSelectionDirective {
52
54
  * user interaction. When a new active end is set, the connected DateRangeService notifies all related parties.
53
55
  */
54
56
  /**
55
- * Specifies which end of the selection range will be marked as active. The active end gets modified upon user
56
- * interaction. When a new active end is set, the wired DateRangeService notifies all related components. For
57
+ * Specifies which end of the selection range is marked as active. The active end gets modified when you interact with the component. When you set a new active end, the wired DateRangeService notifies all related components. For
57
58
  * example, the start and end DateInput components.
58
59
  *
59
60
  * > If the selection range is undefined, the value is ignored.
@@ -74,12 +75,12 @@ export class DateRangeSelectionDirective {
74
75
  */
75
76
  shouldSetRange = true;
76
77
  /**
77
- * Fires when the active range end is changed. For more information, refer to
78
+ * Fires when the active range end changes. For more information, refer to
78
79
  * the section on [events](slug:events_multiviewcalendar).
79
80
  */
80
81
  activeRangeEndChange = new EventEmitter();
81
82
  /**
82
- * Fires when the selection range is changed. For more information, refer to
83
+ * Fires when the selection range changes. For more information, refer to
83
84
  * the section on [events](slug:events_multiviewcalendar).
84
85
  */
85
86
  selectionRangeChange = new EventEmitter();
@@ -14,46 +14,45 @@ import * as i0 from "@angular/core";
14
14
  import * as i1 from "./date-range.service";
15
15
  import * as i2 from "../dateinput/dateinput.component";
16
16
  /**
17
- * A directive which manages the start selection range.
17
+ * Represents a directive that manages the start selection range for date range inputs.
18
18
  *
19
- * > You can use the DateRangeStartInputDirective only with a DateInput component.
19
+ * You can use the DateRangeStartInputDirective only with a DateInput component.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * @Component({
24
+ * selector: 'my-app',
25
+ * template: `
26
+ * <kendo-daterange>
27
+ * <kendo-dateinput kendoDateRangeStartInput [(value)]="startDate"></kendo-dateinput>
28
+ * <kendo-dateinput kendoDateRangeEndInput [(value)]="endDate"></kendo-dateinput>
29
+ * </kendo-daterange>
30
+ * `
31
+ * })
32
+ * export class AppComponent {
33
+ * public startDate: Date = new Date();
34
+ * public endDate: Date = new Date();
35
+ * }
36
+ * ```
20
37
  */
21
38
  export class DateRangeStartInputDirective extends DateRangeInput {
22
39
  rangeService;
23
40
  dateInput;
24
41
  renderer;
25
42
  /**
26
- * Specifies the auto-correction behavior. If the start date is greater than the end date,
27
- * the directive fixes the date range to a single date either on input change or on blur
28
- * ([see example](slug:autocorrect_daterange#toc-input-directives)).
43
+ * Specifies when the component automatically corrects invalid date ranges.
44
+ * When the start date is greater than the end date, the component fixes the range to a single date either on input change or on blur ([see example](slug:autocorrect_daterange#toc-input-directives)).
29
45
  *
30
46
  * By default, the component does not perform any auto-correction.
47
+ *
31
48
  */
32
49
  autoCorrectOn;
33
50
  /**
34
- * Specifies the navigation behavior of the calendar when the active end is changed on input focus.
35
- * When enabled, the calendar navigates to the value of the focused input. Otherwise, the calendar
36
- * displays the last picked date.
37
- *
38
- * By default, the automatic navigation behavior on input focus is disabled.
51
+ * Determines how the calendar navigates when you focus on the input.
52
+ * When you set `navigateCalendarOnFocus` to `true`, the calendar moves to the value of the focused input.
53
+ * When you set it to `false`, the calendar shows the last selected date.
39
54
  *
40
- * @example
41
- * ```ts
42
- * _@Component({
43
- * selector: 'my-app',
44
- * template: `
45
- * <h5>Toggle input focus to see the calendar navigating between range ends.</h5>
46
- * <kendo-daterange>
47
- * <kendo-dateinput kendoDateRangeStartInput [navigateCalendarOnFocus]="true" [(value)]="start"></kendo-dateinput>
48
- * <kendo-dateinput kendoDateRangeEndInput [navigateCalendarOnFocus]="true" [(value)]="end"></kendo-dateinput>
49
- * </kendo-daterange>
50
- * `
51
- * })
52
- * export class AppComponent {
53
- * public start: Date = new Date(2018, 3, 10);
54
- * public end: Date = new Date(2018, 10, 20);
55
- * }
56
- * ```
55
+ * @default false
57
56
  */
58
57
  navigateCalendarOnFocus = false;
59
58
  constructor(rangeService, dateInput, element, renderer, zone) {
@@ -38,12 +38,7 @@ export class DateRangeComponent {
38
38
  * TODO: Make visible when the Infinite Calendar is fixed to set properly the size option.
39
39
  * Sets the size of the component.
40
40
  *
41
- * The possible values are:
42
- * * `small`
43
- * * `medium` (Default)
44
- * * `large`
45
- * * `none`
46
- *
41
+ * @default 'medium'
47
42
  */
48
43
  size;
49
44
  /**
@@ -11,35 +11,35 @@ import * as i0 from "@angular/core";
11
11
  const isActive = (cmp) => (cmp && cmp.isActive) || false;
12
12
  const hasActiveContent = (popup) => popup && popup.hasActiveContent();
13
13
  /**
14
- * A service that handles the communication between the components that are placed inside the DateRangeComponent.
15
- * For example, the start and end `DateInput` and `DateRangePopup` components.
14
+ * Manages communication between components inside the DateRangeComponent.
15
+ * For example, handles interactions between the start and end DateInput components and the DateRangePopup component.
16
16
  */
17
17
  export class DateRangeService {
18
18
  renderer;
19
19
  /**
20
- * An Observable instance that notifies when the `activeRangeEnd` state is changed.
20
+ * Notifies when the `activeRangeEnd` state changes.
21
21
  */
22
22
  activeRangeEnd$ = new BehaviorSubject(null);
23
23
  /**
24
- * An Observable instance that notifies when the `focusedDate` is changed.
24
+ * Notifies when the `focusedDate` changes.
25
25
  */
26
26
  focusedDate$ = new BehaviorSubject(null);
27
27
  /**
28
- * An Observable instance that notifies when the end `DateInput` component is changed.
29
- * For example, when a new end `DateInput` is attached or when the old one is detached.
28
+ * Notifies when the end DateInput component changes.
29
+ * For example, when you attach a new end `DateInput` or detach the old one.
30
30
  */
31
31
  endInput$ = new BehaviorSubject(null);
32
32
  /**
33
- * An Observable instance that notifies when the start `DateInput` component is changed.
34
- * For example, when a new start `DateInput` is attached or the old one is detached.
33
+ * Notifies when the start DateInput component changes.
34
+ * For example, when you attach a new start `DateInput` or detach the old one.
35
35
  */
36
36
  startInput$ = new BehaviorSubject(null);
37
37
  /**
38
- * An Observable instance that notifies when the `DateRangePopup` component is changed.
38
+ * Notifies when the `DateRangePopup` component changes.
39
39
  */
40
40
  dateRangePopup$ = new BehaviorSubject(null);
41
41
  /**
42
- * An Observable instance that notifies when the state of the selection range is changed.
42
+ * Notifies when the selection range state changes.
43
43
  */
44
44
  range$ = new BehaviorSubject(EMPTY_SELECTIONRANGE);
45
45
  /**
@@ -55,15 +55,15 @@ export class DateRangeService {
55
55
  return this.focusedDate$.value;
56
56
  }
57
57
  /**
58
- * Gets the `min` range value.
59
- * The `min` value is extracted from the `start` DateInput value or the `min` value of the Calendar.
58
+ * Gets the minimum range value.
59
+ * Takes the `min` value from the start DateInput component or the `min` value of the calendar.
60
60
  */
61
61
  get min() {
62
62
  return (this.startInput$.value || {}).min || null;
63
63
  }
64
64
  /**
65
- * Gets the `max` range value.
66
- * The `max` value is extracted from the `end` DateInput value or the `max` value of the Calendar.
65
+ * Gets the maximum range value.
66
+ * Takes the `max` value from the end DateInput component or the `max` value of the calendar.
67
67
  */
68
68
  get max() {
69
69
  return (this.endInput$.value || {}).max || null;
@@ -93,8 +93,8 @@ export class DateRangeService {
93
93
  this.renderer = renderer;
94
94
  }
95
95
  /**
96
- * Activates the registered `DateRangePopup` component.
97
- * The method opens the popup and focuses the calendar.
96
+ * Opens the registered DateRangePopup component.
97
+ * Opens the popup and focuses the calendar.
98
98
  */
99
99
  activatePopup() {
100
100
  const dateRangePopup = this.dateRangePopup$.value;
@@ -149,8 +149,8 @@ export class DateRangeService {
149
149
  dateRangePopup.cancelPopup();
150
150
  }
151
151
  /**
152
- * Completes all observables to mitigate possible memory leaks.
153
- * Calls the method when a component that uses it is destroyed.
152
+ * Completes all observables to prevent memory leaks.
153
+ * Call this method when you destroy a component that uses the service.
154
154
  */
155
155
  destroy() {
156
156
  this.activeRangeEnd$.complete();
@@ -161,10 +161,10 @@ export class DateRangeService {
161
161
  this.range$.complete();
162
162
  }
163
163
  /**
164
- * Returns `true` when an active component that is placed inside the `DateRangeComponent` is detected.
165
- * For example, the opened popup or the focused DateInput.
164
+ * Checks if any component inside the DateRangeComponent is active.
165
+ * For example, detects an open popup or a focused DateInput component.
166
166
  *
167
- * @returns `true` if an active component is present.
167
+ * @returns {boolean} Returns `true` if an active component is present.
168
168
  */
169
169
  hasActiveComponent() {
170
170
  const popup = this.dateRangePopup$.value;
@@ -174,25 +174,25 @@ export class DateRangeService {
174
174
  return isPopup || isStart || isEnd || hasActiveContent(popup) || false;
175
175
  }
176
176
  /**
177
- * Registers a new start `DateInput` component. Notifies all `startInput$` listeners.
177
+ * Registers a new start DateInput component and notifies all `startInput$` listeners.
178
178
  */
179
179
  registerStartInput(startInput) {
180
180
  this.startInput$.next(startInput);
181
181
  }
182
182
  /**
183
- * Registers a new end `DateInput` component. Notifies all `endInput$` listeners.
183
+ * Registers a new end `DateInput` component and notifies all `endInput$` listeners.
184
184
  */
185
185
  registerEndInput(endInput) {
186
186
  this.endInput$.next(endInput);
187
187
  }
188
188
  /**
189
- * Registers a new `DateRangePopup` component. Notifies all `dateRangePopup$` listeners.
189
+ * Registers a new `DateRangePopup` component and notifies all `dateRangePopup$` listeners.
190
190
  */
191
191
  registerPopup(dateRangePopup) {
192
192
  this.dateRangePopup$.next(dateRangePopup);
193
193
  }
194
194
  /**
195
- * Updates the `activeRangeEnd` value. Notifies all `activeRangeEnd$` listeners.
195
+ * Updates the `activeRangeEnd` value and notifies all `activeRangeEnd$` listeners.
196
196
  */
197
197
  setActiveRangeEnd(activeRange) {
198
198
  if (!activeRange || this.activeRangeEnd === activeRange) {
@@ -201,7 +201,7 @@ export class DateRangeService {
201
201
  this.activeRangeEnd$.next(activeRange);
202
202
  }
203
203
  /**
204
- * Updates the focused date. Notifies all `focusedDate$` listeners.
204
+ * Updates the focused date and notifies all `focusedDate$` listeners.
205
205
  */
206
206
  setFocusedDate(value) {
207
207
  if (isEqual(this.focusedDate$.value, value)) {
@@ -210,7 +210,7 @@ export class DateRangeService {
210
210
  this.focusedDate$.next(value);
211
211
  }
212
212
  /**
213
- * Updates the selection range. Notifies all `range$` listeners.
213
+ * Updates the selection range and notifies all `range$` listeners.
214
214
  */
215
215
  setRange(range = EMPTY_SELECTIONRANGE) {
216
216
  this.range$.next(range);