@syncfusion/ej2-base 24.2.7 → 25.1.35

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 (65) hide show
  1. package/CHANGELOG.md +0 -36
  2. package/bin/syncfusion-license.js +1 -1
  3. package/dist/ej2-base.min.js +2 -2
  4. package/dist/ej2-base.umd.min.js +2 -2
  5. package/dist/ej2-base.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-base.es2015.js +121 -52
  7. package/dist/es6/ej2-base.es2015.js.map +1 -1
  8. package/dist/es6/ej2-base.es5.js +114 -43
  9. package/dist/es6/ej2-base.es5.js.map +1 -1
  10. package/dist/global/ej2-base.min.js +2 -2
  11. package/dist/global/ej2-base.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/e2e/protractor.config.js +58 -1
  14. package/package.json +59 -8
  15. package/src/ajax.js +0 -1
  16. package/src/animation.d.ts +6 -6
  17. package/src/animation.js +6 -6
  18. package/src/base.d.ts +2 -1
  19. package/src/base.js +9 -7
  20. package/src/component.d.ts +9 -3
  21. package/src/component.js +33 -2
  22. package/src/draggable.d.ts +2 -0
  23. package/src/draggable.js +26 -10
  24. package/src/event-handler.js +2 -1
  25. package/src/intl/date-parser.js +1 -0
  26. package/src/intl/intl-base.js +0 -8
  27. package/src/intl/number-formatter.d.ts +3 -0
  28. package/src/intl/number-formatter.js +7 -7
  29. package/src/intl/number-parser.js +1 -0
  30. package/src/module-loader.d.ts +12 -0
  31. package/src/module-loader.js +11 -0
  32. package/src/notify-property-change.js +3 -2
  33. package/src/observer.js +2 -0
  34. package/src/sanitize-helper.js +5 -0
  35. package/src/template-engine.js +1 -0
  36. package/src/template.js +3 -2
  37. package/src/validate-lic.d.ts +1 -1
  38. package/src/validate-lic.js +7 -5
  39. package/styles/_bds-dark-definition.scss +15 -0
  40. package/styles/_bds-definition.scss +15 -0
  41. package/styles/bootstrap-dark.css +10 -1
  42. package/styles/bootstrap.css +10 -1
  43. package/styles/bootstrap4.css +10 -1
  44. package/styles/bootstrap5-dark.css +10 -1
  45. package/styles/bootstrap5.css +10 -1
  46. package/styles/definition/_bds-dark.scss +1178 -0
  47. package/styles/definition/_bds.scss +1458 -0
  48. package/styles/fabric-dark.css +10 -1
  49. package/styles/fabric.css +10 -1
  50. package/styles/fluent-dark.css +10 -1
  51. package/styles/fluent.css +10 -1
  52. package/styles/highcontrast-light.css +10 -1
  53. package/styles/highcontrast.css +10 -1
  54. package/styles/material-dark.css +10 -1
  55. package/styles/material.css +10 -1
  56. package/styles/material3-dark.css +10 -1
  57. package/styles/material3.css +10 -1
  58. package/styles/offline-theme/material-dark.css +10 -1
  59. package/styles/offline-theme/material.css +10 -1
  60. package/styles/offline-theme/tailwind-dark.css +10 -1
  61. package/styles/offline-theme/tailwind.css +10 -1
  62. package/styles/tailwind-dark.css +10 -1
  63. package/styles/tailwind.css +10 -1
  64. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -60
  65. package/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -42
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 24.2.7
3
+ * version : 25.1.35
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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
@@ -9,6 +9,7 @@ var isDashBoardReport = config['dashBoardReport'];
9
9
  var timeCal = {};
10
10
  var fs = require('fs');
11
11
  var enableW3c = '{W3cdisabled}';
12
+ const pixelmatch = require('pixelmatch');
12
13
  var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
