@syncfusion/ej2-base 26.1.35-806029 → 26.1.35-8139

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 (169) hide show
  1. package/.eslintrc.json +261 -0
  2. package/{ReadMe.md → README.md} +100 -100
  3. package/bin/syncfusion-license.js +1 -104
  4. package/dist/ej2-base.min.js +10 -1
  5. package/dist/ej2-base.umd.min.js +10 -1
  6. package/dist/ej2-base.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-base.es2015.js +67 -74
  8. package/dist/es6/ej2-base.es2015.js.map +1 -1
  9. package/dist/es6/ej2-base.es5.js +117 -124
  10. package/dist/es6/ej2-base.es5.js.map +1 -1
  11. package/dist/global/ej2-base.min.js +10 -1
  12. package/dist/global/ej2-base.min.js.map +1 -1
  13. package/dist/global/index.d.ts +9 -0
  14. package/e2e/crypto.js +16 -16
  15. package/e2e/index.d.ts +27 -27
  16. package/e2e/m.protractor.config.js +286 -286
  17. package/e2e/modified-protractor/protractor.config.js +316 -316
  18. package/e2e/protractor.config.js +389 -389
  19. package/helpers/e2e/index.js +3 -3
  20. package/license +10 -10
  21. package/package.json +225 -225
  22. package/src/animation-model.d.ts +41 -41
  23. package/src/animation.js +19 -19
  24. package/src/browser.js +0 -4
  25. package/src/component-model.d.ts +16 -16
  26. package/src/component.js +19 -19
  27. package/src/draggable-model.d.ts +113 -113
  28. package/src/draggable.js +72 -35
  29. package/src/droppable-model.d.ts +23 -23
  30. package/src/droppable.js +19 -19
  31. package/src/intl/number-formatter.js +1 -8
  32. package/src/keyboard-model.d.ts +16 -16
  33. package/src/keyboard.js +19 -19
  34. package/src/touch-model.d.ts +39 -39
  35. package/src/touch.js +19 -19
  36. package/src/validate-lic.js +1 -1
  37. package/styles/_all.scss +2 -2
  38. package/styles/_bds-dark-definition.scss +15 -16
  39. package/styles/_bds-definition.scss +15 -16
  40. package/styles/_bootstrap-dark-definition.scss +42 -42
  41. package/styles/_bootstrap-definition.scss +42 -42
  42. package/styles/_bootstrap4-definition.scss +11 -11
  43. package/styles/_bootstrap5-dark-definition.scss +9 -9
  44. package/styles/_bootstrap5-definition.scss +8 -8
  45. package/styles/_bootstrap5.3-dark-definition.scss +8 -8
  46. package/styles/_bootstrap5.3-definition.scss +8 -8
  47. package/styles/_fabric-dark-definition.scss +42 -42
  48. package/styles/_fabric-definition.scss +42 -42
  49. package/styles/_fluent-dark-definition.scss +9 -9
  50. package/styles/_fluent-definition.scss +9 -9
  51. package/styles/_fluent2-dark-definition.scss +9 -9
  52. package/styles/_fluent2-definition.scss +9 -9
  53. package/styles/_fluent2-highcontrast-definition.scss +9 -9
  54. package/styles/_fusionnew-dark-definition.scss +8 -8
  55. package/styles/_fusionnew-definition.scss +8 -8
  56. package/styles/_highcontrast-definition.scss +42 -42
  57. package/styles/_highcontrast-light-definition.scss +42 -42
  58. package/styles/_material-dark-definition.scss +48 -49
  59. package/styles/_material-definition.scss +49 -50
  60. package/styles/_material3-dark-definition.scss +14 -15
  61. package/styles/_material3-definition.scss +15 -16
  62. package/styles/_tailwind-dark-definition.scss +15 -16
  63. package/styles/_tailwind-definition.scss +15 -16
  64. package/styles/animation/_all.scss +559 -535
  65. package/styles/bootstrap-dark.css +51 -235
  66. package/styles/bootstrap.css +51 -235
  67. package/styles/bootstrap4.css +51 -223
  68. package/styles/bootstrap5-dark.css +53 -228
  69. package/styles/bootstrap5.css +51 -226
  70. package/styles/common/_all.scss +2 -2
  71. package/styles/common/_core.scss +113 -111
  72. package/styles/common/_mixin.scss +9 -11
  73. package/styles/definition/_bds-dark.scss +1067 -1193
  74. package/styles/definition/_bds.scss +1327 -1488
  75. package/styles/definition/_bootstrap-dark.scss +207 -213
  76. package/styles/definition/_bootstrap.scss +202 -208
  77. package/styles/definition/_bootstrap4.scss +153 -159
  78. package/styles/definition/_bootstrap5-dark.scss +475 -481
  79. package/styles/definition/_bootstrap5.3-dark.scss +853 -1232
  80. package/styles/definition/_bootstrap5.3.scss +1486 -1579
  81. package/styles/definition/_bootstrap5.scss +475 -481
  82. package/styles/definition/_fabric-dark.scss +188 -194
  83. package/styles/definition/_fabric.scss +186 -192
  84. package/styles/definition/_fluent-dark.scss +488 -494
  85. package/styles/definition/_fluent.scss +488 -494
  86. package/styles/definition/_fluent2-dark.scss +1506 -1523
  87. package/styles/definition/_fluent2-highcontrast.scss +1506 -1523
  88. package/styles/definition/_fluent2.scss +2266 -2295
  89. package/styles/definition/_fusionnew-dark.scss +324 -330
  90. package/styles/definition/_fusionnew.scss +324 -331
  91. package/styles/definition/_highcontrast-light.scss +183 -189
  92. package/styles/definition/_highcontrast.scss +183 -189
  93. package/styles/definition/_material-dark.scss +187 -193
  94. package/styles/definition/_material.scss +180 -186
  95. package/styles/definition/_material3-dark.scss +654 -660
  96. package/styles/definition/_material3.scss +723 -729
  97. package/styles/definition/_tailwind-dark.scss +439 -445
  98. package/styles/definition/_tailwind.scss +437 -443
  99. package/styles/fabric-dark.css +51 -235
  100. package/styles/fabric.css +51 -235
  101. package/styles/fluent-dark.css +51 -226
  102. package/styles/fluent.css +51 -226
  103. package/styles/fluent2.css +82 -274
  104. package/styles/highcontrast-light.css +51 -235
  105. package/styles/highcontrast.css +51 -235
  106. package/styles/material-dark.css +51 -235
  107. package/styles/material.css +51 -235
  108. package/styles/material3-dark.css +51 -226
  109. package/styles/material3.css +51 -226
  110. package/styles/offline-theme/material-dark.css +51 -235
  111. package/styles/offline-theme/material.css +51 -235
  112. package/styles/offline-theme/tailwind-dark.css +51 -226
  113. package/styles/offline-theme/tailwind.css +51 -226
  114. package/styles/tailwind-dark.css +51 -226
  115. package/styles/tailwind.css +51 -226
  116. package/tslint.json +111 -0
  117. package/dist/ts/undefined +0 -67
  118. package/styles/_tailwind3-dark-definition.scss +0 -15
  119. package/styles/_tailwind3-definition.scss +0 -15
  120. package/styles/bds-lite.css +0 -3408
  121. package/styles/bds-lite.scss +0 -3
  122. package/styles/bds.css +0 -3408
  123. package/styles/bds.scss +0 -3
  124. package/styles/bootstrap-dark-lite.css +0 -3749
  125. package/styles/bootstrap-dark-lite.scss +0 -3
  126. package/styles/bootstrap-lite.css +0 -3749
  127. package/styles/bootstrap-lite.scss +0 -3
  128. package/styles/bootstrap4-lite.css +0 -3390
  129. package/styles/bootstrap4-lite.scss +0 -3
  130. package/styles/bootstrap5-dark-lite.css +0 -2966
  131. package/styles/bootstrap5-dark-lite.scss +0 -3
  132. package/styles/bootstrap5-lite.css +0 -2966
  133. package/styles/bootstrap5-lite.scss +0 -3
  134. package/styles/bootstrap5.3-lite.css +0 -3559
  135. package/styles/bootstrap5.3-lite.scss +0 -3
  136. package/styles/bootstrap5.3.css +0 -3559
  137. package/styles/bootstrap5.3.scss +0 -3
  138. package/styles/definition/_tailwind3-dark.scss +0 -1622
  139. package/styles/definition/_tailwind3.scss +0 -2093
  140. package/styles/fabric-dark-lite.css +0 -3734
  141. package/styles/fabric-dark-lite.scss +0 -3
  142. package/styles/fabric-lite.css +0 -3734
  143. package/styles/fabric-lite.scss +0 -3
  144. package/styles/fluent-dark-lite.css +0 -2966
  145. package/styles/fluent-dark-lite.scss +0 -3
  146. package/styles/fluent-lite.css +0 -2966
  147. package/styles/fluent-lite.scss +0 -3
  148. package/styles/fluent2-lite.css +0 -4017
  149. package/styles/fluent2-lite.scss +0 -3
  150. package/styles/highcontrast-light-lite.css +0 -3725
  151. package/styles/highcontrast-light-lite.scss +0 -3
  152. package/styles/highcontrast-lite.css +0 -3725
  153. package/styles/highcontrast-lite.scss +0 -3
  154. package/styles/material-dark-lite.css +0 -3702
  155. package/styles/material-dark-lite.scss +0 -3
  156. package/styles/material-lite.css +0 -3702
  157. package/styles/material-lite.scss +0 -3
  158. package/styles/material3-dark-lite.css +0 -3021
  159. package/styles/material3-dark-lite.scss +0 -3
  160. package/styles/material3-lite.css +0 -3077
  161. package/styles/material3-lite.scss +0 -3
  162. package/styles/tailwind-dark-lite.css +0 -2967
  163. package/styles/tailwind-dark-lite.scss +0 -3
  164. package/styles/tailwind-lite.css +0 -2967
  165. package/styles/tailwind-lite.scss +0 -3
  166. package/styles/tailwind3-lite.css +0 -3775
  167. package/styles/tailwind3-lite.scss +0 -3
  168. package/styles/tailwind3.css +0 -3775
  169. package/styles/tailwind3.scss +0 -3
