@syncfusion/ej2-schedule 23.2.7 → 24.1.41

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 (119) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/ej2-schedule.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js +2 -2
  4. package/dist/ej2-schedule.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-schedule.es2015.js +272 -34
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +335 -64
  8. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  9. package/dist/global/ej2-schedule.min.js +2 -2
  10. package/dist/global/ej2-schedule.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +16 -16
  13. package/src/recurrence-editor/recurrence-editor.js +4 -2
  14. package/src/schedule/actions/drag.js +4 -4
  15. package/src/schedule/base/schedule-model.d.ts +15 -1
  16. package/src/schedule/base/schedule.d.ts +14 -1
  17. package/src/schedule/base/schedule.js +5 -0
  18. package/src/schedule/base/type.d.ts +12 -0
  19. package/src/schedule/event-renderer/agenda-base.js +1 -1
  20. package/src/schedule/event-renderer/event-base.d.ts +1 -0
  21. package/src/schedule/event-renderer/event-base.js +25 -1
  22. package/src/schedule/event-renderer/month.js +9 -1
  23. package/src/schedule/event-renderer/timeline-view.js +8 -2
  24. package/src/schedule/event-renderer/year.js +12 -3
  25. package/src/schedule/models/models.d.ts +1 -0
  26. package/src/schedule/models/toolbar-model.d.ts +196 -0
  27. package/src/schedule/models/toolbar.d.ts +176 -0
  28. package/src/schedule/models/toolbar.js +85 -0
  29. package/src/schedule/models/views-model.d.ts +9 -0
  30. package/src/schedule/models/views.d.ts +8 -0
  31. package/src/schedule/models/views.js +3 -0
  32. package/src/schedule/popups/event-window.js +4 -10
  33. package/src/schedule/popups/quick-popups.js +2 -2
  34. package/src/schedule/renderer/header-renderer.d.ts +2 -0
  35. package/src/schedule/renderer/header-renderer.js +142 -4
  36. package/src/schedule/renderer/renderer.js +1 -1
  37. package/src/schedule/renderer/vertical-view.js +3 -3
  38. package/src/schedule/renderer/year.js +3 -0
  39. package/styles/bootstrap-dark.css +26 -22
  40. package/styles/bootstrap.css +26 -22
  41. package/styles/bootstrap4.css +25 -21
  42. package/styles/bootstrap5-dark.css +30 -26
  43. package/styles/bootstrap5.css +30 -26
  44. package/styles/fabric-dark.css +28 -24
  45. package/styles/fabric.css +28 -24
  46. package/styles/fluent-dark.css +28 -24
  47. package/styles/fluent.css +28 -24
  48. package/styles/highcontrast-light.css +26 -22
  49. package/styles/highcontrast.css +26 -22
  50. package/styles/material-dark.css +26 -22
  51. package/styles/material.css +26 -22
  52. package/styles/material3-dark.css +29 -25
  53. package/styles/material3.css +29 -25
  54. package/styles/recurrence-editor/_bootstrap-dark-definition.scss +3 -1
  55. package/styles/recurrence-editor/_bootstrap-definition.scss +3 -1
  56. package/styles/recurrence-editor/_bootstrap4-definition.scss +3 -1
  57. package/styles/recurrence-editor/_bootstrap5-definition.scss +5 -3
  58. package/styles/recurrence-editor/_fabric-dark-definition.scss +4 -2
  59. package/styles/recurrence-editor/_fabric-definition.scss +4 -2
  60. package/styles/recurrence-editor/_fluent-definition.scss +4 -2
  61. package/styles/recurrence-editor/_fusionnew-definition.scss +4 -2
  62. package/styles/recurrence-editor/_highcontrast-definition.scss +3 -1
  63. package/styles/recurrence-editor/_highcontrast-light-definition.scss +3 -1
  64. package/styles/recurrence-editor/_layout.scss +3 -10
  65. package/styles/recurrence-editor/_material-dark-definition.scss +3 -1
  66. package/styles/recurrence-editor/_material-definition.scss +3 -1
  67. package/styles/recurrence-editor/_material3-definition.scss +4 -2
  68. package/styles/recurrence-editor/_tailwind-definition.scss +5 -3
  69. package/styles/recurrence-editor/bootstrap-dark.css +5 -10
  70. package/styles/recurrence-editor/bootstrap.css +5 -10
  71. package/styles/recurrence-editor/bootstrap4.css +4 -9
  72. package/styles/recurrence-editor/bootstrap5-dark.css +9 -14
  73. package/styles/recurrence-editor/bootstrap5.css +9 -14
  74. package/styles/recurrence-editor/fabric-dark.css +7 -12
  75. package/styles/recurrence-editor/fabric.css +7 -12
  76. package/styles/recurrence-editor/fluent-dark.css +7 -12
  77. package/styles/recurrence-editor/fluent.css +7 -12
  78. package/styles/recurrence-editor/highcontrast-light.css +5 -10
  79. package/styles/recurrence-editor/highcontrast.css +5 -10
  80. package/styles/recurrence-editor/material-dark.css +5 -10
  81. package/styles/recurrence-editor/material.css +5 -10
  82. package/styles/recurrence-editor/material3-dark.css +7 -12
  83. package/styles/recurrence-editor/material3.css +7 -12
  84. package/styles/recurrence-editor/tailwind-dark.css +9 -14
  85. package/styles/recurrence-editor/tailwind.css +9 -14
  86. package/styles/schedule/_bootstrap-dark-definition.scss +6 -2
  87. package/styles/schedule/_bootstrap-definition.scss +6 -2
  88. package/styles/schedule/_bootstrap4-definition.scss +6 -2
  89. package/styles/schedule/_bootstrap5-definition.scss +6 -2
  90. package/styles/schedule/_fabric-dark-definition.scss +6 -2
  91. package/styles/schedule/_fabric-definition.scss +6 -2
  92. package/styles/schedule/_fluent-definition.scss +6 -2
  93. package/styles/schedule/_fusionnew-definition.scss +6 -2
  94. package/styles/schedule/_highcontrast-definition.scss +6 -2
  95. package/styles/schedule/_highcontrast-light-definition.scss +6 -2
  96. package/styles/schedule/_layout.scss +23 -10
  97. package/styles/schedule/_material-dark-definition.scss +6 -2
  98. package/styles/schedule/_material-definition.scss +6 -2
  99. package/styles/schedule/_material3-definition.scss +6 -2
  100. package/styles/schedule/_tailwind-definition.scss +6 -2
  101. package/styles/schedule/bootstrap-dark.css +21 -12
  102. package/styles/schedule/bootstrap.css +21 -12
  103. package/styles/schedule/bootstrap4.css +21 -12
  104. package/styles/schedule/bootstrap5-dark.css +21 -12
  105. package/styles/schedule/bootstrap5.css +21 -12
  106. package/styles/schedule/fabric-dark.css +21 -12
  107. package/styles/schedule/fabric.css +21 -12
  108. package/styles/schedule/fluent-dark.css +21 -12
  109. package/styles/schedule/fluent.css +21 -12
  110. package/styles/schedule/highcontrast-light.css +21 -12
  111. package/styles/schedule/highcontrast.css +21 -12
  112. package/styles/schedule/material-dark.css +21 -12
  113. package/styles/schedule/material.css +21 -12
  114. package/styles/schedule/material3-dark.css +22 -13
  115. package/styles/schedule/material3.css +22 -13
  116. package/styles/schedule/tailwind-dark.css +22 -13
  117. package/styles/schedule/tailwind.css +22 -13
  118. package/styles/tailwind-dark.css +31 -27
  119. package/styles/tailwind.css +31 -27
