@syncfusion/ej2-calendars 33.1.44 → 33.2.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.
- package/.eslintrc.json +263 -0
- package/aceconfig.js +17 -0
- 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 +13 -12
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +13 -12
- 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/package.json +6 -6
- package/src/daterangepicker/daterangepicker.d.ts +1 -0
- package/src/daterangepicker/daterangepicker.js +13 -12
- package/tslint.json +111 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 33.
|
|
3
|
+
* version : 33.2.4
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-calendars",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.2.4",
|
|
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",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-calendars.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~33.
|
|
12
|
-
"@syncfusion/ej2-buttons": "~33.
|
|
13
|
-
"@syncfusion/ej2-inputs": "~33.
|
|
14
|
-
"@syncfusion/ej2-lists": "~33.
|
|
15
|
-
"@syncfusion/ej2-popups": "~33.
|
|
11
|
+
"@syncfusion/ej2-base": "~33.2.3",
|
|
12
|
+
"@syncfusion/ej2-buttons": "~33.2.3",
|
|
13
|
+
"@syncfusion/ej2-inputs": "~33.2.4",
|
|
14
|
+
"@syncfusion/ej2-lists": "~33.2.3",
|
|
15
|
+
"@syncfusion/ej2-popups": "~33.2.3"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {},
|
|
18
18
|
"keywords": [
|
|
@@ -631,6 +631,7 @@ export declare class DateRangePicker extends CalendarBase {
|
|
|
631
631
|
private updateHtmlAttributeToWrapper;
|
|
632
632
|
private updateHtmlAttributeToElement;
|
|
633
633
|
private updateCssClass;
|
|
634
|
+
private isValidPreset;
|
|
634
635
|
private processPresets;
|
|
635
636
|
protected bindEvents(): void;
|
|
636
637
|
private unBindEvents;
|
|
@@ -505,10 +505,13 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
505
505
|
Input.setCssClass(cssNewClass, [this.popupWrapper], cssOldClass);
|
|
506
506
|
}
|
|
507
507
|
};
|
|
508
|
+
DateRangePicker.prototype.isValidPreset = function () {
|
|
509
|
+
return !isNullOrUndefined(this.presets[0]) && !isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label);
|
|
510
|
+
};
|
|
508
511
|
DateRangePicker.prototype.processPresets = function () {
|
|
509
512
|
this.presetsItem = [];
|
|
510
513
|
var i = 0;
|
|
511
|
-
if (
|
|
514
|
+
if (this.isValidPreset()) {
|
|
512
515
|
for (var _i = 0, _a = this.presets; _i < _a.length; _i++) {
|
|
513
516
|
var range = _a[_i];
|
|
514
517
|
var id = range.label.replace(/\s+/g, '') + '_' + (++i);
|
|
@@ -828,7 +831,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
828
831
|
this.popupWrapper.setAttribute('role', 'dialog');
|
|
829
832
|
this.adjustLongHeaderWidth();
|
|
830
833
|
var isPreset = (!this.isCustomRange || this.isMobile);
|
|
831
|
-
if (
|
|
834
|
+
if (this.isValidPreset()
|
|
835
|
+
&& isPreset) {
|
|
832
836
|
this.isCustomWindow = false;
|
|
833
837
|
this.createPresets();
|
|
834
838
|
this.listRippleEffect();
|
|
@@ -2824,7 +2828,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
2824
2828
|
EventHandler.add(cancelBtn, 'click', this.cancelFunction, this);
|
|
2825
2829
|
this.popupWrapper.appendChild(controlContainer);
|
|
2826
2830
|
if (!this.isMobile) {
|
|
2827
|
-
if (
|
|
2831
|
+
if (this.isValidPreset()) {
|
|
2828
2832
|
this.createPresets();
|
|
2829
2833
|
this.listRippleEffect();
|
|
2830
2834
|
addClass([controlContainer], RANGEBORDER);
|
|
@@ -3066,7 +3070,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3066
3070
|
}
|
|
3067
3071
|
};
|
|
3068
3072
|
DateRangePicker.prototype.createPresets = function () {
|
|
3069
|
-
if (
|
|
3073
|
+
if (this.isValidPreset()) {
|
|
3070
3074
|
this.presetElement = this.createElement('div', { className: PRESETS, attrs: { 'tabindex': '0' } });
|
|
3071
3075
|
var listTag = ListBase.createList(this.createElement, this.presetsItem, null, true);
|
|
3072
3076
|
attributes(listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options', 'tabindex': '0', 'aria-label': 'daterangepicker-preset' });
|
|
@@ -3136,14 +3140,12 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3136
3140
|
relateTo: this.isMobile && this.isCustomWindow ? document.body :
|
|
3137
3141
|
(!isNullOrUndefined(this.targetElement) ? this.targetElement : this.inputWrapper.container),
|
|
3138
3142
|
position: (this.isMobile ?
|
|
3139
|
-
(
|
|
3140
|
-
{ X: 'left', Y: 'bottom' } : { X: 'center', Y: 'center' }) :
|
|
3143
|
+
(this.isValidPreset() && !this.isCustomWindow ? { X: 'left', Y: 'bottom' } : { X: 'center', Y: 'center' }) :
|
|
3141
3144
|
this.enableRtl ? { X: 'left', Y: 'bottom' } : { X: 'right', Y: 'bottom' }),
|
|
3142
3145
|
offsetX: this.isMobile || this.enableRtl ? 0 : -popupWidth,
|
|
3143
3146
|
offsetY: OFFSETVALUE,
|
|
3144
3147
|
collision: this.isMobile ?
|
|
3145
|
-
(
|
|
3146
|
-
{ X: 'fit' } : { X: 'fit', Y: 'fit' }) : { X: 'fit', Y: 'flip' },
|
|
3148
|
+
(this.isValidPreset() && !this.isCustomWindow ? { X: 'fit' } : { X: 'fit', Y: 'fit' }) : { X: 'fit', Y: 'flip' },
|
|
3147
3149
|
targetType: this.isMobile && this.isCustomWindow ? 'container' : 'relative',
|
|
3148
3150
|
enableRtl: this.enableRtl,
|
|
3149
3151
|
zIndex: this.zIndex,
|
|
@@ -3218,7 +3220,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3218
3220
|
if (_this.isRangeIconClicked) {
|
|
3219
3221
|
_this.inputWrapper.container.children[1].focus();
|
|
3220
3222
|
}
|
|
3221
|
-
if (
|
|
3223
|
+
if (_this.isValidPreset()) {
|
|
3222
3224
|
_this.unWireListEvents();
|
|
3223
3225
|
}
|
|
3224
3226
|
if (_this.applyButton) {
|
|
@@ -4226,7 +4228,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4226
4228
|
_this.openEventArgs.appendTo.appendChild(_this.popupWrapper);
|
|
4227
4229
|
_this.showPopup(element, event);
|
|
4228
4230
|
var isPreset = (!_this.isCustomRange || (_this.isMobile && _this.isCustomRange));
|
|
4229
|
-
if (
|
|
4231
|
+
if (_this.isValidPreset() && isPreset) {
|
|
4230
4232
|
_this.setScrollPosition();
|
|
4231
4233
|
}
|
|
4232
4234
|
_this.checkMinMaxDays();
|
|
@@ -4239,8 +4241,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4239
4241
|
_super.prototype.setOverlayIndex.call(_this, _this.mobileRangePopupWrap, _this.popupObj.element, _this.modal, _this.isMobile || Browser.isDevice);
|
|
4240
4242
|
if (!isNullOrUndefined(_this.mobileRangePopupWrap) && !isNullOrUndefined(_this.popupObj)
|
|
4241
4243
|
&& !isNullOrUndefined(_this.popupObj.element) && isNullOrUndefined(_this.modal) &&
|
|
4242
|
-
|
|
4243
|
-
&& (_this.isMobile || Browser.isDevice) && !_this.isCustomWindow) {
|
|
4244
|
+
_this.isValidPreset() && isPreset && (_this.isMobile || Browser.isDevice) && !_this.isCustomWindow) {
|
|
4244
4245
|
var index = parseInt(_this.popupObj.element.style.zIndex, 10) ?
|
|
4245
4246
|
parseInt(_this.popupObj.element.style.zIndex, 10) : 1000;
|
|
4246
4247
|
_this.mobileRangePopupWrap.style.zIndex = index.toString();
|
package/tslint.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": {
|
|
3
|
+
"chai-vague-errors": true,
|
|
4
|
+
"use-isnan": true,
|
|
5
|
+
"missing-jsdoc": true,
|
|
6
|
+
"missing-optional-annotation": true,
|
|
7
|
+
"no-backbone-get-set-outside-model": true,
|
|
8
|
+
"no-banned-terms": true,
|
|
9
|
+
"no-constant-condition": true,
|
|
10
|
+
"no-control-regex": true,
|
|
11
|
+
"no-cookies": true,
|
|
12
|
+
"no-delete-expression": true,
|
|
13
|
+
"no-document-write": true,
|
|
14
|
+
"no-document-domain": true,
|
|
15
|
+
"no-disable-auto-sanitization": true,
|
|
16
|
+
"no-duplicate-case": true,
|
|
17
|
+
"no-duplicate-parameter-names": true,
|
|
18
|
+
"no-empty-interfaces": true,
|
|
19
|
+
"no-exec-script": true,
|
|
20
|
+
"no-function-constructor-with-string-args": true,
|
|
21
|
+
"no-function-expression": true,
|
|
22
|
+
"no-invalid-regexp": true,
|
|
23
|
+
"no-for-in": true,
|
|
24
|
+
"member-access": true,
|
|
25
|
+
"no-multiline-string": true,
|
|
26
|
+
"no-multiple-var-decl": true,
|
|
27
|
+
"no-unnecessary-bind": true,
|
|
28
|
+
"no-unnecessary-semicolons": true,
|
|
29
|
+
"no-octal-literal": true,
|
|
30
|
+
"no-regex-spaces": true,
|
|
31
|
+
"no-sparse-arrays": true,
|
|
32
|
+
"no-string-based-set-immediate": true,
|
|
33
|
+
"no-string-based-set-interval": true,
|
|
34
|
+
"no-unused-imports": true,
|
|
35
|
+
"no-with-statement": true,
|
|
36
|
+
"prefer-array-literal": true,
|
|
37
|
+
"promise-must-complete": false,
|
|
38
|
+
"react-no-dangerous-html": true,
|
|
39
|
+
"use-named-parameter": true,
|
|
40
|
+
"valid-typeof": true,
|
|
41
|
+
"max-func-body-length": [true, 100, {
|
|
42
|
+
"ignore-parameters-to-function-regex": "describe"
|
|
43
|
+
}],
|
|
44
|
+
"class-name": true,
|
|
45
|
+
"curly": true,
|
|
46
|
+
"eofline": false,
|
|
47
|
+
"forin": true,
|
|
48
|
+
"indent": [
|
|
49
|
+
true,
|
|
50
|
+
"spaces"
|
|
51
|
+
],
|
|
52
|
+
"label-position": true,
|
|
53
|
+
"max-line-length": [true, 140],
|
|
54
|
+
"no-arg": true,
|
|
55
|
+
"no-console": [true,
|
|
56
|
+
"debug",
|
|
57
|
+
"info",
|
|
58
|
+
"log",
|
|
59
|
+
"time",
|
|
60
|
+
"timeEnd",
|
|
61
|
+
"trace"
|
|
62
|
+
],
|
|
63
|
+
"no-construct": true,
|
|
64
|
+
"no-parameter-properties": true,
|
|
65
|
+
"no-debugger": true,
|
|
66
|
+
"no-duplicate-variable": true,
|
|
67
|
+
"no-empty": true,
|
|
68
|
+
"no-eval": true,
|
|
69
|
+
"no-string-literal": true,
|
|
70
|
+
"no-switch-case-fall-through": true,
|
|
71
|
+
"trailing-comma": true,
|
|
72
|
+
"no-trailing-whitespace": true,
|
|
73
|
+
"no-unused-expression": true,
|
|
74
|
+
"no-use-before-declare": false,
|
|
75
|
+
"no-var-requires": true,
|
|
76
|
+
"one-line": [true,
|
|
77
|
+
"check-open-brace",
|
|
78
|
+
"check-catch",
|
|
79
|
+
"check-else",
|
|
80
|
+
"check-whitespace"
|
|
81
|
+
],
|
|
82
|
+
"no-any": true,
|
|
83
|
+
"no-conditional-assignment": true,
|
|
84
|
+
"no-angle-bracket-type-assertion": false,
|
|
85
|
+
"align": [true, "parameters", "arguments", "statements"],
|
|
86
|
+
"no-empty-line-after-opening-brace": false,
|
|
87
|
+
"typedef-whitespace": [false],
|
|
88
|
+
"ban": true,
|
|
89
|
+
"quotemark": [true, "single"],
|
|
90
|
+
"semicolon": true,
|
|
91
|
+
"triple-equals": [true, "allow-null-check"],
|
|
92
|
+
"typedef": [true,
|
|
93
|
+
"call-signature",
|
|
94
|
+
"parameter",
|
|
95
|
+
"property-declaration",
|
|
96
|
+
"variable-declaration",
|
|
97
|
+
"arrow-parameter",
|
|
98
|
+
"member-variable-declaration"],
|
|
99
|
+
"variable-name": true,
|
|
100
|
+
"whitespace": [true,
|
|
101
|
+
"check-branch",
|
|
102
|
+
"check-decl",
|
|
103
|
+
"check-operator",
|
|
104
|
+
"check-separator",
|
|
105
|
+
"check-type"
|
|
106
|
+
],
|
|
107
|
+
"jsdoc-format": true,
|
|
108
|
+
"no-var-keyword": true,
|
|
109
|
+
"radix": true
|
|
110
|
+
}
|
|
111
|
+
}
|