13
14
  var reporter = new HtmlScreenshotReporter({
14
15
  dest: 'e2e_report/' + config.browsers[0],
@@ -36,7 +37,7 @@ exports.config = {
36
37
  framework: 'jasmine',
37
38
 
38
39
  jasmineNodeOpts: {
39
- defaultTimeoutInterval: 100000
40
+ defaultTimeoutInterval: 150000
40
41
  },
41
42
  multiCapabilities: [],
42
43
 
@@ -205,6 +206,62 @@ exports.config = {
205
206
  });
206
207
  }
207
208
 
209
+ browser.compareScreenWithPixelMatch = function (element, fileName, opt) {
210
+ var folderName = fileName;
211
+ var fArr = fileName.split('/');
212
+ if (fArr.length > 1) {
213
+ fArr.splice(-1, 1);
214
+ folderName = fArr.join('/')
215
+ createF(camelCase('e2e/expected/' + browser.pixDiff.browserName + '/' + folderName));
216
+ createF(camelCase('e2e/actual/' + browser.pixDiff.browserName + '/' + folderName));
217
+ }
218
+
219
+ var option = {
220
+ imageAPath: '/expected/' + browser.pixDiff.browserName + '/' + fileName, // Use file-path
221
+ imageBPath: '/actual/' + browser.pixDiff.browserName + '/' + fileName,
222
+ filter: ['grayScale'],
223
+ debug: true,
224
+ hideShift: true,
225
+ thresholdType: 'pixel',
226
+ threshold: 0.3
227
+ };
228
+ var doneFn = arguments[arguments.length - 1];
229
+ if (typeof opt === 'object' && Object.keys(opt).length) {
230
+ Object.assign(option, opt);
231
+ }
232
+ console.log(JSON.stringify(option));
233
+ browser.pixDiff.saveRegion(element, '/Actual/' + browser.pixDiff.browserName + '/' + fileName, option).then(() => {
234
+ var fPathName = path.resolve(__dirname, '../../../../' + camelCase('e2e/expected/' + browser.pixDiff.browserName + '/' + fileName) + '.png');
235
+ if (!fs.existsSync(fPathName) && fs.existsSync(fPathName.replace("Expected", "Actual"))) {
236
+ fs.copyFileSync(fPathName.replace("Expected", "Actual"), fPathName);
237
+ console.log('Expected Image Created : /expected/' + browser.pixDiff.browserName + '/' + fileName);
238
+ }
239
+ browser.saveCheckImagewithPixelMatch(element, fileName, option, doneFn);
240
+ });
241
+ }
242
+
243
+ browser.saveCheckImagewithPixelMatch = function (element, fileName, option, doneFn) {
244
+ var img1 = PNG.sync.read(fs.readFileSync('./e2e'+option.imageBPath+'.png'));
245
+ var img2 = PNG.sync.read(fs.readFileSync('./e2e'+option.imageAPath+'.png'));
246
+ var { width, height } = img1;
247
+ var diff = new PNG({ width, height });
248
+ var result = pixelmatch(img1.data, img2.data, diff.data, width, height, { threshold: option.threshold });
249
+ console.log('result --->\n', result);
250
+ if (result < 75) {
251
+ result = 5
252
+ } else if (result < 150){
253
+ result = 7;
254
+ fs.writeFileSync('./e2e' + option.imageAPath.replace('expected', 'diff') + '.png', PNG.sync.write(diff));
255
+ } else{
256
+ result = 1;
257
+ fs.writeFileSync('./e2e' + option.imageAPath.replace('expected', 'diff') + '.png', PNG.sync.write(diff));
258
+ }
259
+ expect(result).toEqual(5)
260
+ if (typeof doneFn === 'function') {
261
+ doneFn();
262
+ }
263
+ }
264
+
208
265
  browser.waitForEvent = function (id, moduleName, eventName) {
209
266
  return browser.executeAsyncScript(function (id, moduleName, eventName, callback) {
210
267
  var instances = document.getElementById(id).ej2_instances;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-base@*",
3
- "_id": "@syncfusion/ej2-base@24.2.5",
3
+ "_id": "@syncfusion/ej2-base@18.92.0",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-pJvhVF1l3TTUm0NfT9YwuXjMEgTP42tqnaKyzIelSGOMdPbr1n7ObO5X1DaUO7hwUi0YGdjv8sJag4sZofDkNQ==",
5
+ "_integrity": "sha512-duRt3JuBjQX0mQtd7LO8Q92GCEef3zrE9BF1cJlRRutTv15EdfhPMI72ND4cm6gMw9nMwDeAKA7pPbCcF+t4YQ==",
6
6
  "_location": "/@syncfusion/ej2-base",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -22,7 +22,9 @@
22
22
  "/@syncfusion/ej2-angular-barcode-generator",
23
23
  "/@syncfusion/ej2-angular-base",
24
24
  "/@syncfusion/ej2-angular-buttons",
25
+ "/@syncfusion/ej2-angular-calendars",
25
26
  "/@syncfusion/ej2-angular-charts",
27
+ "/@syncfusion/ej2-angular-circulargauge",
26
28
  "/@syncfusion/ej2-angular-diagrams",
27
29
  "/@syncfusion/ej2-angular-documenteditor",
28
30
  "/@syncfusion/ej2-angular-dropdowns",
@@ -30,13 +32,28 @@
30
32
  "/@syncfusion/ej2-angular-gantt",
31
33
  "/@syncfusion/ej2-angular-grids",
32
34
  "/@syncfusion/ej2-angular-heatmap",
35
+ "/@syncfusion/ej2-angular-image-editor",
33
36
  "/@syncfusion/ej2-angular-inplace-editor",
34
37
  "/@syncfusion/ej2-angular-inputs",
38
+ "/@syncfusion/ej2-angular-kanban",
39
+ "/@syncfusion/ej2-angular-layouts",
40
+ "/@syncfusion/ej2-angular-lineargauge",
41
+ "/@syncfusion/ej2-angular-lists",
42
+ "/@syncfusion/ej2-angular-maps",
43
+ "/@syncfusion/ej2-angular-navigations",
44
+ "/@syncfusion/ej2-angular-notifications",
35
45
  "/@syncfusion/ej2-angular-pdfviewer",
46
+ "/@syncfusion/ej2-angular-pivotview",
47
+ "/@syncfusion/ej2-angular-popups",
48
+ "/@syncfusion/ej2-angular-progressbar",
49
+ "/@syncfusion/ej2-angular-querybuilder",
50
+ "/@syncfusion/ej2-angular-ribbon",
36
51
  "/@syncfusion/ej2-angular-richtexteditor",
52
+ "/@syncfusion/ej2-angular-schedule",
37
53
  "/@syncfusion/ej2-angular-splitbuttons",
38
54
  "/@syncfusion/ej2-angular-spreadsheet",
39
55
  "/@syncfusion/ej2-angular-treegrid",
56
+ "/@syncfusion/ej2-angular-treemap",
40
57
  "/@syncfusion/ej2-barcode-generator",
41
58
  "/@syncfusion/ej2-buttons",
42
59
  "/@syncfusion/ej2-calendars",
@@ -71,7 +88,9 @@
71
88
  "/@syncfusion/ej2-react-barcode-generator",
72
89
  "/@syncfusion/ej2-react-base",
73
90
  "/@syncfusion/ej2-react-buttons",
91
+ "/@syncfusion/ej2-react-calendars",
74
92
  "/@syncfusion/ej2-react-charts",
93
+ "/@syncfusion/ej2-react-circulargauge",
75
94
  "/@syncfusion/ej2-react-diagrams",
76
95
  "/@syncfusion/ej2-react-documenteditor",
77
96
  "/@syncfusion/ej2-react-dropdowns",
@@ -79,13 +98,28 @@
79
98
  "/@syncfusion/ej2-react-gantt",
80
99
  "/@syncfusion/ej2-react-grids",
81
100
  "/@syncfusion/ej2-react-heatmap",
101
+ "/@syncfusion/ej2-react-image-editor",
82
102
  "/@syncfusion/ej2-react-inplace-editor",
83
103
  "/@syncfusion/ej2-react-inputs",
104
+ "/@syncfusion/ej2-react-kanban",
105
+ "/@syncfusion/ej2-react-layouts",
106
+ "/@syncfusion/ej2-react-lineargauge",
107
+ "/@syncfusion/ej2-react-lists",
108
+ "/@syncfusion/ej2-react-maps",
109
+ "/@syncfusion/ej2-react-navigations",
110
+ "/@syncfusion/ej2-react-notifications",
84
111
  "/@syncfusion/ej2-react-pdfviewer",
112
+ "/@syncfusion/ej2-react-pivotview",
113
+ "/@syncfusion/ej2-react-popups",
114
+ "/@syncfusion/ej2-react-progressbar",
115
+ "/@syncfusion/ej2-react-querybuilder",
116
+ "/@syncfusion/ej2-react-ribbon",
85
117
  "/@syncfusion/ej2-react-richtexteditor",
118
+ "/@syncfusion/ej2-react-schedule",
86
119
  "/@syncfusion/ej2-react-splitbuttons",
87
120
  "/@syncfusion/ej2-react-spreadsheet",
88
121
  "/@syncfusion/ej2-react-treegrid",
122
+ "/@syncfusion/ej2-react-treemap",
89
123
  "/@syncfusion/ej2-ribbon",
90
124
  "/@syncfusion/ej2-richtexteditor",
91
125
  "/@syncfusion/ej2-schedule",
@@ -97,7 +131,9 @@
97
131
  "/@syncfusion/ej2-vue-barcode-generator",
98
132
  "/@syncfusion/ej2-vue-base",
99
133
  "/@syncfusion/ej2-vue-buttons",
134
+ "/@syncfusion/ej2-vue-calendars",
100
135
  "/@syncfusion/ej2-vue-charts",
136
+ "/@syncfusion/ej2-vue-circulargauge",
101
137
  "/@syncfusion/ej2-vue-diagrams",
102
138
  "/@syncfusion/ej2-vue-documenteditor",
103
139
  "/@syncfusion/ej2-vue-dropdowns",
@@ -105,18 +141,33 @@
105
141
  "/@syncfusion/ej2-vue-gantt",
106
142
  "/@syncfusion/ej2-vue-grids",
107
143
  "/@syncfusion/ej2-vue-heatmap",
144
+ "/@syncfusion/ej2-vue-image-editor",
108
145
  "/@syncfusion/ej2-vue-inplace-editor",
109
146
  "/@syncfusion/ej2-vue-inputs",
147
+ "/@syncfusion/ej2-vue-kanban",
148
+ "/@syncfusion/ej2-vue-layouts",
149
+ "/@syncfusion/ej2-vue-lineargauge",
150
+ "/@syncfusion/ej2-vue-lists",
151
+ "/@syncfusion/ej2-vue-maps",
152
+ "/@syncfusion/ej2-vue-navigations",
153
+ "/@syncfusion/ej2-vue-notifications",
110
154
  "/@syncfusion/ej2-vue-pdfviewer",
155
+ "/@syncfusion/ej2-vue-pivotview",
156
+ "/@syncfusion/ej2-vue-popups",
157
+ "/@syncfusion/ej2-vue-progressbar",
158
+ "/@syncfusion/ej2-vue-querybuilder",
159
+ "/@syncfusion/ej2-vue-ribbon",
111
160
  "/@syncfusion/ej2-vue-richtexteditor",
161
+ "/@syncfusion/ej2-vue-schedule",
112
162
  "/@syncfusion/ej2-vue-splitbuttons",
113
163
  "/@syncfusion/ej2-vue-spreadsheet",
114
- "/@syncfusion/ej2-vue-treegrid"
164
+ "/@syncfusion/ej2-vue-treegrid",
165
+ "/@syncfusion/ej2-vue-treemap"
115
166
  ],
116
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-base/-/ej2-base-24.2.5.tgz",
117
- "_shasum": "4fee55353627b5a680cb389353938c62b9f518de",
167
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-base/-/ej2-base-18.92.0.tgz",
168
+ "_shasum": "1c8e5f13a7a0f742a83daa98db9cb3e577fb9702",
118
169
  "_spec": "@syncfusion/ej2-base@*",
119
- "_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
170
+ "_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
120
171
  "author": {
121
172
  "name": "Syncfusion Inc."
122
173
  },
@@ -128,7 +179,7 @@
128
179
  },
129
180
  "bundleDependencies": false,
130
181
  "dependencies": {
131
- "@syncfusion/ej2-icons": "~24.2.3"
182
+ "@syncfusion/ej2-icons": "~25.1.35"
132
183
  },
133
184
  "deprecated": false,
134
185
  "description": "A common package of Essential JS 2 base libraries, methods and class definitions",
@@ -169,6 +220,6 @@
169
220
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
170
221
  },
171
222
  "typings": "index.d.ts",
172
- "version": "24.2.7",
223
+ "version": "25.1.35",
173
224
  "sideEffects": true
174
225
  }