@@ -0,0 +1,176 @@
1
+ import { ChildProperty, EmitType } from '@syncfusion/ej2-base';
2
+ import { ClickEventArgs, DisplayMode, ItemAlign, ItemType, OverflowOption } from '@syncfusion/ej2-navigations';
3
+ import { ToolbarName } from '../base/type';
4
+ export declare class ToolbarItem extends ChildProperty<ToolbarItem> {
5
+ /**
6
+ * Specifies the unique ID to be used with button or input element of Toolbar items.
7
+ *
8
+ * @default ""
9
+ */
10
+ id: string;
11
+ /**
12
+ * Specifies the text to be displayed on the Toolbar button.
13
+ *
14
+ * @default ""
15
+ */
16
+ text: string;
17
+ /**
18
+ * Specifies the width of the Toolbar button commands.
19
+ *
20
+ * @default 'auto'
21
+ */
22
+ width: number | string;
23
+ /**
24
+ * Defines single/multiple classes (separated by space) to be used for customization of commands.
25
+ *
26
+ * @default ""
27
+ */
28
+ cssClass: string;
29
+ /**
30
+ * Defines the priority of items to display it in popup always.
31
+ * It allows to maintain toolbar item on popup always but it does not work for toolbar priority items.
32
+ *
33
+ * @default false
34
+ */
35
+ showAlwaysInPopup: boolean;
36
+ /**
37
+ * Specifies whether an item should be disabled or not.
38
+ *
39
+ * @default false
40
+ */
41
+ disabled: boolean;
42
+ /**
43
+ * Defines single/multiple classes separated by space used to specify an icon for the button.
44
+ * The icon will be positioned before the text content if text is available, otherwise the icon alone will be rendered.
45
+ *
46
+ * @default ""
47
+ */
48
+ prefixIcon: string;
49
+ /**
50
+ * Defines single/multiple classes separated by space used to specify an icon for the button.
51
+ * The icon will be positioned after the text content if text is available.
52
+ *
53
+ * @default ""
54
+ */
55
+ suffixIcon: string;
56
+ /**
57
+ * Specifies whether an item should be hidden or not.
58
+ *
59
+ * @default true
60
+ */
61
+ visible: boolean;
62
+ /**
63
+ * Specifies the Toolbar command display area when an element's content is too large to fit available space.
64
+ * This is applicable only to `popup` mode. The possible values for this property as follows
65
+ * * `Show`: Always shows the item as the primary priority on the *Toolbar*.
66
+ * * `Hide`: Always shows the item as the secondary priority on the *popup*.
67
+ * * `None`: No priority for display, and as per normal order moves to popup when content exceeds.
68
+ *
69
+ * @default 'None'
70
+ * @aspDefaultValue Syncfusion.EJ2.Navigations.OverflowOption.None
71
+ * @isEnumeration true
72
+ * @aspType Syncfusion.EJ2.Navigations.OverflowOption
73
+ */
74
+ overflow: OverflowOption;
75
+ /**
76
+ * Specifies the HTML element/element ID as a string that can be added as a Toolbar command.
77
+ * ```
78
+ * E.g - items: [{ template: '<input placeholder="Search"/>' },{ template: '#checkbox1' }]
79
+ * ```
80
+ *
81
+ * @default ""
82
+ * @angularType string | object
83
+ * @reactType string | function | JSX.Element
84
+ * @vueType string | function
85
+ * @aspType string
86
+ */
87
+ template: string | Object | Function;
88
+ /**
89
+ * Specifies the types of command to be rendered in the Toolbar.
90
+ * Supported types are:
91
+ * * `Button`: Creates the Button control with its given properties like text, prefixIcon, etc.
92
+ * * `Separator`: Adds a horizontal line that separates the Toolbar commands.
93
+ * * `Input`: Creates an input element that is applicable to template rendering with Syncfusion controls like DropDownList,
94
+ * AutoComplete, etc.
95
+ *
96
+ * @default 'Button'
97
+ * @aspDefaultValue Syncfusion.EJ2.Navigations.ItemType.Button
98
+ * @isEnumeration true
99
+ * @aspType Syncfusion.EJ2.Navigations.ItemType
100
+ */
101
+ type: ItemType;
102
+ /**
103
+ * Specifies where the button text will be displayed on *popup mode* of the Toolbar.
104
+ * The possible values for this property as follows
105
+ * * `Toolbar`: Text will be displayed on *Toolbar* only.
106
+ * * `Overflow`: Text will be displayed only when content overflows to *popup*.
107
+ * * `Both`: Text will be displayed on *popup* and *Toolbar*.
108
+ *
109
+ * @default 'Both'
110
+ * @aspDefaultValue Syncfusion.EJ2.Navigations.DisplayMode.Both
111
+ * @isEnumeration true
112
+ * @aspType Syncfusion.EJ2.Navigations.DisplayMode
113
+ */
114
+ showTextOn: DisplayMode;
115
+ /**
116
+ * Defines htmlAttributes used to add custom attributes to Toolbar command.
117
+ * Supports HTML attributes such as style, class, etc.
118
+ *
119
+ * @default null
120
+ */
121
+ htmlAttributes: {
122
+ [key: string]: string;
123
+ };
124
+ /**
125
+ * Specifies the text to be displayed on hovering the Toolbar button.
126
+ *
127
+ * @default ""
128
+ */
129
+ tooltipText: string;
130
+ /**
131
+ * Specifies the location for aligning Toolbar items on the Toolbar. Each command will be aligned according to the `align` property.
132
+ * The possible values for this property as follows
133
+ * * `Left`: To align commands to the left side of the Toolbar.
134
+ * * `Center`: To align commands at the center of the Toolbar.
135
+ * * `Right`: To align commands to the right side of the Toolbar.
136
+ *
137
+ * @default 'Left'
138
+ * @aspDefaultValue Syncfusion.EJ2.Navigations.ItemAlign.Left
139
+ * @isEnumeration true
140
+ * @aspType Syncfusion.EJ2.Navigations.ItemAlign
141
+ */
142
+ align: ItemAlign;
143
+ /**
144
+ * Specifies the tab order of the Toolbar items. When positive values assigned, it allows to switch focus to the next/previous toolbar items with Tab/ShiftTab keys.
145
+ * By default, user can able to switch between items only via arrow keys.
146
+ * If the value is set to 0 for all tool bar items, then tab switches based on element order.
147
+ *
148
+ * @default -1
149
+ */
150
+ tabIndex: number;
151
+ /**
152
+ * Specifies the unique name for each toolbar item rendered in Schedule. This name is used to map the toolbar items in the Schedule component.
153
+ *
154
+ * To access the default toolbar items, provide the name below,
155
+ *
156
+ * * `Custom`: Schedule component render the custom toolbar item.
157
+ * * `Previous`: Schedule component navigates to the previous date from the current date.
158
+ * * `Next`: Schedule component navigates to the next date from the current date.
159
+ * * `Today`: Schedule component navigates to the current date from any date.
160
+ * * `Views`: Schedule component render the defined view options in the toolbar. If view option is not defined, then it will render default view options in the Schedule.
161
+ * * `DateRangeText`: Schedule component displays the current date text range.
162
+ * * `NewEvent`: Schedule component render the icon to add a new event.
163
+ *
164
+ * @default 'Custom'
165
+ * @aspDefaultValue Custom
166
+ * @isEnumeration true
167
+ * @aspType ToolbarName
168
+ */
169
+ name: ToolbarName;
170
+ /**
171
+ * Event triggers when `click` the toolbar item.
172
+ *
173
+ * @event click
174
+ */
175
+ click: EmitType<ClickEventArgs>;
176
+ }
@@ -0,0 +1,85 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ };
20
+ import { Property, ChildProperty, Event } from '@syncfusion/ej2-base';
21
+ var ToolbarItem = /** @class */ (function (_super) {
22
+ __extends(ToolbarItem, _super);
23
+ function ToolbarItem() {
24
+ return _super !== null && _super.apply(this, arguments) || this;
25
+ }
26
+ __decorate([
27
+ Property('')
28
+ ], ToolbarItem.prototype, "id", void 0);
29
+ __decorate([
30
+ Property('')
31
+ ], ToolbarItem.prototype, "text", void 0);
32
+ __decorate([
33
+ Property('auto')
34
+ ], ToolbarItem.prototype, "width", void 0);
35
+ __decorate([
36
+ Property('')
37
+ ], ToolbarItem.prototype, "cssClass", void 0);
38
+ __decorate([
39
+ Property(false)
40
+ ], ToolbarItem.prototype, "showAlwaysInPopup", void 0);
41
+ __decorate([
42
+ Property(false)
43
+ ], ToolbarItem.prototype, "disabled", void 0);
44
+ __decorate([
45
+ Property('')
46
+ ], ToolbarItem.prototype, "prefixIcon", void 0);
47
+ __decorate([
48
+ Property('')
49
+ ], ToolbarItem.prototype, "suffixIcon", void 0);
50
+ __decorate([
51
+ Property(true)
52
+ ], ToolbarItem.prototype, "visible", void 0);
53
+ __decorate([
54
+ Property('None')
55
+ ], ToolbarItem.prototype, "overflow", void 0);
56
+ __decorate([
57
+ Property('')
58
+ ], ToolbarItem.prototype, "template", void 0);
59
+ __decorate([
60
+ Property('Button')
61
+ ], ToolbarItem.prototype, "type", void 0);
62
+ __decorate([
63
+ Property('Both')
64
+ ], ToolbarItem.prototype, "showTextOn", void 0);
65
+ __decorate([
66
+ Property(null)
67
+ ], ToolbarItem.prototype, "htmlAttributes", void 0);
68
+ __decorate([
69
+ Property('')
70
+ ], ToolbarItem.prototype, "tooltipText", void 0);
71
+ __decorate([
72
+ Property('Left')
73
+ ], ToolbarItem.prototype, "align", void 0);
74
+ __decorate([
75
+ Property(-1)
76
+ ], ToolbarItem.prototype, "tabIndex", void 0);
77
+ __decorate([
78
+ Property('Custom')
79
+ ], ToolbarItem.prototype, "name", void 0);
80
+ __decorate([
81
+ Event()
82
+ ], ToolbarItem.prototype, "click", void 0);
83
+ return ToolbarItem;
84
+ }(ChildProperty));
85
+ export { ToolbarItem };
@@ -74,6 +74,15 @@ export interface ViewsModel {
74
74
  */
75
75
  allowVirtualScrolling?: boolean;
76
76
 
77
+ /**
78
+ * Specifies the maximum number of events to be displayed in a single row.
79
+ * This property is applicable when the 'rowAutoHeight' property is disabled.
80
+ * This property is only applicable for the month view, timeline views, and timeline year view.
81
+ *
82
+ * @default null
83
+ */
84
+ maxEventsPerRow?: number;
85
+
77
86
  /**
78
87
  * It accepts either the string or HTMLElement as template design content and parse it appropriately before displaying it onto the
79
88
  * month date cells.
@@ -67,6 +67,14 @@ export declare class Views extends ChildProperty<Views> {
67
67
  * @default false
68
68
  */
69
69
  allowVirtualScrolling: boolean;
70
+ /**
71
+ * Specifies the maximum number of events to be displayed in a single row.
72
+ * This property is applicable when the 'rowAutoHeight' property is disabled.
73
+ * This property is only applicable for the month view, timeline views, and timeline year view.
74
+ *
75
+ * @default null
76
+ */
77
+ maxEventsPerRow: number;
70
78
  /**
71
79
  * It accepts either the string or HTMLElement as template design content and parse it appropriately before displaying it onto the
72
80
  * month date cells.
@@ -50,6 +50,9 @@ var Views = /** @class */ (function (_super) {
50
50
  __decorate([
51
51
  Property(false)
52
52
  ], Views.prototype, "allowVirtualScrolling", void 0);
53
+ __decorate([
54
+ Property(null)
55
+ ], Views.prototype, "maxEventsPerRow", void 0);
53
56
  __decorate([
54
57
  Property()
55
58
  ], Views.prototype, "cellHeaderTemplate", void 0);
@@ -383,15 +383,11 @@ var EventWindow = /** @class */ (function () {
383
383
  var titleLocationDiv = this.createDivElement(cls.EVENT_WINDOW_TITLE_LOCATION_DIV_CLASS);
384
384
  parentDiv.appendChild(titleLocationDiv);
385
385
  titleLocationDiv.appendChild(this.renderTextBox(cls.SUBJECT_CLASS));
386
- titleLocationDiv.querySelector('.' + cls.SUBJECT_CLASS).setAttribute('title', this.parent.editorTitles.subject);
387
386
  titleLocationDiv.appendChild(this.renderTextBox(cls.LOCATION_CLASS));
388
- titleLocationDiv.querySelector('.' + cls.LOCATION_CLASS).setAttribute('title', this.parent.editorTitles.location);
389
387
  var startEndDateTimeDiv = this.createDivElement(cls.EVENT_WINDOW_START_END_DIV_CLASS);
390
388
  parentDiv.appendChild(startEndDateTimeDiv);
391
389
  startEndDateTimeDiv.appendChild(this.renderDateTimePicker(cls.EVENT_WINDOW_START_CLASS, this.onTimeChange.bind(this)));
392
- startEndDateTimeDiv.querySelector('.' + cls.EVENT_WINDOW_START_CLASS).setAttribute('title', this.parent.editorTitles.startTime);
393
390
  startEndDateTimeDiv.appendChild(this.renderDateTimePicker(cls.EVENT_WINDOW_END_CLASS));
394
- startEndDateTimeDiv.querySelector('.' + cls.EVENT_WINDOW_END_CLASS).setAttribute('title', this.parent.editorTitles.endTime);
395
391
  var allDayTimezoneDiv = this.createDivElement(cls.EVENT_WINDOW_ALLDAY_TZ_DIV_CLASS);
396
392
  parentDiv.appendChild(allDayTimezoneDiv);
397
393
  allDayTimezoneDiv.appendChild(this.renderCheckBox(cls.EVENT_WINDOW_ALL_DAY_CLASS));
@@ -429,7 +425,6 @@ var EventWindow = /** @class */ (function () {
429
425
  }
430
426
  var description = this.createDivElement(cls.DESCRIPTION_CLASS + '-row');
431
427
  description.appendChild(this.renderTextBox(cls.DESCRIPTION_CLASS));
432
- description.querySelector('.' + cls.DESCRIPTION_CLASS).setAttribute('title', this.parent.editorTitles.description);
433
428
  parentDiv.appendChild(description);
434
429
  var submit = createElement('button', { attrs: { type: 'hidden', title: 'submit', style: 'display:none' } });
435
430
  parentDiv.appendChild(submit);
@@ -448,9 +443,7 @@ var EventWindow = /** @class */ (function () {
448
443
  EventWindow.prototype.createInputElement = function (className, fieldName, type) {
449
444
  return createElement(type || 'input', {
450
445
  className: className, attrs: {
451
- type: 'text', name: fieldName, value: '', id: fieldName,
452
- title: ((this.l10n.getConstant(fieldName.charAt(0).toLowerCase() + fieldName.slice(1))) === '') ?
453
- fieldName : this.l10n.getConstant(fieldName.charAt(0).toLowerCase() + fieldName.slice(1))
446
+ type: 'text', name: fieldName, value: '', id: fieldName
454
447
  }
455
448
  });
456
449
  };
@@ -472,6 +465,7 @@ var EventWindow = /** @class */ (function () {
472
465
  enableRtl: this.parent.enableRtl,
473
466
  locale: this.parent.locale,
474
467
  floatLabelType: 'Always',
468
+ strictMode: true,
475
469
  timeFormat: this.parent.activeViewOptions.timeFormat,
476
470
  format: (isNullOrUndefined(this.parent.dateFormat) ?
477
471
  this.getFormat('dateFormats') : this.parent.dateFormat) + ' ' + this.parent.activeViewOptions.timeFormat,
@@ -540,7 +534,7 @@ var EventWindow = /** @class */ (function () {
540
534
  text: resourceData.textField,
541
535
  value: resourceData.idField
542
536
  },
543
- htmlAttributes: { 'title': labelValue, 'name': fieldName },
537
+ htmlAttributes: { 'name': fieldName },
544
538
  floatLabelType: 'Always',
545
539
  placeholder: labelValue,
546
540
  popupHeight: '230px',
@@ -559,7 +553,7 @@ var EventWindow = /** @class */ (function () {
559
553
  text: resourceData.textField,
560
554
  value: resourceData.idField
561
555
  },
562
- htmlAttributes: { 'title': labelValue, 'name': fieldName },
556
+ htmlAttributes: { 'name': fieldName },
563
557
  floatLabelType: 'Always',
564
558
  placeholder: labelValue,
565
559
  popupHeight: '230px',
@@ -52,9 +52,9 @@ var QuickPopups = /** @class */ (function () {
52
52
  };
53
53
  QuickPopups.prototype.renderMorePopup = function () {
54
54
  var moreEventPopup = "<div class=\"" + cls.MORE_EVENT_POPUP_CLASS + "\"><div class=\"" + cls.MORE_EVENT_HEADER_CLASS + "\">" +
55
- ("<div class=\"" + cls.MORE_EVENT_CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\" tabindex=\"0\"></div>") +
55
+ ("<div class=\"" + cls.MORE_EVENT_CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\" tabindex=\"0\" role=\"button\"></div>") +
56
56
  ("<div class=\"" + cls.MORE_EVENT_DATE_HEADER_CLASS + "\"><div class=\"" + cls.MORE_EVENT_HEADER_DAY_CLASS + "\"></div>") +
57
- ("<div class=\"" + cls.MORE_EVENT_HEADER_DATE_CLASS + " " + cls.NAVIGATE_CLASS + "\" tabindex=\"0\"></div></div></div></div>");
57
+ ("<div class=\"" + cls.MORE_EVENT_HEADER_DATE_CLASS + " " + cls.NAVIGATE_CLASS + "\" tabindex=\"0\" role=\"link\"></div></div></div></div>");
58
58
  var moreEventWrapper = createElement('div', {
59
59
  className: cls.MORE_POPUP_WRAPPER_CLASS + ' e-popup-close',
60
60
  innerHTML: moreEventPopup
@@ -29,6 +29,8 @@ export declare class HeaderRenderer {
29
29
  refresh(): void;
30
30
  updateAddIcon(): void;
31
31
  private getDateRangeText;
32
+ private getItemModel;
33
+ private getToolbarItems;
32
34
  private getItems;
33
35
  private getItemObject;
34
36
  private renderHeaderPopup;
@@ -1,3 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
13
  import { isNullOrUndefined, createElement, remove, closest, addClass, removeClass, extend, append } from '@syncfusion/ej2-base';
3
14
  import { Toolbar } from '@syncfusion/ej2-navigations';
@@ -63,7 +74,7 @@ var HeaderRenderer = /** @class */ (function () {
63
74
  };
64
75
  HeaderRenderer.prototype.renderToolbar = function () {
65
76
  var _this = this;
66
- var items = this.getItems();
77
+ var items = (this.parent.toolbarItems && this.parent.toolbarItems.length > 0) ? this.getToolbarItems() : this.getItems();
67
78
  this.parent.trigger(events.actionBegin, { requestType: 'toolbarItemRendering', items: items }, function (args) {
68
79
  _this.toolbarObj = new Toolbar({
69
80
  items: args.items,
@@ -73,6 +84,7 @@ var HeaderRenderer = /** @class */ (function () {
73
84
  enableHtmlSanitizer: _this.parent.enableHtmlSanitizer,
74
85
  locale: _this.parent.locale
75
86
  });
87
+ _this.toolbarObj.root = _this.parent.root ? _this.parent.root : _this.parent;
76
88
  _this.toolbarObj.appendTo(_this.parent.element.querySelector('.' + cls.HEADER_TOOLBAR));
77
89
  var prevNavEle = _this.toolbarObj.element.querySelector('.e-prev');
78
90
  if (prevNavEle) {
@@ -195,20 +207,146 @@ var HeaderRenderer = /** @class */ (function () {
195
207
  });
196
208
  return util.capitalizeFirstWord(dateString, 'single');
197
209
  };
210
+ HeaderRenderer.prototype.getItemModel = function (propItem) {
211
+ var item = {};
212
+ if (propItem.id) {
213
+ item.id = propItem.id;
214
+ }
215
+ if (propItem.text) {
216
+ item.text = propItem.text;
217
+ }
218
+ if (propItem.tooltipText) {
219
+ item.tooltipText = propItem.tooltipText;
220
+ }
221
+ if (propItem.prefixIcon) {
222
+ item.prefixIcon = propItem.prefixIcon;
223
+ }
224
+ if (propItem.cssClass) {
225
+ item.cssClass = propItem.cssClass;
226
+ }
227
+ if (propItem.showTextOn !== 'Both') {
228
+ item.showTextOn = propItem.showTextOn;
229
+ }
230
+ if (propItem.template) {
231
+ item.template = propItem.template;
232
+ }
233
+ if (propItem.disabled) {
234
+ item.disabled = propItem.disabled;
235
+ }
236
+ if (propItem.width !== 'auto') {
237
+ item.width = propItem.width;
238
+ }
239
+ if (propItem.suffixIcon) {
240
+ item.suffixIcon = propItem.suffixIcon;
241
+ }
242
+ if (propItem.align !== 'Left') {
243
+ item.align = propItem.align;
244
+ }
245
+ if (propItem.overflow !== 'None') {
246
+ item.overflow = propItem.overflow;
247
+ }
248
+ if (propItem.htmlAttributes) {
249
+ item.htmlAttributes = propItem.htmlAttributes;
250
+ }
251
+ if (propItem.type !== 'Button') {
252
+ item.type = propItem.type;
253
+ }
254
+ if (propItem.visible !== true) {
255
+ item.visible = propItem.visible;
256
+ }
257
+ if (propItem.showAlwaysInPopup) {
258
+ item.showAlwaysInPopup = propItem.showAlwaysInPopup;
259
+ }
260
+ if (propItem.tabIndex !== -1) {
261
+ item.tabIndex = propItem.tabIndex;
262
+ }
263
+ return item;
264
+ };
265
+ HeaderRenderer.prototype.getToolbarItems = function () {
266
+ var items = [];
267
+ var propItem;
268
+ for (var _i = 0, _a = this.parent.toolbarItems; _i < _a.length; _i++) {
269
+ var item = _a[_i];
270
+ propItem = this.getItemModel(item);
271
+ var tbItem = void 0;
272
+ if (item.name) {
273
+ switch (item.name) {
274
+ case 'Today':
275
+ tbItem = {
276
+ showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-day',
277
+ text: this.l10n.getConstant('today'), cssClass: 'e-today', overflow: 'Show'
278
+ };
279
+ tbItem.align = propItem.align ? propItem.align : item.align;
280
+ items.push(__assign({}, tbItem, propItem));
281
+ break;
282
+ case 'Previous':
283
+ tbItem = {
284
+ prefixIcon: 'e-icon-prev', tooltipText: 'Previous', overflow: 'Show',
285
+ cssClass: 'e-prev', htmlAttributes: { 'role': 'navigation' }
286
+ };
287
+ tbItem.align = propItem.align ? propItem.align : item.align;
288
+ items.push(__assign({}, tbItem, propItem));
289
+ break;
290
+ case 'Next':
291
+ tbItem = {
292
+ prefixIcon: 'e-icon-next', tooltipText: 'Next', overflow: 'Show',
293
+ cssClass: 'e-next', htmlAttributes: { 'role': 'navigation' }
294
+ };
295
+ tbItem.align = propItem.align ? propItem.align : item.align;
296
+ items.push(__assign({}, tbItem, propItem));
297
+ break;
298
+ case 'DateRangeText':
299
+ tbItem = {
300
+ text: this.getDateRangeText(), suffixIcon: 'e-icon-down-arrow', cssClass: 'e-date-range',
301
+ overflow: 'Show',
302
+ htmlAttributes: { 'aria-atomic': 'true', 'aria-live': 'assertive', 'role': 'navigation' }
303
+ };
304
+ tbItem.align = propItem.align ? propItem.align : item.align;
305
+ items.push(__assign({}, tbItem, propItem));
306
+ break;
307
+ case 'NewEvent':
308
+ tbItem = {
309
+ showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-add',
310
+ text: this.l10n.getConstant('newEvent'), cssClass: 'e-add', overflow: 'Show'
311
+ };
312
+ tbItem.align = propItem.align ? propItem.align : item.align;
313
+ items.push(__assign({}, tbItem, propItem));
314
+ break;
315
+ case 'Views':
316
+ if (this.parent.views.length > 1) {
317
+ for (var _b = 0, _c = this.parent.views; _b < _c.length; _b++) {
318
+ var view = _c[_b];
319
+ tbItem = this.getItemObject(view);
320
+ tbItem.align = propItem.align ? propItem.align : item.align;
321
+ items.push(__assign({}, tbItem, propItem));
322
+ }
323
+ }
324
+ break;
325
+ case 'Custom':
326
+ items.push(item);
327
+ break;
328
+ }
329
+ }
330
+ else {
331
+ items.push(item);
332
+ }
333
+ }
334
+ return items;
335
+ };
198
336
  HeaderRenderer.prototype.getItems = function () {
199
337
  var items = [];
200
338
  items.push({
201
339
  align: 'Left', prefixIcon: 'e-icon-prev', tooltipText: 'Previous', overflow: 'Show',
202
- cssClass: 'e-prev', htmlAttributes: { 'role': 'navigation' }
340
+ cssClass: 'e-prev'
203
341
  });
204
342
  items.push({
205
343
  align: 'Left', prefixIcon: 'e-icon-next', tooltipText: 'Next', overflow: 'Show',
206
- cssClass: 'e-next', htmlAttributes: { 'role': 'navigation' }
344
+ cssClass: 'e-next'
207
345
  });
208
346
  items.push({
209
347
  align: 'Left', text: this.getDateRangeText(), suffixIcon: 'e-icon-down-arrow', cssClass: 'e-date-range',
210
348
  overflow: 'Show',
211
- htmlAttributes: { 'aria-atomic': 'true', 'aria-live': 'assertive', 'role': 'navigation' }
349
+ htmlAttributes: { 'aria-atomic': 'true', 'aria-live': 'assertive' }
212
350
  });
213
351
  if (this.parent.isAdaptive || this.parent.enableAdaptiveUI) {
214
352
  items.push({
@@ -132,7 +132,7 @@ var Render = /** @class */ (function () {
132
132
  };
133
133
  Render.prototype.updateLabelText = function (view) {
134
134
  var content = this.parent.activeView.getLabelText(view);
135
- this.parent.element.setAttribute('role', 'main');
135
+ this.parent.element.setAttribute('role', 'application');
136
136
  this.parent.element.setAttribute('aria-label', content);
137
137
  };
138
138
  return Render;
@@ -761,9 +761,9 @@ var VerticalView = /** @class */ (function (_super) {
761
761
  var msStartHour = startHour.getTime();
762
762
  var msEndHour = endHour.getTime();
763
763
  if (msStartHour !== msEndHour) {
764
- var duration = this.parent.activeViewOptions.timeScale.interval / this.parent.activeViewOptions.timeScale.slotCount;
765
- length = (Math.abs(msEndHour - msStartHour) / msInterval) - ((new Date(msEndHour).getTimezoneOffset()
766
- - new Date(msStartHour).getTimezoneOffset()) / duration);
764
+ var milliSeconds = (startHour.getTimezoneOffset() !== endHour.getTimezoneOffset()) ?
765
+ (msEndHour - msStartHour) - 3600000 : (msEndHour - msStartHour);
766
+ length = Math.round(milliSeconds / msInterval);
767
767
  }
768
768
  if (!this.parent.activeViewOptions.timeScale.enable) {
769
769
  length = 1;
@@ -170,6 +170,9 @@ var Year = /** @class */ (function (_super) {
170
170
  var classList = [];
171
171
  if (currentDate.getMonth() !== date.getMonth()) {
172
172
  classList.push(cls.OTHERMONTH_CLASS);
173
+ if (td.firstElementChild && !this.parent.activeViewOptions.cellTemplate) {
174
+ td.firstElementChild.setAttribute('aria-disabled', 'true');
175
+ }
173
176
  }
174
177
  if (this.isCurrentDate(date) && currentDate.getMonth() === date.getMonth()) {
175
178
  classList = classList.concat(['e-today', 'e-selected']);