@@ -1,4 +1,4 @@
1
- import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor } from './util';
1
+ import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor } from './util';import { ModuleLoader, ModuleDeclaration } from './module-loader';import { Base } from './base';import { Observer, BoundOptions } from './observer';import { ChildProperty } from './child-property';import { Property, NotifyPropertyChanges } from './notify-property-change';import { onIntlChange, rightToLeft, defaultCulture } from './internationalization';import { createElement, addClass, removeClass, ElementProperties, select } from './dom';import { validateLicense, createLicenseOverlay, componentList } from './validate-lic';
2
2
 
3
3
  /**
4
4
  * Interface for a class Component
@@ -6,24 +6,24 @@ import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor
6
6
  export interface ComponentModel {
7
7
 
8
8
  /**
9
- * Enable or disable persisting component's state between page reloads.
10
- *
11
- * @default false
12
- */
13
- enablePersistence?: boolean;
9
+ * Enable or disable persisting component's state between page reloads.
10
+ *
11
+ * @default false
12
+ */
13
+ enablePersistence?: boolean;
14
14
 
15
15
  /**
16
- * Enable or disable rendering component in right to left direction.
17
- *
18
- * @default false
19
- */
20
- enableRtl?: boolean;
16
+ * Enable or disable rendering component in right to left direction.
17
+ *
18
+ * @default false
19
+ */
20
+ enableRtl?: boolean;
21
21
 
