@syncfusion/ej2-base 20.1.57 → 20.1.58-106983

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 (99) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +101 -5
  3. package/ReadMe.md +5 -6
  4. package/bin/syncfusion-license.js +2 -0
  5. package/dist/ej2-base.min.js +1 -0
  6. package/dist/ej2-base.umd.min.js +1 -1
  7. package/dist/ej2-base.umd.min.js.map +1 -1
  8. package/dist/es6/ej2-base.es2015.js +670 -314
  9. package/dist/es6/ej2-base.es2015.js.map +1 -1
  10. package/dist/es6/ej2-base.es5.js +447 -232
  11. package/dist/es6/ej2-base.es5.js.map +1 -1
  12. package/dist/global/ej2-base.min.js +1 -1
  13. package/dist/global/ej2-base.min.js.map +1 -1
  14. package/e2e/modified-protractor/protractor.config.js +316 -0
  15. package/e2e/protractor.config.js +56 -24
  16. package/helpers/e2e/base.js +62 -52
  17. package/helpers/e2e/index.js +8 -6
  18. package/package.json +15 -95
  19. package/src/animation.d.ts +13 -0
  20. package/src/animation.js +31 -4
  21. package/src/base.js +12 -12
  22. package/src/browser.js +9 -9
  23. package/src/child-property.js +10 -10
  24. package/src/component-model.d.ts +1 -1
  25. package/src/component.d.ts +1 -1
  26. package/src/component.js +29 -10
  27. package/src/dom.js +10 -10
  28. package/src/draggable-model.d.ts +21 -8
  29. package/src/draggable.d.ts +31 -6
  30. package/src/draggable.js +118 -21
  31. package/src/event-handler.js +6 -6
  32. package/src/hijri-parser.js +1 -1
  33. package/src/intl/date-parser.js +4 -4
  34. package/src/intl/intl-base.js +4 -4
  35. package/src/intl/number-formatter.js +3 -3
  36. package/src/intl/parser-base.js +2 -2
  37. package/src/keyboard.js +4 -4
  38. package/src/l10n.js +5 -5
  39. package/src/module-loader.js +2 -2
  40. package/src/notify-property-change.js +28 -28
  41. package/src/observer.js +9 -9
  42. package/src/sanitize-helper.js +2 -2
  43. package/src/template-engine.js +14 -14
  44. package/src/template.js +3 -2
  45. package/src/touch.js +4 -0
  46. package/src/util.js +30 -28
  47. package/src/validate-lic.d.ts +4 -0
  48. package/src/validate-lic.js +107 -42
  49. package/styles/_all.scss +1 -2
  50. package/styles/_bootstrap4-definition.scss +0 -1
  51. package/styles/_fusionnew-dark-definition.scss +9 -0
  52. package/styles/_fusionnew-definition.scss +9 -0
  53. package/styles/_highcontrast-light-definition.scss +0 -1
  54. package/styles/_material-dark-definition.scss +1 -1
  55. package/styles/_material-definition.scss +1 -1
  56. package/styles/_material3-dark-definition.scss +10 -0
  57. package/styles/_material3-definition.scss +9 -0
  58. package/styles/_tailwind-dark-definition.scss +1 -1
  59. package/styles/_tailwind-definition.scss +1 -1
  60. package/styles/animation/_all.scss +31 -30
  61. package/styles/bootstrap-dark.css +157 -1
  62. package/styles/bootstrap.css +157 -1
  63. package/styles/bootstrap4.css +157 -1
  64. package/styles/bootstrap5-dark.css +157 -1
  65. package/styles/bootstrap5.css +157 -1
  66. package/styles/common/_core.scss +16 -4
  67. package/styles/definition/_bootstrap-dark.scss +114 -0
  68. package/styles/definition/_bootstrap.scss +115 -1
  69. package/styles/definition/_bootstrap4.scss +114 -0
  70. package/styles/definition/_bootstrap5-dark.scss +132 -24
  71. package/styles/definition/_bootstrap5.scss +124 -14
  72. package/styles/definition/_fabric-dark.scss +114 -0
  73. package/styles/definition/_fabric.scss +114 -0
  74. package/styles/definition/_fluent-dark.scss +144 -22
  75. package/styles/definition/_fluent.scss +135 -14
  76. package/styles/definition/_fusionnew-dark.scss +360 -0
  77. package/styles/definition/_fusionnew.scss +361 -0
  78. package/styles/definition/_highcontrast-light.scss +112 -0
  79. package/styles/definition/_highcontrast.scss +114 -0
  80. package/styles/definition/_material-dark.scss +114 -0
  81. package/styles/definition/_material.scss +117 -0
  82. package/styles/definition/_material3-dark.scss +421 -0
  83. package/styles/definition/_material3.scss +361 -0
  84. package/styles/definition/_tailwind-dark.scss +128 -17
  85. package/styles/definition/_tailwind.scss +130 -19
  86. package/styles/fabric-dark.css +161 -2
  87. package/styles/fabric.css +161 -2
  88. package/styles/fluent-dark.css +157 -1
  89. package/styles/fluent.css +157 -1
  90. package/styles/highcontrast-light.css +164 -2
  91. package/styles/highcontrast.css +164 -2
  92. package/styles/material-dark.css +157 -1
  93. package/styles/material.css +157 -1
  94. package/styles/offline-theme/material-dark.css +2625 -0
  95. package/styles/offline-theme/material.css +2625 -0
  96. package/styles/offline-theme/tailwind-dark.css +1899 -0
  97. package/styles/offline-theme/tailwind.css +1899 -0
  98. package/styles/tailwind-dark.css +157 -1
  99. package/styles/tailwind.css +157 -1
