@syncfusion/ej2-calendars 33.2.12 → 33.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-calendars.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +26 -20
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +26 -20
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +2 -2
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/helpers/e2e/calendarHelper.d.ts +25 -0
- package/helpers/e2e/calendarHelper.js +87 -0
- package/helpers/e2e/datepickerHelper.d.ts +28 -0
- package/helpers/e2e/datepickerHelper.js +96 -0
- package/helpers/e2e/daterangepickerHelper.d.ts +39 -0
- package/helpers/e2e/daterangepickerHelper.js +129 -0
- package/helpers/e2e/datetimepickerHelper.d.ts +38 -0
- package/helpers/e2e/datetimepickerHelper.js +126 -0
- package/helpers/e2e/index.d.ts +5 -0
- package/helpers/e2e/index.js +12 -0
- package/helpers/e2e/timepickerHelper.d.ts +17 -0
- package/helpers/e2e/timepickerHelper.js +63 -0
- package/package.json +3 -3
- package/src/calendar/calendar.d.ts +1 -0
- package/src/calendar/calendar.js +26 -20
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
define(["require", "exports", "@syncfusion/ej2-base/helpers/e2e"], function (require, exports, e2e_1) {
|
|
15
|
+
"use strict";
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var timepickerHelper = (function (_super) {
|
|
18
|
+
__extends(timepickerHelper, _super);
|
|
19
|
+
function timepickerHelper(id, wrapperFn) {
|
|
20
|
+
var _this = _super.call(this) || this;
|
|
21
|
+
_this.id = id;
|
|
22
|
+
if (wrapperFn !== undefined) {
|
|
23
|
+
_this.wrapperFn = wrapperFn;
|
|
24
|
+
}
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
timepickerHelper.prototype.selector = function (arg) {
|
|
28
|
+
return (this.wrapperFn ? this.wrapperFn(arg) : arg);
|
|
29
|
+
};
|
|
30
|
+
timepickerHelper.prototype.getElement = function () {
|
|
31
|
+
return this.selector('#' + this.id);
|
|
32
|
+
};
|
|
33
|
+
timepickerHelper.prototype.getTimePickerInput = function () {
|
|
34
|
+
return this.selector('.e-control.e-timepicker.e-lib.e-input');
|
|
35
|
+
};
|
|
36
|
+
timepickerHelper.prototype.getTimePickerIcon = function () {
|
|
37
|
+
return this.selector('.e-time-wrapper .e-time-icon');
|
|
38
|
+
};
|
|
39
|
+
timepickerHelper.prototype.getTimePickerClearIcon = function () {
|
|
40
|
+
return this.selector('.e-time-wrapper .e-clear-icon');
|
|
41
|
+
};
|
|
42
|
+
timepickerHelper.prototype.getTimePicker = function () {
|
|
43
|
+
return this.selector('.e-input-group.e-control-wrapper');
|
|
44
|
+
};
|
|
45
|
+
timepickerHelper.prototype.getTimePickerContent = function () {
|
|
46
|
+
return this.selector('.e-timepicker .e-content');
|
|
47
|
+
};
|
|
48
|
+
timepickerHelper.prototype.getTimePickerListContent = function () {
|
|
49
|
+
return this.selector('.e-timepicker .e-content .e-list-parent');
|
|
50
|
+
};
|
|
51
|
+
timepickerHelper.prototype.getTimePickerListItem = function () {
|
|
52
|
+
return this.selector('.e-timepicker .e-content .e-list-parent .e-list-item');
|
|
53
|
+
};
|
|
54
|
+
timepickerHelper.prototype.getTimePickerDisabledTime = function () {
|
|
55
|
+
return this.selector('.e-timepicker .e-content .e-list-parent .e-list-item.e-disabled');
|
|
56
|
+
};
|
|
57
|
+
timepickerHelper.prototype.getTimePickerSelectedTime = function () {
|
|
58
|
+
return this.selector('.e-timepicker .e-content .e-list-parent .e-list-item.e-active');
|
|
59
|
+
};
|
|
60
|
+
return timepickerHelper;
|
|
61
|
+
}(e2e_1.TestHelper));
|
|
62
|
+
exports.timepickerHelper = timepickerHelper;
|
|
63
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-calendars",
|
|
3
|
-
"version": "33.2.
|
|
3
|
+
"version": "33.2.15",
|
|
4
4
|
"description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"es2015": "./dist/es6/ej2-calendars.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@syncfusion/ej2-base": "~33.2.3",
|
|
12
|
-
"@syncfusion/ej2-buttons": "~33.2.
|
|
13
|
-
"@syncfusion/ej2-inputs": "~33.2.
|
|
12
|
+
"@syncfusion/ej2-buttons": "~33.2.15",
|
|
13
|
+
"@syncfusion/ej2-inputs": "~33.2.15",
|
|
14
14
|
"@syncfusion/ej2-lists": "~33.2.3",
|
|
15
15
|
"@syncfusion/ej2-popups": "~33.2.7"
|
|
16
16
|
},
|
|
@@ -378,6 +378,7 @@ export declare class CalendarBase extends Component<HTMLElement> implements INot
|
|
|
378
378
|
protected todayButtonClick(e?: MouseEvent | KeyboardEvent, value?: Date, isCustomDate?: boolean): void;
|
|
379
379
|
protected resetCalendar(): void;
|
|
380
380
|
protected keyActionHandle(e: KeyboardEventArgs, value?: Date, multiSelection?: boolean): void;
|
|
381
|
+
protected getPopupFocusableElements(container: HTMLElement): HTMLElement[];
|
|
381
382
|
protected keyboardNavigate(number: number, currentView: number, e: KeyboardEvent, max: Date, min: Date): void;
|
|
382
383
|
/**
|
|
383
384
|
* Initialize the event handler
|
package/src/calendar/calendar.js
CHANGED
|
@@ -647,32 +647,29 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
647
647
|
break;
|
|
648
648
|
case 'tab':
|
|
649
649
|
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
650
|
-
var
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}
|
|
659
|
-
else {
|
|
660
|
-
this.element.focus();
|
|
650
|
+
var popupEl = this.popupWrapper;
|
|
651
|
+
if (!isNullOrUndefined(popupEl)) {
|
|
652
|
+
var focusable = this.getPopupFocusableElements(popupEl);
|
|
653
|
+
var lastIndex = focusable.length - 1;
|
|
654
|
+
if (focusable.length > 0 && e.target === focusable[lastIndex]) {
|
|
655
|
+
e.preventDefault();
|
|
656
|
+
focusable[0].focus();
|
|
657
|
+
// popup stays open — no hide() call
|
|
661
658
|
}
|
|
662
|
-
this.hide();
|
|
663
659
|
}
|
|
664
660
|
}
|
|
665
661
|
break;
|
|
666
662
|
case 'shiftTab':
|
|
667
|
-
if (
|
|
668
|
-
|
|
669
|
-
if (
|
|
670
|
-
this.
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
663
|
+
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
664
|
+
var popupEl = this.popupWrapper;
|
|
665
|
+
if (!isNullOrUndefined(popupEl)) {
|
|
666
|
+
var focusable = this.getPopupFocusableElements(popupEl);
|
|
667
|
+
if (focusable.length > 0 && e.target === focusable[0]) {
|
|
668
|
+
e.preventDefault();
|
|
669
|
+
focusable[focusable.length - 1].focus();
|
|
670
|
+
// popup stays open — no hide() call
|
|
671
|
+
}
|
|
674
672
|
}
|
|
675
|
-
this.hide();
|
|
676
673
|
}
|
|
677
674
|
break;
|
|
678
675
|
case 'escape':
|
|
@@ -682,6 +679,15 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
682
679
|
break;
|
|
683
680
|
}
|
|
684
681
|
};
|
|
682
|
+
CalendarBase.prototype.getPopupFocusableElements = function (container) {
|
|
683
|
+
var selector = [
|
|
684
|
+
'button:not([disabled]):not([tabindex="-1"])',
|
|
685
|
+
'td[tabindex="0"]:not([aria-disabled="true"])',
|
|
686
|
+
'[tabindex="0"]:not([disabled])'
|
|
687
|
+
].join(', ');
|
|
688
|
+
return Array.from(container.querySelectorAll(selector))
|
|
689
|
+
.filter(function (el) { return !isNullOrUndefined(el.offsetParent); });
|
|
690
|
+
};
|
|
685
691
|
CalendarBase.prototype.keyboardNavigate = function (number, currentView, e, max, min) {
|
|
686
692
|
var date = new Date(this.checkValue(this.currentDate));
|
|
687
693
|
switch (currentView) {
|