22
22
  /**
23
- * Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
24
- *
25
- * @default ''
26
- */
27
- locale?: string;
23
+ * Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
24
+ *
25
+ * @default ''
26
+ */
27
+ locale?: string;
28
28
 
29
29
  }
package/src/component.js CHANGED
@@ -1,22 +1,22 @@
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
- };
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
20
  /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
21
21
  import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor } from './util';
22
22
  import { ModuleLoader } from './module-loader';
@@ -1,4 +1,4 @@
1
- import { Base } from './base';
1
+ import { Base } from './base';import { Browser } from './browser';import { isVisible } from './dom';import { Property, Complex, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';import { EventHandler } from './event-handler';import { ChildProperty } from './child-property';import { select, closest, setStyleAttribute, addClass, createElement } from './dom';import { extend, isUndefined, isNullOrUndefined, compareElementParent, isBlazor } from './util';
2
2
  import {DragDirection} from "./draggable";
3
3
 
4
4
  /**
@@ -7,14 +7,14 @@ import {DragDirection} from "./draggable";
7
7
  export interface PositionModel {
8
8
 
9
9
  /**
10
- * Specifies the left position of cursor in draggable.
11
- */
12
- left?: number;
10
+ * Specifies the left position of cursor in draggable.
11
+ */
12
+ left?: number;
13
13
 
14
14
  /**
15
- * Specifies the left position of cursor in draggable.
16
- */
17
- top?: number;
15
+ * Specifies the left position of cursor in draggable.
16
+ */
17
+ top?: number;
18
18
 
19
19
  }