@@ -25,6 +25,7 @@ interface PageInfo {
25
25
  }
26
26
  /**
27
27
  * Coordinates for element position
28
+ *
28
29
  * @private
29
30
  */
30
31
  export interface Coordinates {
@@ -68,6 +69,7 @@ export interface DropObject {
68
69
  }
69
70
  /**
70
71
  * Used to access values
72
+ *
71
73
  * @private
72
74
  */
73
75
  export interface DragPosition {
@@ -76,6 +78,7 @@ export interface DragPosition {
76
78
  }
77
79
  /**
78
80
  * Used for accessing the interface.
81
+ *
79
82
  * @private
80
83
  */
81
84
  export interface Instance extends HTMLElement {
@@ -88,6 +91,7 @@ export interface Instance extends HTMLElement {
88
91
  }
89
92
  /**
90
93
  * Droppable function to be invoked from draggable
94
+ *
91
95
  * @private
92
96
  */
93
97
  export interface DropOption {
@@ -128,9 +132,14 @@ export interface DragEventArgs {
128
132
  * Specifies the current target element.
129
133
  */
130
134
  target?: HTMLElement;
135
+ /**
136
+ * 'true' if the drag or drop action is to be prevented; otherwise false.
137
+ */
138
+ cancel?: boolean;
131
139
  }
132
140
  /**
133
141
  * Used for accessing the BlazorEventArgs.
142
+ *
134
143
  * @private
135
144
  */
136
145
  export interface BlazorDragEventArgs {
@@ -166,6 +175,7 @@ export declare class Draggable extends Base<HTMLElement> implements INotifyPrope
166
175
  cursorAt: PositionModel;
167
176
  /**
168
177
  * If `clone` set to true, drag operations are performed in duplicate element of the draggable element.
178
+ *
169
179
  * @default true
170
180
  */
171
181
  clone: boolean;
@@ -179,32 +189,37 @@ export declare class Draggable extends Base<HTMLElement> implements INotifyPrope
179
189
  isDragScroll: boolean;
180
190
  /**
181
191
  * Defines wheather need to replace drag element by currentstateTarget.
192
+ *
182
193
  * @private
183
194
  */
184
195
  isReplaceDragEle: boolean;
185
196
  /**
186
197
  * Defines wheather need to add prevent select class to body or not.
198
+ *
187
199
  * @private
188
200
  */
189
201
  isPreventSelect: boolean;
190
202
  /**
191
203
  * Specifies the callback function for drag event.
192
-
193
- * @event
204
+ *
205
+ * @event drag
194
206
  */
195
207
  drag: Function;
196
208
  /**
197
209
  * Specifies the callback function for dragStart event.
198
- * @event
210
+ *
211
+ * @event dragStart
199
212
  */
200
213
  dragStart: Function;
201
214
  /**
202
215
  * Specifies the callback function for dragStop event.
203
- * @event
216
+ *
217
+ * @event dragStop
204
218
  */
205
219
  dragStop: Function;
206
220
  /**
207
221
  * Defines the minimum distance draggable element to be moved to trigger the drag operation.
222
+ *
208
223
  * @default 1
209
224
  */
210
225
  distance: number;
@@ -227,6 +242,7 @@ export declare class Draggable extends Base<HTMLElement> implements INotifyPrope
227
242
  scope: string;
228
243
  /**
229
244
  * Specifies the dragTarget by which the clone element is positioned if not given current context element will be considered.
245
+ *
230
246
  * @private
231
247
  */
232
248
  dragTarget: string;
@@ -238,16 +254,19 @@ export declare class Draggable extends Base<HTMLElement> implements INotifyPrope
238
254
  axis: DragDirection;
239
255
  /**
240
256
  * Defines the function to change the position value.
257
+ *
241
258
  * @private
242
259
  */
243
260
  queryPositionInfo: Function;
244
261
  /**
245
262
  * Defines whether the drag clone element will be split form the cursor pointer.
263
+ *
246
264
  * @private
247
265
  */
248
266
  enableTailMode: boolean;
249
267
  /**
250
268
  * Defines whether to skip the previous drag movement comparison.
269
+ *
251
270
  * @private
252
271
  */
253
272
  skipDistanceCheck: boolean;
@@ -258,24 +277,27 @@ export declare class Draggable extends Base<HTMLElement> implements INotifyPrope
258
277
  /**
259
278
  * Defines whether to enable autoscroll on drag movement of draggable element.
260
279
  * enableAutoScroll
280
+ *
261
281
  * @private
262
282
  */
263
283
  enableAutoScroll: boolean;
264
284
  /**
265
285
  * Defines whether to enable taphold on mobile devices.
266
286
  * enableAutoScroll
287
+ *
267
288
  * @private
268
289
  */
269
290
  enableTapHold: boolean;
270
291
  /**
271
292
  * Specifies the time delay for tap hold.
293
+ *
272
294
  * @default 750
273
295
  * @private
274
296
  */
275
297
  tapHoldThreshold: number;
276
298
  /**
277
- * @private
278
- */
299
+ * @private
300
+ */
279
301
  enableScrollHandler: boolean;
280
302
  private target;
281
303
  /**
@@ -331,6 +353,9 @@ export declare class Draggable extends Base<HTMLElement> implements INotifyPrope
331
353
  private getProcessedPositionValue;
332
354
  private calculateParentPosition;
333
355
  private intDrag;
356
+ private getScrollParent;
357
+ private getScrollPosition;
358
+ private getPathElements;
334
359
  private triggerOutFunction;
335
360
  private getDragPosition;
336
361
  private getDocumentWidthHeight;
package/src/draggable.js CHANGED
@@ -74,8 +74,8 @@ var Draggable = /** @class */ (function (_super) {
74
74
  _this.prevLeft = 0;
75
75
  _this.prevTop = 0;
76
76
  _this.dragProcessStarted = false;
77
- /* tslint:disable no-any */
78
77
  _this.eleTop = 0;
78
+ /* eslint-disable @typescript-eslint/no-explicit-any */
79
79
  _this.tapHoldTimer = 0;
80
80
  _this.externalInitialize = false;
81
81
  _this.diffY = 0;
@@ -134,7 +134,7 @@ var Draggable = /** @class */ (function (_super) {
134
134
  if (isNullOrUndefined(element)) {
135
135
  return null;
136
136
  }
137
- if (element[scroll[axis]] > element[client[axis]]) {
137
+ if (element[scroll["" + axis]] > element[client["" + axis]]) {
138
138
  if (axis === 'vertical' ? element.scrollTop > 0 : element.scrollLeft > 0) {
139
139
  if (axis === 'vertical') {
140
140
  this.parentScrollY = this.parentScrollY +
@@ -186,7 +186,7 @@ var Draggable = /** @class */ (function (_super) {
186
186
  abortSelectors = [abortSelectors];
187
187
  }
188
188
  for (var i = 0; i < abortSelectors.length; i++) {
189
- if (!isNullOrUndefined(closest(evt.target, abortSelectors[i]))) {
189
+ if (!isNullOrUndefined(closest(evt.target, abortSelectors[parseInt(i.toString(), 10)]))) {
190
190
  /* istanbul ignore next */
191
191
  if (this.isDragStarted()) {
192
192
  this.isDragStarted(true);
@@ -233,9 +233,6 @@ var Draggable = /** @class */ (function (_super) {
233
233
  if (isChangeTouch && (evt.changedTouches.length !== 1)) {
234
234
  return;
235
235
  }
236
- if (isChangeTouch) {
237
- evt.preventDefault();
238
- }
239
236
  var intCordinate = this.getCoordinates(evt);
240
237
  var pos;
241
238
  var styleProp = getComputedStyle(this.element);
@@ -243,7 +240,7 @@ var Draggable = /** @class */ (function (_super) {
243
240
  left: parseInt(styleProp.marginLeft, 10),
244
241
  top: parseInt(styleProp.marginTop, 10),
245
242
  right: parseInt(styleProp.marginRight, 10),
246
- bottom: parseInt(styleProp.marginBottom, 10),
243
+ bottom: parseInt(styleProp.marginBottom, 10)
247
244
  };
248
245
  var element = this.element;
249
246
  if (this.clone && this.dragTarget) {
@@ -266,6 +263,9 @@ var Draggable = /** @class */ (function (_super) {
266
263
  if (!ele || isNullOrUndefined(ele)) {
267
264
  return;
268
265
  }
266
+ if (isChangeTouch) {
267
+ evt.preventDefault();
268
+ }
269
269
  var dragTargetElement = this.helperElement = ele;
270
270
  this.parentClientRect = this.calculateParentPosition(dragTargetElement.offsetParent);
271
271
  if (this.dragStart) {
@@ -312,6 +312,9 @@ var Draggable = /** @class */ (function (_super) {
312
312
  top: (pos.top - this.diffY) + 'px',
313
313
  left: (pos.left - this.diffX) + 'px'
314
314
  });
315
+ if (this.dragArea && typeof this.dragArea !== 'string' && this.dragArea.classList.contains('e-kanban-content') && this.dragArea.style.position === 'relative') {
316
+ pos.top += this.dragArea.scrollTop;
317
+ }
315
318
  this.dragElePosition = { top: pos.top, left: pos.left };
316
319
  setStyleAttribute(dragTargetElement, this.getDragPosition({ position: 'absolute', left: posValue.left, top: posValue.top }));
317
320
  EventHandler.remove(document, Browser.touchMoveEvent, this.intDragStart);
@@ -462,14 +465,27 @@ var Draggable = /** @class */ (function (_super) {
462
465
  }
463
466
  var draEleTop;
464
467
  var draEleLeft;
465
- if (this.dragArea) {
466
- this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
467
- draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
468
- draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
468
+ if (this.helperElement.classList.contains('e-treeview')) {
469
+ if (this.dragArea) {
470
+ this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
471
+ draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - this.borderWidth.top);
472
+ draEleLeft = (left - iLeft) < 0 ? this.dragLimit.left : (left - this.borderWidth.left);
473
+ }
474
+ else {
475
+ draEleTop = top - this.borderWidth.top;
476
+ draEleLeft = left - this.borderWidth.left;
477
+ }
469
478
  }
470
479
  else {
471
- draEleTop = top - iTop;
472
- draEleLeft = left - iLeft;
480
+ if (this.dragArea) {
481
+ this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
482
+ draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
483
+ draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
484
+ }
485
+ else {
486
+ draEleTop = top - iTop;
487
+ draEleLeft = left - iLeft;
488
+ }
473
489
  }
474
490
  var marginTop = parseFloat(getComputedStyle(this.element).marginTop);
475
491
  // when drag-element has margin-top
@@ -502,6 +518,11 @@ var Draggable = /** @class */ (function (_super) {
502
518
  }
503
519
  }
504
520
  }
521
+ if (this.dragArea && this.helperElement.classList.contains('e-treeview')) {
522
+ var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop)
523
+ + parseFloat(styles.marginBottom));
524
+ draEleTop = (draEleTop + helperHeight) > this.dragLimit.bottom ? (this.dragLimit.bottom - helperHeight) : draEleTop;
525
+ }
505
526
  /* istanbul ignore next */
506
527
  // if(this.eleTop > 0) {
507
528
  // draEleTop += this.eleTop;
@@ -510,11 +531,33 @@ var Draggable = /** @class */ (function (_super) {
510
531
  draEleTop -= this.parentScrollY;
511
532
  draEleLeft -= this.parentScrollX;
512
533
  }
534
+ if (this.dragArea && typeof this.dragArea !== 'string' && this.dragArea.classList.contains('e-kanban-content') && this.dragArea.style.position === 'relative') {
535
+ draEleTop += this.dragArea.scrollTop;
536
+ }
513
537
  var dragValue = this.getProcessedPositionValue({ top: draEleTop + 'px', left: draEleLeft + 'px' });
514
538
  setStyleAttribute(helperElement, this.getDragPosition(dragValue));
515
- if (!this.elementInViewport(helperElement) && this.enableAutoScroll) {
539
+ if (!this.elementInViewport(helperElement) && this.enableAutoScroll && !this.helperElement.classList.contains('e-treeview')) {
516
540
  this.helperElement.scrollIntoView();
517
541
  }
542
+ var elements = document.querySelectorAll(':hover');
543
+ if (this.enableAutoScroll && this.helperElement.classList.contains('e-treeview')) {
544
+ if (elements.length === 0) {
545
+ elements = this.getPathElements(evt);
546
+ }
547
+ /* tslint:disable no-any */
548
+ var scrollParent = this.getScrollParent(elements, false);
549
+ if (this.elementInViewport(this.helperElement)) {
550
+ this.getScrollPosition(scrollParent, draEleTop);
551
+ }
552
+ else if (!this.elementInViewport(this.helperElement)) {
553
+ elements = [].slice.call(document.querySelectorAll(':hover'));
554
+ if (elements.length === 0) {
555
+ elements = this.getPathElements(evt);
556
+ }
557
+ scrollParent = this.getScrollParent(elements, true);
558
+ this.getScrollPosition(scrollParent, draEleTop);
559
+ }
560
+ }
518
561
  this.dragProcessStarted = true;
519
562
  this.prevLeft = left;
520
563
  this.prevTop = top;
@@ -523,6 +566,48 @@ var Draggable = /** @class */ (function (_super) {
523
566
  this.pageX = pagex;
524
567
  this.pageY = pagey;
525
568
  };
569
+ /* tslint:disable no-any */
570
+ Draggable.prototype.getScrollParent = function (node, reverse) {
571
+ /* tslint:disable no-any */
572
+ var nodeEl = reverse ? node.reverse() : node;
573
+ var hasScroll;
574
+ for (var i = nodeEl.length - 1; i >= 0; i--) {
575
+ hasScroll = window.getComputedStyle(nodeEl[parseInt(i.toString(), 10)])['overflow-y'];
576
+ if ((hasScroll === 'auto' || hasScroll === 'scroll')
577
+ && nodeEl[parseInt(i.toString(), 10)].scrollHeight > nodeEl[parseInt(i.toString(), 10)].clientHeight) {
578
+ return nodeEl[parseInt(i.toString(), 10)];
579
+ }
580
+ }
581
+ hasScroll = window.getComputedStyle(document.scrollingElement)['overflow-y'];
582
+ if (hasScroll === 'visible') {
583
+ document.scrollingElement.style.overflow = 'auto';
584
+ return document.scrollingElement;
585
+ }
586
+ };
587
+ Draggable.prototype.getScrollPosition = function (nodeEle, draEleTop) {
588
+ if (nodeEle && nodeEle === document.scrollingElement) {
589
+ if ((nodeEle.clientHeight + document.scrollingElement.scrollTop - this.helperElement.clientHeight) < draEleTop
590
+ && nodeEle.getBoundingClientRect().height + this.parentClientRect.top > draEleTop) {
591
+ nodeEle.scrollTop += this.helperElement.clientHeight;
592
+ }
593
+ else if (nodeEle.scrollTop > draEleTop - this.helperElement.clientHeight) {
594
+ nodeEle.scrollTop -= this.helperElement.clientHeight;
595
+ }
596
+ }
597
+ else if (nodeEle && nodeEle !== document.scrollingElement) {
598
+ if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight + document.scrollingElement.scrollTop) < draEleTop) {
599
+ nodeEle.scrollTop += this.helperElement.clientHeight;
600
+ }
601
+ else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight - document.scrollingElement.scrollTop)) {
602
+ nodeEle.scrollTop -= this.helperElement.clientHeight;
603
+ }
604
+ }
605
+ };
606
+ Draggable.prototype.getPathElements = function (evt) {
607
+ var elementTop = evt.clientX > 0 ? evt.clientX : 0;
608
+ var elementLeft = evt.clientY > 0 ? evt.clientY : 0;
609
+ return document.elementsFromPoint(elementTop, elementLeft);
610
+ };
526
611
  Draggable.prototype.triggerOutFunction = function (evt, eleObj) {
527
612
  this.hoverObject.instance.intOut(evt, eleObj.target);
528
613
  this.hoverObject.instance.dragData[this.scope] = null;
@@ -616,18 +701,23 @@ var Draggable = /** @class */ (function (_super) {
616
701
  if (ele) {
617
702
  var elementArea = ele.getBoundingClientRect();
618
703
  eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
619
- eleHeightBound = ele.scrollHeight ? ele.scrollHeight : elementArea.bottom - elementArea.top;
704
+ eleHeightBound = ele.scrollHeight ? (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
620
705
  var keys = ['Top', 'Left', 'Bottom', 'Right'];
621
706
  var styles = getComputedStyle(ele);
622
707
  for (var i = 0; i < keys.length; i++) {
623
- var key = keys[i];
708
+ var key = keys[parseInt(i.toString(), 10)];
624
709
  var tborder = styles['border' + key + 'Width'];
625
710
  var tpadding = styles['padding' + key];
626
711
  var lowerKey = key.toLowerCase();
627
- this.borderWidth[lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
628
- this.padding[lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
712
+ this.borderWidth["" + lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
713
+ this.padding["" + lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
714
+ }
715
+ if (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) {
716
+ top = elementArea.top + document.scrollingElement.scrollTop;
717
+ }
718
+ else {
719
+ top = elementArea.top;
629
720
  }
630
- top = elementArea.top;
631
721
  left = elementArea.left;
632
722
  this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
633
723
  this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;
@@ -639,7 +729,8 @@ var Draggable = /** @class */ (function (_super) {
639
729
  var intCoord = this.getCoordinates(evt);
640
730
  var ele;
641
731
  var prevStyle = this.helperElement.style.pointerEvents || '';
642
- if (compareElementParent(evt.target, this.helperElement) || evt.type.indexOf('touch') !== -1) {
732
+ var isPointer = evt.type.indexOf('pointer') !== -1 && Browser.info.name === 'safari' && parseInt(Browser.info.version) > 12;
733
+ if (compareElementParent(evt.target, this.helperElement) || evt.type.indexOf('touch') !== -1 || isPointer) {
643
734
  this.helperElement.style.pointerEvents = 'none';
644
735
  ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
645
736
  this.helperElement.style.pointerEvents = prevStyle;
@@ -678,6 +769,12 @@ var Draggable = /** @class */ (function (_super) {
678
769
  pageX = this.clone ? intCoord.pageX : (intCoord.pageX + window.pageXOffset) - this.relativeXPosition;
679
770
  pageY = this.clone ? intCoord.pageY : (intCoord.pageY + window.pageYOffset) - this.relativeYPosition;
680
771
  }
772
+ if (this.element && this.element.classList.length > 0 && this.element.classList.value.indexOf("e-dialog") === -1 && document.scrollingElement) {
773
+ var isVerticalScroll = document.scrollingElement.scrollHeight > 0 && document.scrollingElement.scrollHeight > document.scrollingElement.clientHeight && document.scrollingElement.scrollTop > 0;
774
+ var isHorrizontalScroll = document.scrollingElement.scrollWidth > 0 && document.scrollingElement.scrollWidth > document.scrollingElement.clientWidth && document.scrollingElement.scrollLeft > 0;
775
+ pageX = isHorrizontalScroll ? pageX - document.scrollingElement.scrollLeft : pageX;
776
+ pageY = isVerticalScroll ? pageY - document.scrollingElement.scrollTop : pageY;
777
+ }
681
778
  return {
682
779
  left: pageX - (this.margin.left + this.cursorAt.left),
683
780
  top: pageY - (this.margin.top + this.cursorAt.top)
@@ -730,7 +827,7 @@ var Draggable = /** @class */ (function (_super) {
730
827
  if (eleInst) {
731
828
  for (var _i = 0, eleInst_1 = eleInst; _i < eleInst_1.length; _i++) {
732
829
  var inst = eleInst_1[_i];
733
- if (inst[name]() === 'droppable') {
830
+ if (inst["" + name]() === 'droppable') {
734
831
  drop = inst;
735
832
  break;
736
833
  }
@@ -57,15 +57,15 @@ var EventHandler = /** @class */ (function () {
57
57
  var event = eventName.split(' ');
58
58
  for (var i = 0; i < event.length; i++) {
59
59
  eventData.push({
60
- name: event[i],
60
+ name: event[parseInt(i.toString(), 10)],
61
61
  listener: listener,
62
62
  debounce: debounceListener
63
63
  });
64
64
  if (Browser.isIE) {
65
- element.addEventListener(event[i], debounceListener);
65
+ element.addEventListener(event[parseInt(i.toString(), 10)], debounceListener);
66
66
  }
67
67
  else {
68
- element.addEventListener(event[i], debounceListener, { passive: false });
68
+ element.addEventListener(event[parseInt(i.toString(), 10)], debounceListener, { passive: false });
69
69
  }
70
70
  }
71
71
  return debounceListener;
@@ -86,7 +86,7 @@ var EventHandler = /** @class */ (function () {
86
86
  var debounceListener;
87
87
  if (eventData && eventData.length !== 0) {
88
88
  eventData.some(function (x, i) {
89
- return x.name === event[j] && x.listener === listener ?
89
+ return x.name === event[parseInt(j.toString(), 10)] && x.listener === listener ?
90
90
  (index = i, debounceListener = x.debounce, true) : false;
91
91
  });
92
92
  }
@@ -94,7 +94,7 @@ var EventHandler = /** @class */ (function () {
94
94
  eventData.splice(index, 1);
95
95
  }
96
96
  if (debounceListener) {
97
- element.removeEventListener(event[j], debounceListener);
97
+ element.removeEventListener(event[parseInt(j.toString(), 10)], debounceListener);
98
98
  }
99
99
  };
100
100
  for (var j = 0; j < event.length; j++) {
@@ -115,7 +115,7 @@ var EventHandler = /** @class */ (function () {
115
115
  // eslint-disable-next-line
116
116
  copyData = extend([], copyData, eventData);
117
117
  for (var i = 0; i < copyData.length; i++) {
118
- element.removeEventListener(copyData[i].name, copyData[i].debounce);
118
+ element.removeEventListener(copyData[parseInt(i.toString(), 10)].name, copyData[parseInt(i.toString(), 10)].debounce);
119
119
  eventData.shift();
120
120
  }
121
121
  };
@@ -151,7 +151,7 @@ export var HijriParser;
151
151
  var tempDay = z - Math.floor(29.5001 * im - 29);
152
152
  var i = 0;
153
153
  for (; i < dateCorrection.length; i++) {
154
- if (dateCorrection[i] > modifiedJulianDate) {
154
+ if (dateCorrection[parseInt(i.toString(), 10)] > modifiedJulianDate) {
155
155
  break;
156
156
  }
157
157
  }
@@ -59,7 +59,7 @@ var DateParser = /** @class */ (function () {
59
59
  var numMapper = isBlazor() ? dependable.parserObject.numbers :
60
60
  parser.getNumberMapper(dependable.parserObject, parser.getNumberingSystem(cldr));
61
61
  for (var i = 0; i < length_1; i++) {
62
- var str = patternMatch[i];
62
+ var str = patternMatch[parseInt(i.toString(), 10)];
63
63
  var len = str.length;
64
64
  var char = (str[0] === 'K') ? 'h' : str[0];
65
65
  var isNumber = void 0;
@@ -189,7 +189,7 @@ var DateParser = /** @class */ (function () {
189
189
  break;
190
190
  }
191
191
  if (canUpdate) {
192
- parseOptions.evalposition[charKey] = { isNumber: isNumber, pos: i + 1 + gmtCorrection, hourOnly: hourOnly };
192
+ parseOptions.evalposition["" + charKey] = { isNumber: isNumber, pos: i + 1 + gmtCorrection, hourOnly: hourOnly };
193
193
  }
194
194
  if (i === length_1 - 1 && !isNullOrUndefined(regexString)) {
195
195
  parseOptions.parserRegex = new RegExp('^' + regexString + '$', 'i');
@@ -313,7 +313,7 @@ var DateParser = /** @class */ (function () {
313
313
  var props = Object.keys(parseOptions.evalposition);
314
314
  for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {
315
315
  var prop = props_1[_i];
316
- var curObject = parseOptions.evalposition[prop];
316
+ var curObject = parseOptions.evalposition["" + prop];
317
317
  var matchString = matches[curObject.pos];
318
318
  if (curObject.isNumber) {
319
319
  // eslint-disable-next-line
@@ -333,7 +333,7 @@ var DateParser = /** @class */ (function () {
333
333
  val += this.getZoneValue(flag, matches[pos + 4], matches[pos + 10], num);
334
334
  }
335
335
  if (!isNullOrUndefined(val)) {
336
- retOptions[prop] = val;
336
+ retOptions["" + prop] = val;
337
337
  }
338
338
  }
339
339
  else {
@@ -939,7 +939,7 @@ export var IntlBase;
939
939
  function isCurrencyPercent(parts, actual, symbol) {
940
940
  var options = { nlead: parts[0], nend: parts[1] };
941
941
  for (var i = 0; i < 2; i++) {
942
- var part = parts[i];
942
+ var part = parts[parseInt(i.toString(), 10)];
943
943
  var loc = part.indexOf(actual);
944
944
  if ((loc !== -1) && ((loc < part.indexOf('\'')) || (loc > part.lastIndexOf('\'')))) {
945
945
  // eslint-disable-next-line
@@ -1158,7 +1158,7 @@ export var IntlBase;
1158
1158
  integer = hash + integer;
1159
1159
  pattern = '';
1160
1160
  for (var x = integer.length - 1; x > 0; x = x - 3) {
1161
- pattern = ',' + integer[x - 2] + integer[x - 1] + integer[x] + pattern;
1161
+ pattern = ',' + integer[x - 2] + integer[x - 1] + integer[parseInt(x.toString(), 10)] + pattern;
1162
1162
  }
1163
1163
  pattern = pattern.slice(1);
1164
1164
  return temp[1] ? (pattern + '.' + temp[1]) : pattern;
@@ -1179,9 +1179,9 @@ export var IntlBase;
1179
1179
  }
1180
1180
  iCulture = iCulture.slice(0, 2).toUpperCase() + iCulture.substr(2);
1181
1181
  if (mapper) {
1182
- firstDay = mapper[iCulture] || mapper[iCulture.slice(0, 2)] || defaultFirstDay;
1182
+ firstDay = mapper["" + iCulture] || mapper[iCulture.slice(0, 2)] || defaultFirstDay;
1183
1183
  }
1184
- return firstDayMapper[firstDay];
1184
+ return firstDayMapper["" + firstDay];
1185
1185
  }
1186
1186
  IntlBase.getWeekData = getWeekData;
1187
1187
  /**
@@ -6,7 +6,7 @@ var errorText = {
6
6
  'ms': 'minimumSignificantDigits',
7
7
  'ls': 'maximumSignificantDigits',
8
8
  'mf': 'minimumFractionDigits',
9
- 'lf': 'maximumFractionDigits',
9
+ 'lf': 'maximumFractionDigits'
10
10
  };
11
11
  var integerError = 'minimumIntegerDigits';
12
12
  var percentSign = 'percentSign';
@@ -44,9 +44,9 @@ var NumberFormat = /** @class */ (function () {
44
44
  dOptions.currencySymbol = isBlazor() ? getValue('currencySymbol', numObject) : base.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode, option.altSymbol);
45
45
  /* eslint-disable @typescript-eslint/no-explicit-any */
46
46
  dOptions.percentSymbol = isBlazor() ? getValue('numberSymbols.percentSign', numObject) :
47
- dOptions.numberMapper.numberSymbols[percentSign];
47
+ dOptions.numberMapper.numberSymbols["" + percentSign];
48
48
  dOptions.minusSymbol = isBlazor() ? getValue('numberSymbols.minusSign', numObject) :
49
- dOptions.numberMapper.numberSymbols[minusSign];
49
+ dOptions.numberMapper.numberSymbols["" + minusSign];
50
50
  var symbols = dOptions.numberMapper.numberSymbols;
51
51
  if ((option.format) && !(base.formatRegex.test(option.format))) {
52
52
  cOptions = base.customFormat(option.format, dOptions, dependable.numericObject);
@@ -105,10 +105,10 @@ var ParserBase = /** @class */ (function () {
105
105
  var ret = '';
106
106
  for (var i = 0; i < len; i++) {
107
107
  if (i !== len - 1) {
108
- ret += val[i] + '|';
108
+ ret += val[parseInt(i.toString(), 10)] + '|';
109
109
  }
110
110
  else {
111
- ret += val[i];
111
+ ret += val[parseInt(i.toString(), 10)];
112
112
  }
113
113
  }
114
114
  return ret;
package/src/keyboard.js CHANGED
@@ -104,7 +104,7 @@ var KeyboardEvents = /** @class */ (function (_super) {
104
104
  var keys = Object.keys(_this.keyConfigs);
105
105
  for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
106
106
  var key = keys_1[_i];
107
- var configCollection = _this.keyConfigs[key].split(',');
107
+ var configCollection = _this.keyConfigs["" + key].split(',');
108
108
  for (var _a = 0, configCollection_1 = configCollection; _a < configCollection_1.length; _a++) {
109
109
  var rconfig = configCollection_1[_a];
110
110
  var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());
@@ -181,7 +181,7 @@ var KeyboardEvents = /** @class */ (function (_super) {
181
181
  */
182
182
  KeyboardEvents.getKeyConfigData = function (config) {
183
183
  if (config in this.configCache) {
184
- return this.configCache[config];
184
+ return this.configCache["" + config];
185
185
  }
186
186
  var keys = config.toLowerCase().split('+');
187
187
  var keyData = {
@@ -196,12 +196,12 @@ var KeyboardEvents = /** @class */ (function (_super) {
196
196
  else {
197
197
  keyData.keyCode = KeyboardEvents_1.getKeyCode(keys[keys.length - 1]);
198
198
  }
199
- KeyboardEvents_1.configCache[config] = keyData;
199
+ KeyboardEvents_1.configCache["" + config] = keyData;
200
200
  return keyData;
201
201
  };
202
202
  // Return the keycode value as string
203
203
  KeyboardEvents.getKeyCode = function (keyVal) {
204
- return keyCode[keyVal] || keyVal.toUpperCase().charCodeAt(0);
204
+ return keyCode["" + keyVal] || keyVal.toUpperCase().charCodeAt(0);
205
205
  };
206
206
  var KeyboardEvents_1;
207
207
  KeyboardEvents.configCache = {};
package/src/l10n.js CHANGED
@@ -63,11 +63,11 @@ var L10n = /** @class */ (function () {
63
63
  */
64
64
  L10n.prototype.getConstant = function (prop) {
65
65
  // Removed conditional operator because this method does not return correct value when passing 0 as value in localization
66
- if (!isNullOrUndefined(this.currentLocale[prop])) {
67
- return this.currentLocale[prop];
66
+ if (!isNullOrUndefined(this.currentLocale["" + prop])) {
67
+ return this.currentLocale["" + prop];
68
68
  }
69
69
  else {
70
- return this.localeStrings[prop] || '';
70
+ return this.localeStrings["" + prop] || '';
71
71
  }
72
72
  };
73
73
  /**
@@ -78,8 +78,8 @@ var L10n = /** @class */ (function () {
78
78
  * @returns {Object} ?
79
79
  */
80
80
  L10n.prototype.intGetControlConstant = function (curObject, locale) {
81
- if ((curObject)[locale]) {
82
- return (curObject)[locale][this.controlName];
81
+ if ((curObject)["" + locale]) {
82
+ return (curObject)["" + locale][this.controlName];
83
83
  }
84
84
  return null;
85
85
  };
@@ -25,11 +25,11 @@ var ModuleLoader = /** @class */ (function () {
25
25
  this.clearUnusedModule(requiredModules);
26
26
  }
27
27
  for (var i = 0; i < reqLength; i++) {
28
- var modl = requiredModules[i];
28
+ var modl = requiredModules[parseInt(i.toString(), 10)];
29
29
  for (var _i = 0, moduleList_1 = moduleList; _i < moduleList_1.length; _i++) {
30
30
  var module = moduleList_1[_i];
31
31
  var modName = modl.member;
32
- if (module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
32
+ if (module && module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
33
33
  var moduleObject = createInstance(module, modl.args);
34
34
  var memberName = this.getMemberName(modName);
35
35
  if (modl.isProperty) {