package/src/ajax.js CHANGED
@@ -86,7 +86,6 @@ var Ajax = /** @class */ (function () {
86
86
  if (!isNullOrUndefined(_this.onUploadProgress)) {
87
87
  _this.httpRequest.upload.onprogress = _this.onUploadProgress;
88
88
  }
89
- // eslint-disable-next-line
90
89
  _this.httpRequest.open(_this.type, _this.url, _this.mode);
91
90
  // Set default headers
92
91
  if (!isNullOrUndefined(_this.data) && _this.contentType !== null) {
@@ -212,15 +212,15 @@ export declare function setGlobalAnimation(value: string | GlobalAnimationMode):
212
212
  */
213
213
  export declare enum GlobalAnimationMode {
214
214
  /**
215
- * Defines the global animation mode as Default. Animation is enabled or disabled based on the component's animation settings.
216
- */
215
+ * Defines the global animation mode as Default. Animation is enabled or disabled based on the component's animation settings.
216
+ */
217
217
  Default = "Default",
218
218
  /**
219
- * Defines the global animation mode as Enable. Enables the animation for all components, regardless of the individual component's animation settings.
220
- */
219
+ * Defines the global animation mode as Enable. Enables the animation for all components, regardless of the individual component's animation settings.
220
+ */
221
221
  Enable = "Enable",
222
222
  /**
223
- * Defines the global animation mode as Disable. Disables the animation for all components, regardless of the individual component's animation settings.
224
- */
223
+ * Defines the global animation mode as Disable. Disables the animation for all components, regardless of the individual component's animation settings.
224
+ */
225
225
  Disable = "Disable"
226
226
  }
package/src/animation.js CHANGED
@@ -446,15 +446,15 @@ export function setGlobalAnimation(value) {
446
446
  export var GlobalAnimationMode;
447
447
  (function (GlobalAnimationMode) {
448
448
  /**
449
- * Defines the global animation mode as Default. Animation is enabled or disabled based on the component's animation settings.
450
- */
449
+ * Defines the global animation mode as Default. Animation is enabled or disabled based on the component's animation settings.
450
+ */
451
451
  GlobalAnimationMode["Default"] = "Default";
452
452
  /**
453
- * Defines the global animation mode as Enable. Enables the animation for all components, regardless of the individual component's animation settings.
454
- */
453
+ * Defines the global animation mode as Enable. Enables the animation for all components, regardless of the individual component's animation settings.
454
+ */
455
455
  GlobalAnimationMode["Enable"] = "Enable";
456
456
  /**
457
- * Defines the global animation mode as Disable. Disables the animation for all components, regardless of the individual component's animation settings.
458
- */
457
+ * Defines the global animation mode as Disable. Disables the animation for all components, regardless of the individual component's animation settings.
458
+ */
459
459
  GlobalAnimationMode["Disable"] = "Disable";
460
460
  })(GlobalAnimationMode || (GlobalAnimationMode = {}));
package/src/base.d.ts CHANGED
@@ -139,4 +139,5 @@ export declare function getComponent<T>(elem: HTMLElement | string, comp: string
139
139
  * @private
140
140
  */
141
141
  export declare function removeChildInstance(element: HTMLElement): void;
142
- export declare let proxyToRaw: Function, setProxyToRaw: (toRaw: Function) => void;
142
+ export declare let proxyToRaw: Function;
143
+ export declare const setProxyToRaw: Function;
package/src/base.js CHANGED
@@ -257,12 +257,13 @@ var Base = /** @class */ (function () {
257
257
  var _this = this;
258
258
  // eslint-disable-next-line
259
259
  this.element.ej2_instances =
260
- this.element.ej2_instances ? this.element.ej2_instances.filter(function (i) {
261
- if (proxyToRaw) {
262
- return proxyToRaw(i) !== proxyToRaw(_this);
263
- }
264
- return i !== _this;
265
- })
260
+ this.element.ej2_instances ?
261
+ this.element.ej2_instances.filter(function (i) {
262
+ if (proxyToRaw) {
263
+ return proxyToRaw(i) !== proxyToRaw(_this);
264
+ }
265
+ return i !== _this;
266
+ })
266
267
  : [];
267
268
  removeClass([this.element], ['e-' + this.getModuleName()]);
268
269
  if (this.element.ej2_instances.length === 0) {
@@ -325,4 +326,5 @@ export function removeChildInstance(element) {
325
326
  }
326
327
  }
327
328
  }
328
- export var proxyToRaw, setProxyToRaw = function (toRaw) { proxyToRaw = toRaw; };
329
+ export var proxyToRaw;
330
+ export var setProxyToRaw = function (toRaw) { proxyToRaw = toRaw; };
@@ -83,16 +83,22 @@ export declare abstract class Component<ElementType extends HTMLElement> extends
83
83
  getLocalData(): any;
84
84
  /**
85
85
  * Adding unload event to persist data when enable persistence true
86
+ *
87
+ * @returns {void}
86
88
  */
87
- attachUnloadEvent(): any;
89
+ attachUnloadEvent(): void;
88
90
  /**
89
91
  * Handling unload event to persist data when enable persistence true
92
+ *
93
+ * @returns {void}
90
94
  */
91
- handleUnload(): any;
95
+ handleUnload(): void;
92
96
  /**
93
97
  * Removing unload event to persist data when enable persistence true
98
+ *
99
+ * @returns {void}
94
100
  */
95
- detachUnloadEvent(): any;
101
+ detachUnloadEvent(): void;
96
102
  /**
97
103
  * Appends the control within the given HTML element
98
104
  *
package/src/component.js CHANGED
@@ -78,7 +78,7 @@ var Component = /** @class */ (function (_super) {
78
78
  // tslint:disable-next-line:no-function-constructor-with-string-args
79
79
  onIntlChange.on('notifyExternalChange', _this.detectFunction, _this, _this.randomId);
80
80
  // Based on the considered control list we have count the instance
81
- if (typeof window !== "undefined" && typeof document !== "undefined" && !validateLicense()) {
81
+ if (typeof window !== 'undefined' && typeof document !== 'undefined' && !validateLicense()) {
82
82
  if (componentList.indexOf(_this.getModuleName()) !== -1) {
83
83
  instancecount = instancecount + 1;
84
84
  if (instancecount > 5) {
@@ -169,6 +169,8 @@ var Component = /** @class */ (function (_super) {
169
169
  };
170
170
  /**
171
171
  * Adding unload event to persist data when enable persistence true
172
+ *
173
+ * @returns {void}
172
174
  */
173
175
  Component.prototype.attachUnloadEvent = function () {
174
176
  this.handleUnload = this.handleUnload.bind(this);
@@ -176,12 +178,16 @@ var Component = /** @class */ (function (_super) {
176
178
  };
177
179
  /**
178
180
  * Handling unload event to persist data when enable persistence true
181
+ *
182
+ * @returns {void}
179
183
  */
180
184
  Component.prototype.handleUnload = function () {
181
185
  this.setPersistData();
182
186
  };
183
187
  /**
184
188
  * Removing unload event to persist data when enable persistence true
189
+ *
190
+ * @returns {void}
185
191
  */
186
192
  Component.prototype.detachUnloadEvent = function () {
187
193
  window.removeEventListener('unload', this.handleUnload);
@@ -216,7 +222,32 @@ var Component = /** @class */ (function (_super) {
216
222
  }
217
223
  this.preRender();
218
224
  this.injectModules();
219
- // Checked weather cases are valid or not. If control leads to more than five counts
225
+ // Throw a warning for the required modules to be injected.
226
+ var ignoredComponents = {
227
+ schedule: 'all',
228
+ diagram: 'all',
229
+ PdfViewer: 'all',
230
+ grid: ['logger'],
231
+ richtexteditor: ['link', 'table', 'image', 'audio', 'video', 'formatPainter', 'emojiPicker', 'pasteCleanup', 'htmlEditor', 'toolbar'],
232
+ treegrid: ['filter'],
233
+ gantt: ['tooltip'],
234
+ chart: ['Export', 'Zoom'],
235
+ accumulationchart: ['Export']
236
+ };
237
+ var component = this.getModuleName();
238
+ if (this.requiredModules && (!ignoredComponents["" + component] || ignoredComponents["" + component] !== 'all')) {
239
+ var modulesRequired = this.requiredModules();
240
+ for (var _i = 0, _a = this.moduleLoader.getNonInjectedModules(modulesRequired); _i < _a.length; _i++) {
241
+ var module = _a[_i];
242
+ var moduleName = module.name ? module.name : module.member;
243
+ if (ignoredComponents["" + component] && ignoredComponents["" + component].indexOf(module.member) !== -1) {
244
+ continue;
245
+ }
246
+ var componentName = component.charAt(0).toUpperCase() + component.slice(1); // To capitalize the component name
247
+ console.warn("[WARNING] :: Module \"" + moduleName + "\" is not available in " + componentName + " component! You either misspelled the module name or forgot to load it.");
248
+ }
249
+ }
250
+ // Checked weather cases are valid or not. If control leads to more than five counts
220
251
  if (!isvalid && !isBannerAdded) {
221
252
  createLicenseOverlay();
222
253
  isBannerAdded = true;
@@ -361,6 +361,8 @@ export declare class Draggable extends Base<HTMLElement> implements INotifyPrope
361
361
  private getDocumentWidthHeight;
362
362
  private intDragStop;
363
363
  /**
364
+ * @param {MouseEvent | TouchEvent} evt ?
365
+ * @returns {void}
364
366
  * @private
365
367
  */
366
368
  intDestroy(evt: MouseEvent & TouchEvent): void;
package/src/draggable.js CHANGED
@@ -26,9 +26,6 @@ import { ChildProperty } from './child-property';
26
26
  import { select, closest, setStyleAttribute, addClass, createElement } from './dom';
27
27
  import { extend, isUndefined, isNullOrUndefined, compareElementParent, isBlazor } from './util';
28
28
  var defaultPosition = { left: 0, top: 0, bottom: 0, right: 0 };
29
- var positionProp = ['offsetLeft', 'offsetTop'];
30
- var axisMapper = ['x', 'y'];
31
- var axisValueMapper = ['left', 'top'];
32
29
  var isDraggedObject = { isDragged: false };
33
30
  /**
34
31
  * Specifies the position coordinates
@@ -161,6 +158,7 @@ var Draggable = /** @class */ (function (_super) {
161
158
  return this.getScrollableParent(element.parentNode, axis);
162
159
  }
163
160
  };
161
+ /* eslint-disable */
164
162
  Draggable.prototype.getScrollableValues = function () {
165
163
  this.parentScrollX = 0;
166
164
  this.parentScrollY = 0;
@@ -168,6 +166,7 @@ var Draggable = /** @class */ (function (_super) {
168
166
  var verticalScrollParent = this.getScrollableParent(this.element.parentNode, 'vertical');
169
167
  var horizontalScrollParent = this.getScrollableParent(this.element.parentNode, 'horizontal');
170
168
  };
169
+ /* eslint-enable */
171
170
  Draggable.prototype.initialize = function (evt, curTarget) {
172
171
  this.currentStateTarget = evt.target;
173
172
  if (this.isDragStarted()) {
@@ -181,6 +180,7 @@ var Draggable = /** @class */ (function (_super) {
181
180
  this.dragProcessStarted = false;
182
181
  if (this.abort) {
183
182
  /* tslint:disable no-any */
183
+ // eslint-disable-next-line
184
184
  var abortSelectors = this.abort;
185
185
  if (typeof abortSelectors === 'string') {
186
186
  abortSelectors = [abortSelectors];
@@ -251,6 +251,7 @@ var Draggable = /** @class */ (function (_super) {
251
251
  }
252
252
  /* istanbul ignore next */
253
253
  if (this.isReplaceDragEle) {
254
+ // eslint-disable-next-line
254
255
  element = this.currentStateCheck(evt.target, element);
255
256
  }
256
257
  this.offset = this.calculateParentPosition(element);
@@ -403,6 +404,7 @@ var Draggable = /** @class */ (function (_super) {
403
404
  }
404
405
  }
405
406
  if (flag) {
407
+ // eslint-disable-next-line
406
408
  eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
407
409
  eleObj.instance.intOver(evt, eleObj.target);
408
410
  this.hoverObject = eleObj;
@@ -552,6 +554,7 @@ var Draggable = /** @class */ (function (_super) {
552
554
  elements = this.getPathElements(evt);
553
555
  }
554
556
  /* tslint:disable no-any */
557
+ // eslint-disable-next-line
555
558
  var scrollParent = this.getScrollParent(elements, false);
556
559
  if (this.elementInViewport(this.helperElement)) {
557
560
  this.getScrollPosition(scrollParent, draEleTop);
@@ -574,8 +577,10 @@ var Draggable = /** @class */ (function (_super) {
574
577
  this.pageY = pagey;
575
578
  };
576
579
  /* tslint:disable no-any */
580
+ // eslint-disable-next-line
577
581
  Draggable.prototype.getScrollParent = function (node, reverse) {
578
582
  /* tslint:disable no-any */
583
+ // eslint-disable-next-line
579
584
  var nodeEl = reverse ? node.reverse() : node;
580
585
  var hasScroll;
581
586
  for (var i = nodeEl.length - 1; i >= 0; i--) {
@@ -602,10 +607,12 @@ var Draggable = /** @class */ (function (_super) {
602
607
  }
603
608
  }
604
609
  else if (nodeEle && nodeEle !== document.scrollingElement) {
605
- if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight + document.scrollingElement.scrollTop) < draEleTop) {
610
+ var docScrollTop = document.scrollingElement.scrollTop;
611
+ var helperClientHeight = this.helperElement.clientHeight;
612
+ if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - helperClientHeight + docScrollTop) < draEleTop) {
606
613
  nodeEle.scrollTop += this.helperElement.clientHeight;
607
614
  }
608
- else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight - document.scrollingElement.scrollTop)) {
615
+ else if (nodeEle.getBoundingClientRect().top > (draEleTop - helperClientHeight - docScrollTop)) {
609
616
  nodeEle.scrollTop -= this.helperElement.clientHeight;
610
617
  }
611
618
  }
@@ -657,6 +664,7 @@ var Draggable = /** @class */ (function (_super) {
657
664
  var eleObj = this.checkTargetElement(evt);
658
665
  if (eleObj.target && eleObj.instance) {
659
666
  eleObj.instance.dragStopCalled = true;
667
+ // eslint-disable-next-line
660
668
  eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
661
669
  eleObj.instance.intDrop(evt, eleObj.target);
662
670
  }
@@ -664,8 +672,11 @@ var Draggable = /** @class */ (function (_super) {
664
672
  document.body.classList.remove('e-prevent-select');
665
673
  };
666
674
  /**
675
+ * @param {MouseEvent | TouchEvent} evt ?
676
+ * @returns {void}
667
677
  * @private
668
678
  */
679
+ // eslint-disable-next-line
669
680
  Draggable.prototype.intDestroy = function (evt) {
670
681
  this.dragProcessStarted = false;
671
682
  this.toggleEvents();
@@ -680,6 +691,7 @@ var Draggable = /** @class */ (function (_super) {
680
691
  }
681
692
  };
682
693
  // triggers when property changed
694
+ // eslint-disable-next-line
683
695
  Draggable.prototype.onPropertyChanged = function (newProp, oldProp) {
684
696
  //No Code to handle
685
697
  };
@@ -710,6 +722,7 @@ var Draggable = /** @class */ (function (_super) {
710
722
  eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
711
723
  eleHeightBound = ele.scrollHeight ? (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
712
724
  var keys = ['Top', 'Left', 'Bottom', 'Right'];
725
+ /* eslint-disable */
713
726
  var styles = getComputedStyle(ele);
714
727
  for (var i = 0; i < keys.length; i++) {
715
728
  var key = keys[parseInt(i.toString(), 10)];
@@ -719,6 +732,7 @@ var Draggable = /** @class */ (function (_super) {
719
732
  this.borderWidth["" + lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
720
733
  this.padding["" + lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
721
734
  }
735
+ /* eslint-enable */
722
736
  if (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) {
723
737
  top = elementArea.top + document.scrollingElement.scrollTop;
724
738
  }
@@ -736,7 +750,7 @@ var Draggable = /** @class */ (function (_super) {
736
750
  var intCoord = this.getCoordinates(evt);
737
751
  var ele;
738
752
  var prevStyle = this.helperElement.style.pointerEvents || '';
739
- var isPointer = evt.type.indexOf('pointer') !== -1 && Browser.info.name === 'safari' && parseInt(Browser.info.version) > 12;
753
+ var isPointer = evt.type.indexOf('pointer') !== -1 && Browser.info.name === 'safari' && parseInt(Browser.info.version, 10) > 12;
740
754
  if (compareElementParent(evt.target, this.helperElement) || evt.type.indexOf('touch') !== -1 || isPointer) {
741
755
  this.helperElement.style.pointerEvents = 'none';
742
756
  ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
@@ -760,6 +774,7 @@ var Draggable = /** @class */ (function (_super) {
760
774
  };
761
775
  Draggable.prototype.getMousePosition = function (evt, isdragscroll) {
762
776
  /* tslint:disable no-any */
777
+ // eslint-disable-next-line
763
778
  var dragEle = evt.srcElement !== undefined ? evt.srcElement : evt.target;
764
779
  var intCoord = this.getCoordinates(evt);
765
780
  var pageX;
@@ -777,10 +792,11 @@ var Draggable = /** @class */ (function (_super) {
777
792
  pageY = this.clone ? intCoord.pageY : (intCoord.pageY + window.pageYOffset) - this.relativeYPosition;
778
793
  }
779
794
  if (document.scrollingElement && (!isdragscroll && !this.clone)) {
780
- var isVerticalScroll = document.scrollingElement.scrollHeight > 0 && document.scrollingElement.scrollHeight > document.scrollingElement.clientHeight && document.scrollingElement.scrollTop > 0;
781
- var isHorrizontalScroll = document.scrollingElement.scrollWidth > 0 && document.scrollingElement.scrollWidth > document.scrollingElement.clientWidth && document.scrollingElement.scrollLeft > 0;
782
- pageX = isHorrizontalScroll ? pageX - document.scrollingElement.scrollLeft : pageX;
783
- pageY = isVerticalScroll ? pageY - document.scrollingElement.scrollTop : pageY;
795
+ var ele = document.scrollingElement;
796
+ var isVerticalScroll = ele.scrollHeight > 0 && ele.scrollHeight > ele.clientHeight && ele.scrollTop > 0;
797
+ var isHorrizontalScroll = ele.scrollWidth > 0 && ele.scrollWidth > ele.clientWidth && ele.scrollLeft > 0;
798
+ pageX = isHorrizontalScroll ? pageX - ele.scrollLeft : pageX;
799
+ pageY = isVerticalScroll ? pageY - ele.scrollTop : pageY;
784
800
  }
785
801
  return {
786
802
  left: pageX - (this.margin.left + this.cursorAt.left),
@@ -115,7 +115,8 @@ 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[parseInt(i.toString(), 10)].name, copyData[parseInt(i.toString(), 10)].debounce);
118
+ var parseValue = copyData[parseInt(i.toString(), 10)];
119
+ element.removeEventListener(parseValue.name, parseValue.debounce);
119
120
  eventData.shift();
120
121
  }
121
122
  };
@@ -342,6 +342,7 @@ var DateParser = /** @class */ (function () {
342
342
  // eslint-disable-next-line
343
343
  matchString = ((prop === 'month') && (!parseOptions.isIslamic) && (parseOptions.culture === 'en' || parseOptions.culture === 'en-GB' || parseOptions.culture === 'en-US'))
344
344
  ? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
345
+ // eslint-disable-next-line
345
346
  matchString = ((prop !== 'month') && (prop === 'designator') && parseOptions.culture && parseOptions.culture.indexOf('en-') !== -1 && cultureOptions.indexOf(parseOptions.culture) === -1)
346
347
  ? matchString.toLowerCase() : matchString;
347
348
  // eslint-disable-next-line