20
20
 
@@ -24,157 +24,157 @@ export interface PositionModel {
24
24
  export interface DraggableModel {
25
25
 
26
26
  /**
27
- * Defines the distance between the cursor and the draggable element.
28
- */
29
- cursorAt?: PositionModel;
27
+ * Defines the distance between the cursor and the draggable element.
28
+ */
29
+ cursorAt?: PositionModel;
30
30
 
31
31
  /**
32
- * If `clone` set to true, drag operations are performed in duplicate element of the draggable element.
33
- *
34
- * @default true
35
- */
36
- clone?: boolean;
32
+ * If `clone` set to true, drag operations are performed in duplicate element of the draggable element.
33
+ *
34
+ * @default true
35
+ */
36
+ clone?: boolean;
37
37
 
38
38
  /**
39
- * Defines the parent element in which draggable element movement will be restricted.
40
- */
41
- dragArea?: HTMLElement | string;
39
+ * Defines the parent element in which draggable element movement will be restricted.
40
+ */
41
+ dragArea?: HTMLElement | string;
42
42
 
43
43
  /**
44
- * Defines the dragArea is scrollable or not.
45
- */
46
- isDragScroll?: boolean;
44
+ * Defines the dragArea is scrollable or not.
45
+ */
46
+ isDragScroll?: boolean;
47
47
 
48
48
  /**
49
- * Defines wheather need to replace drag element by currentstateTarget.
50
- *
51
- * @private
52
- */
53
- isReplaceDragEle?: boolean;
49
+ * Defines wheather need to replace drag element by currentstateTarget.
50
+ *
51
+ * @private
52
+ */
53
+ isReplaceDragEle?: boolean;
54
54
 
55
55
  /**
56
- * Defines wheather need to add prevent select class to body or not.
57
- *
58
- * @private
59
- */
60
- isPreventSelect?: boolean;
56
+ * Defines wheather need to add prevent select class to body or not.
57
+ *
58
+ * @private
59
+ */
60
+ isPreventSelect?: boolean;
61
61
 
62
62
  /**
63
- * Specifies the callback function for drag event.
64
- *
65
- * @event drag
66
- */
67
- drag?: Function;
63
+ * Specifies the callback function for drag event.
64
+ *
65
+ * @event drag
66
+ */
67
+ drag?: Function;
68
68
 
69
69
  /**
70
- * Specifies the callback function for dragStart event.
71
- *
72
- * @event dragStart
73
- */
74
- dragStart?: Function;
70
+ * Specifies the callback function for dragStart event.
71
+ *
72
+ * @event dragStart
73
+ */
74
+ dragStart?: Function;
75
75
 
76
76
  /**
77
- * Specifies the callback function for dragStop event.
78
- *
79
- * @event dragStop
80
- */
81
- dragStop?: Function;
77
+ * Specifies the callback function for dragStop event.
78
+ *
79
+ * @event dragStop
80
+ */
81
+ dragStop?: Function;
82
82
 
83
83
  /**
84
- * Defines the minimum distance draggable element to be moved to trigger the drag operation.
85
- *
86
- * @default 1
87
- */
88
- distance?: number;
84
+ * Defines the minimum distance draggable element to be moved to trigger the drag operation.
85
+ *
86
+ * @default 1
87
+ */
88
+ distance?: number;
89
89
 
90
90
  /**
91
- * Defines the child element selector which will act as drag handle.
92
- */
93
- handle?: string;
91
+ * Defines the child element selector which will act as drag handle.
92
+ */
93
+ handle?: string;
94
94
 
95
95
  /**
96
- * Defines the child element selector which will prevent dragging of element.
97
- */
98
- abort?: string | string[];
96
+ * Defines the child element selector which will prevent dragging of element.
97
+ */
98
+ abort?: string | string[];
99
99
 
100
100
  /**
101
- * Defines the callback function for customizing the cloned element.
102
- */
103
- helper?: Function;
101
+ * Defines the callback function for customizing the cloned element.
102
+ */
103
+ helper?: Function;
104
104
 
105
105
  /**
106
- * Defines the scope value to group sets of draggable and droppable items.
107
- * A draggable with the same scope value will be accepted by the droppable.
108
- */
109
- scope?: string;
106
+ * Defines the scope value to group sets of draggable and droppable items.
107
+ * A draggable with the same scope value will be accepted by the droppable.
108
+ */
109
+ scope?: string;
110
110
 
111
111
  /**
112
- * Specifies the dragTarget by which the clone element is positioned if not given current context element will be considered.
113
- *
114
- * @private
115
- */
116
- dragTarget?: string;
112
+ * Specifies the dragTarget by which the clone element is positioned if not given current context element will be considered.
113
+ *
114
+ * @private
115
+ */
116
+ dragTarget?: string;
117
117
 
118
118
  /**
119
- * Defines the axis to limit the draggable element drag path.The possible axis path values are
120
- * * `x` - Allows drag movement in horizontal direction only.
121
- * * `y` - Allows drag movement in vertical direction only.
122
- */
123
- axis?: DragDirection;
119
+ * Defines the axis to limit the draggable element drag path.The possible axis path values are
120
+ * * `x` - Allows drag movement in horizontal direction only.
121
+ * * `y` - Allows drag movement in vertical direction only.
122
+ */
123
+ axis?: DragDirection;
124
124
 
125
125
  /**
126
- * Defines the function to change the position value.
127
- *
128
- * @private
129
- */
130
- queryPositionInfo?: Function;
126
+ * Defines the function to change the position value.
127
+ *
128
+ * @private
129
+ */
130
+ queryPositionInfo?: Function;
131
131
 
132
132
  /**
133
- * Defines whether the drag clone element will be split form the cursor pointer.
134
- *
135
- * @private
136
- */
137
- enableTailMode?: boolean;
133
+ * Defines whether the drag clone element will be split form the cursor pointer.
134
+ *
135
+ * @private
136
+ */
137
+ enableTailMode?: boolean;
138
138
 
139
139
  /**
140
- * Defines whether to skip the previous drag movement comparison.
141
- *
142
- * @private
143
- */
144
- skipDistanceCheck?: boolean;
140
+ * Defines whether to skip the previous drag movement comparison.
141
+ *
142
+ * @private
143
+ */
144
+ skipDistanceCheck?: boolean;
145
145
 
146
146
  /**
147
- * @private
148
- */
149
- preventDefault?: boolean;
147
+ * @private
148
+ */
149
+ preventDefault?: boolean;
150
150
 
151
151
  /**
152
- * Defines whether to enable autoscroll on drag movement of draggable element.
153
- * enableAutoScroll
154
- *
155
- * @private
156
- */
157
- enableAutoScroll?: boolean;
152
+ * Defines whether to enable autoscroll on drag movement of draggable element.
153
+ * enableAutoScroll
154
+ *
155
+ * @private
156
+ */
157
+ enableAutoScroll?: boolean;
158
158
 
159
159
  /**
160
- * Defines whether to enable taphold on mobile devices.
161
- * enableAutoScroll
162
- *
163
- * @private
164
- */
165
- enableTapHold?: boolean;
160
+ * Defines whether to enable taphold on mobile devices.
161
+ * enableAutoScroll
162
+ *
163
+ * @private
164
+ */
165
+ enableTapHold?: boolean;
166
166
 
167
167
  /**
168
- * Specifies the time delay for tap hold.
169
- *
170
- * @default 750
171
- * @private
172
- */
173
- tapHoldThreshold?: number;
168
+ * Specifies the time delay for tap hold.
169
+ *
170
+ * @default 750
171
+ * @private
172
+ */
173
+ tapHoldThreshold?: number;
174
174
 
175
175
  /**
176
- * @private
177
- */
178
- enableScrollHandler?: boolean;
176
+ * @private
177
+ */
178
+ enableScrollHandler?: boolean;
179
179
 
180
180
  }
package/src/draggable.js CHANGED
@@ -1,22 +1,22 @@
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
- };
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
20
  /* eslint-disable @typescript-eslint/no-explicit-any */
