@syncfusion/ej2-calendars 31.2.12 → 31.2.16

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 31.2.12
3
+ * version : 31.2.16
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": "31.2.12",
3
+ "version": "31.2.16",
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": "~31.2.12",
12
- "@syncfusion/ej2-buttons": "~31.2.12",
13
- "@syncfusion/ej2-inputs": "~31.2.12",
12
+ "@syncfusion/ej2-buttons": "~31.2.16",
13
+ "@syncfusion/ej2-inputs": "~31.2.15",
14
14
  "@syncfusion/ej2-lists": "~31.2.12",
15
15
  "@syncfusion/ej2-popups": "~31.2.12"
16
16
  },
@@ -68,6 +68,8 @@ export declare class MaskedDateTime {
68
68
  private getCulturedFormat;
69
69
  private clearHandler;
70
70
  private updateValue;
71
+ private isMaskToken;
72
+ private normalizeTokenIndex;
71
73
  destroy(): void;
72
74
  }
73
75
  export interface events {
@@ -697,6 +697,9 @@ var MaskedDateTime = /** @class */ (function () {
697
697
  };
698
698
  MaskedDateTime.prototype.maskInputHandler = function () {
699
699
  var start = this.parent.inputElement.selectionStart;
700
+ if (Browser.isDevice && (Browser.isIos || Browser.isIos7)) {
701
+ start = this.normalizeTokenIndex(start);
702
+ }
700
703
  var formatText = '';
701
704
  if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
702
705
  formatText = this.hiddenMask[start];
@@ -716,10 +719,18 @@ var MaskedDateTime = /** @class */ (function () {
716
719
  break;
717
720
  }
718
721
  }
719
- var scrollPositionY;
722
+ var scrollContext = null;
723
+ var savedScrollTop = 0;
720
724
  if (Browser.isDevice && (Browser.isIos || Browser.isIos7)) {
721
725
  var scrollableParent = this.findScrollableParent(this.parent.inputElement);
722
- scrollPositionY = scrollableParent ? scrollableParent.getBoundingClientRect().top : window.scrollY;
726
+ if (scrollableParent) {
727
+ scrollContext = scrollableParent;
728
+ savedScrollTop = scrollableParent.scrollTop;
729
+ }
730
+ else {
731
+ scrollContext = window;
732
+ savedScrollTop = window.pageYOffset || document.documentElement.scrollTop || 0;
733
+ }
723
734
  }
724
735
  this.parent.inputElement.selectionStart = start;
725
736
  this.validCharacterCheck();
@@ -729,7 +740,12 @@ var MaskedDateTime = /** @class */ (function () {
729
740
  this.navigateSelection(isbackward);
730
741
  if (Browser.isDevice && (Browser.isIos || Browser.isIos7)) {
731
742
  setTimeout(function () {
732
- window.scrollTo(0, scrollPositionY);
743
+ if (scrollContext) {
744
+ scrollContext.scrollTop = savedScrollTop;
745
+ }
746
+ else {
747
+ window.scrollTo(0, savedScrollTop);
748
+ }
733
749
  }, 0);
734
750
  }
735
751
  }
@@ -926,6 +942,35 @@ var MaskedDateTime = /** @class */ (function () {
926
942
  this.dayTypeCount = 0;
927
943
  this.monthTypeCount = 0;
928
944
  };
945
+ MaskedDateTime.prototype.isMaskToken = function (i) {
946
+ return i >= 0 && i < this.hiddenMask.length &&
947
+ this.validCharacters.indexOf(this.hiddenMask[i]) !== -1;
948
+ };
949
+ MaskedDateTime.prototype.normalizeTokenIndex = function (index, preferPrev) {
950
+ if (preferPrev === void 0) { preferPrev = false; }
951
+ if (this.isMaskToken(index)) {
952
+ return index;
953
+ }
954
+ var prev = index - 1;
955
+ var next = index + 1;
956
+ if (preferPrev) {
957
+ if (this.isMaskToken(prev)) {
958
+ return prev;
959
+ }
960
+ if (this.isMaskToken(next)) {
961
+ return next;
962
+ }
963
+ }
964
+ else {
965
+ if (this.isMaskToken(next)) {
966
+ return next;
967
+ }
968
+ if (this.isMaskToken(prev)) {
969
+ return prev;
970
+ }
971
+ }
972
+ return index;
973
+ };
929
974
  MaskedDateTime.prototype.destroy = function () {
930
975
  this.removeEventListener();
931
976
  };
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
+ }