21
21
  import { Base } from './base';
22
22
  import { Browser } from './browser';
@@ -79,6 +79,7 @@ var Draggable = /** @class */ (function (_super) {
79
79
  _this.parentScrollX = 0;
80
80
  _this.parentScrollY = 0;
81
81
  _this.droppables = {};
82
+ _this.isTouchInteraction = false;
82
83
  _this.bind();
83
84
  return _this;
84
85
  }
@@ -93,6 +94,41 @@ var Draggable = /** @class */ (function (_super) {
93
94
  Draggable.getDefaultPosition = function () {
94
95
  return extend({}, defaultPosition);
95
96
  };
97
+
98
+ Draggable.prototype.getDragEventName = function (type) {
99
+ var eventName;
100
+
101
+ switch (type) {
102
+ case 'move':
103
+ eventName = Browser.touchMoveEvent;
104
+ break;
105
+ case 'end':
106
+ eventName = Browser.touchEndEvent;
107
+ break;
108
+ case 'cancel':
109
+ eventName = Browser.touchCancelEvent;
110
+ break;
111
+ default:
112
+ eventName = Browser.touchStartEvent;
113
+ break;
114
+ }
115
+
116
+ if (Browser.isSafari()) {
117
+ var suffix = {
118
+ start: 'pointerdown mousedown',
119
+ move: 'pointermove mousemove',
120
+ end: 'pointerup mouseup',
121
+ cancel: 'pointercancel mouseleave'
122
+ };
123
+
124
+ if (!this.isTouchInteraction) {
125
+ eventName += ' ' + suffix[type];
126
+ }
127
+ }
128
+
129
+ return eventName;
130
+ };
131
+
96
132
  Draggable.prototype.toggleEvents = function (isUnWire) {
97
133
  var ele;
98
134
  if (!isUndefined(this.handle)) {
@@ -100,10 +136,10 @@ var Draggable = /** @class */ (function (_super) {
100
136
  }
101
137
  var handler = (this.enableTapHold && Browser.isDevice && Browser.isTouch) ? this.mobileInitialize : this.initialize;
102
138
  if (isUnWire) {
103
- EventHandler.remove(ele || this.element, Browser.isSafari() ? 'touchstart' : Browser.touchStartEvent, handler);
139
+ EventHandler.remove(ele || this.element, this.getDragEventName('start'), handler);
104
140
  }
105
141
  else {
106
- EventHandler.add(ele || this.element, Browser.isSafari() ? 'touchstart' : Browser.touchStartEvent, handler, this);
142
+ EventHandler.add(ele || this.element, this.getDragEventName('start'), handler, this);
107
143
  }
108
144
  };
109
145
  /* istanbul ignore next */
@@ -115,14 +151,14 @@ var Draggable = /** @class */ (function (_super) {
115
151
  _this.removeTapholdTimer();
116
152
  _this.initialize(evt, target);
117
153
  }, this.tapHoldThreshold);
118
- EventHandler.add(document, Browser.isSafari() ? 'touchmove' : Browser.touchMoveEvent, this.removeTapholdTimer, this);
119
- EventHandler.add(document, Browser.isSafari() ? 'touchend' : Browser.touchEndEvent, this.removeTapholdTimer, this);
154
+ EventHandler.add(document, this.getDragEventName('move'), this.removeTapholdTimer, this);
155
+ EventHandler.add(document, this.getDragEventName('end'), this.removeTapholdTimer, this);
120
156
  };
121
157
  /* istanbul ignore next */
122
158
  Draggable.prototype.removeTapholdTimer = function () {
123
159
  clearTimeout(this.tapHoldTimer);
124
- EventHandler.remove(document, Browser.isSafari() ? 'touchmove' : Browser.touchMoveEvent, this.removeTapholdTimer);
125
- EventHandler.remove(document, Browser.isSafari() ? 'touchend' : Browser.touchEndEvent, this.removeTapholdTimer);
160
+ EventHandler.remove(document, this.getDragEventName('move'), this.removeTapholdTimer);
161
+ EventHandler.remove(document, this.getDragEventName('end'), this.removeTapholdTimer);
126
162
  };
127
163
  /* istanbul ignore next */
128
164
  Draggable.prototype.getScrollableParent = function (element, axis) {
@@ -166,6 +202,7 @@ var Draggable = /** @class */ (function (_super) {
166
202
  var horizontalScrollParent = this.getScrollableParent(this.element.parentNode, 'horizontal');
167
203
  };
168
204
  Draggable.prototype.initialize = function (evt, curTarget) {
205
+ this.isTouchInteraction = evt.pointerType === 'touch' || (evt.changedTouches && evt.changedTouches.length);
169
206
  this.currentStateTarget = evt.target;
170
207
  if (this.isDragStarted()) {
171
208
  return;
@@ -213,8 +250,8 @@ var Draggable = /** @class */ (function (_super) {
213
250
  this.intDragStart(evt);
214
251
  }
215
252
  else {
216
- EventHandler.add(document, Browser.isSafari() ? 'touchmove' : Browser.touchMoveEvent, this.intDragStart, this);
217
- EventHandler.add(document, Browser.isSafari() ? 'touchend' : Browser.touchEndEvent, this.intDestroy, this);
253
+ EventHandler.add(document, this.getDragEventName('move'), this.intDragStart, this);
254
+ EventHandler.add(document, this.getDragEventName('end'), this.intDestroy, this);
218
255
  }
219
256
  this.toggleEvents(true);
220
257
  if (evt.type !== 'touchstart' && this.isPreventSelect) {
@@ -313,8 +350,8 @@ var Draggable = /** @class */ (function (_super) {
313
350
  }
314
351
  this.dragElePosition = { top: pos.top, left: pos.left };
315
352
  setStyleAttribute(dragTargetElement, this.getDragPosition({ position: 'absolute', left: posValue.left, top: posValue.top }));
316
- EventHandler.remove(document, Browser.isSafari() ? 'touchmove' : Browser.touchMoveEvent, this.intDragStart);
317
- EventHandler.remove(document, Browser.isSafari() ? 'touchend' : Browser.touchEndEvent, this.intDestroy);
353
+ EventHandler.remove(document, this.getDragEventName('move'), this.intDragStart);
354
+ EventHandler.remove(document, this.getDragEventName('end'), this.intDestroy);
318
355
  if (!isBlazor()) {
319
356
  this.bindDragEvents(dragTargetElement);
320
357
  }
@@ -322,8 +359,8 @@ var Draggable = /** @class */ (function (_super) {
322
359
  };
323
360
  Draggable.prototype.bindDragEvents = function (dragTargetElement) {
324
361
  if (isVisible(dragTargetElement)) {
325
- EventHandler.add(document, Browser.isSafari() ? 'touchmove' : Browser.touchMoveEvent, this.intDrag, this);
326
- EventHandler.add(document, Browser.isSafari() ? 'touchend' : Browser.touchEndEvent, this.intDragStop, this);
362
+ EventHandler.add(document, this.getDragEventName('move'), this.intDrag, this);
363
+ EventHandler.add(document, this.getDragEventName('end'), this.intDragStop, this);
327
364
  this.setGlobalDroppables(false, this.element, dragTargetElement);
328
365
  }
329
366
  else {
@@ -666,10 +703,10 @@ var Draggable = /** @class */ (function (_super) {
666
703
  this.toggleEvents();
667
704
  document.body.classList.remove('e-prevent-select');
668
705
  this.element.setAttribute('aria-grabbed', 'false');
669
- EventHandler.remove(document, Browser.isSafari() ? 'touchmove' : Browser.touchMoveEvent, this.intDragStart);
670
- EventHandler.remove(document, Browser.isSafari() ? 'touchend' : Browser.touchEndEvent, this.intDragStop);
671
- EventHandler.remove(document, Browser.isSafari() ? 'touchend' : Browser.touchEndEvent, this.intDestroy);
672
- EventHandler.remove(document, Browser.isSafari() ? 'touchmove' : Browser.touchMoveEvent, this.intDrag);
706
+ EventHandler.remove(document, this.getDragEventName('move'), this.intDragStart);
707
+ EventHandler.remove(document, this.getDragEventName('end'), this.intDragStop);
708
+ EventHandler.remove(document, this.getDragEventName('end'), this.intDestroy);
709
+ EventHandler.remove(document, this.getDragEventName('move'), this.intDrag);
673
710
  if (this.isDragStarted()) {
674
711
  this.isDragStarted(true);
675
712
  }
@@ -1,4 +1,4 @@
1
- import { Base } from './base';
1
+ import { Base } from './base';import { Browser } from './browser';import { isVisible, matches } from './dom';import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';import { EventHandler } from './event-handler';import { compareElementParent } from './util';import {Coordinates, DropInfo} from './draggable';
2
2
  import {DropEventArgs} from "./droppable";
3
3
 
4
4
  /**
@@ -7,35 +7,35 @@ import {DropEventArgs} from "./droppable";
7
7
  export interface DroppableModel {
8
8
 
9
9
  /**
10
- * Defines the selector for draggable element to be accepted by the droppable.
11
- */
12
- accept?: string;
10
+ * Defines the selector for draggable element to be accepted by the droppable.
11
+ */
12
+ accept?: string;
13
13
 
14
14
  /**
15
- * Defines the scope value to group sets of draggable and droppable items.
16
- * A draggable with the same scope value will only be accepted by the droppable.
17
- */
18
- scope?: string;
15
+ * Defines the scope value to group sets of draggable and droppable items.
16
+ * A draggable with the same scope value will only be accepted by the droppable.
17
+ */
18
+ scope?: string;
19
19
 
20
20
  /**
21
- * Specifies the callback function, which will be triggered while drag element is dropped in droppable.
22
- *
23
- * @event drop
24
- */
25
- drop?: (args: DropEventArgs) => void;
21
+ * Specifies the callback function, which will be triggered while drag element is dropped in droppable.
22
+ *
23
+ * @event drop
24
+ */
25
+ drop?: (args: DropEventArgs) => void;
26
26
 
27
27
  /**
28
- * Specifies the callback function, which will be triggered while drag element is moved over droppable element.
29
- *
30
- * @event over
31
- */
32
- over?: Function;
28
+ * Specifies the callback function, which will be triggered while drag element is moved over droppable element.
29
+ *
30
+ * @event over
31
+ */
32
+ over?: Function;
33
33
 
34
34
  /**
35
- * Specifies the callback function, which will be triggered while drag element is moved out of droppable element.
36
- *
37
- * @event bind
38
- */
39
- out?: Function;
35
+ * Specifies the callback function, which will be triggered while drag element is moved out of droppable element.
36
+ *
37
+ * @event bind
38
+ */
39
+ out?: Function;
40
40
 
41
41
  }
package/src/droppable.js CHANGED
@@ -1,22 +1,22 @@
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
- };
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
20
  import { Base } from './base';
21
21
  import { Browser } from './browser';
22
22
  import { isVisible, matches } from './dom';