@syncfusion/ej2-base 24.2.7 → 25.1.35-579988
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +2 -1
- package/CHANGELOG.md +641 -677
- package/{README.md → ReadMe.md} +100 -100
- package/dist/ej2-base.umd.min.js +1 -10
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +178 -1025
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +226 -934
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +1 -10
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/dist/ts/ajax.ts +236 -0
- package/dist/ts/animation.ts +544 -0
- package/dist/ts/base.ts +357 -0
- package/dist/ts/browser.ts +387 -0
- package/dist/ts/child-property.ts +192 -0
- package/dist/ts/component.ts +519 -0
- package/dist/ts/dom.ts +488 -0
- package/dist/ts/draggable.ts +1155 -0
- package/dist/ts/droppable.ts +172 -0
- package/dist/ts/event-handler.ts +169 -0
- package/dist/ts/internationalization.ts +369 -0
- package/dist/ts/intl/date-formatter.ts +317 -0
- package/dist/ts/intl/date-parser.ts +426 -0
- package/dist/ts/intl/intl-base.ts +1104 -0
- package/dist/ts/intl/number-formatter.ts +411 -0
- package/dist/ts/intl/number-parser.ts +158 -0
- package/dist/ts/intl/parser-base.ts +394 -0
- package/dist/ts/keyboard.ts +238 -0
- package/dist/ts/l10n.ts +94 -0
- package/dist/ts/module-loader.ts +149 -0
- package/dist/ts/notify-property-change.ts +726 -0
- package/dist/ts/observer.ts +236 -0
- package/dist/ts/sanitize-helper.ts +224 -0
- package/dist/ts/template-engine.ts +191 -0
- package/dist/ts/template.ts +329 -0
- package/dist/ts/touch.ts +544 -0
- package/dist/ts/util.ts +523 -0
- package/dist/ts/validate-lic.ts +0 -0
- package/e2e/crypto.js +16 -16
- package/e2e/m.protractor.config.js +286 -286
- package/e2e/modified-protractor/protractor.config.js +316 -316
- package/e2e/protractor.config.js +389 -332
- package/helpers/e2e/index.js +3 -3
- package/license +10 -10
- package/package.json +225 -174
- package/src/ajax.d.ts +1 -1
- package/src/ajax.js +3 -8
- package/src/animation-model.d.ts +41 -41
- package/src/animation.d.ts +6 -6
- package/src/animation.js +25 -25
- package/src/base.d.ts +2 -1
- package/src/base.js +9 -7
- package/src/component-model.d.ts +16 -16
- package/src/component.d.ts +9 -3
- package/src/component.js +50 -38
- package/src/draggable-model.d.ts +113 -113
- package/src/draggable.d.ts +2 -0
- package/src/draggable.js +45 -29
- package/src/droppable-model.d.ts +23 -23
- package/src/droppable.js +19 -19
- package/src/event-handler.js +2 -1
- package/src/index.d.ts +0 -3
- package/src/index.js +0 -3
- package/src/intl/date-formatter.js +2 -6
- package/src/intl/date-parser.js +1 -20
- package/src/intl/intl-base.js +1 -164
- package/src/intl/number-formatter.d.ts +3 -0
- package/src/intl/number-formatter.js +7 -7
- package/src/intl/number-parser.js +1 -0
- package/src/keyboard-model.d.ts +16 -16
- package/src/keyboard.js +19 -19
- package/src/module-loader.d.ts +12 -0
- package/src/module-loader.js +11 -0
- package/src/notify-property-change.js +3 -2
- package/src/observer.js +2 -0
- package/src/sanitize-helper.js +5 -0
- package/src/template-engine.js +1 -0
- package/src/template.js +3 -2
- package/src/touch-model.d.ts +39 -39
- package/src/touch.js +19 -19
- package/src/validate-lic.d.ts +0 -11
- package/src/validate-lic.js +1 -259
- package/styles/_all.scss +2 -2
- package/styles/_bds-dark-definition.scss +15 -0
- package/styles/_bds-definition.scss +15 -0
- package/styles/_bootstrap-dark-definition.scss +42 -42
- package/styles/_bootstrap-definition.scss +42 -42
- package/styles/_bootstrap4-definition.scss +11 -11
- package/styles/_bootstrap5-dark-definition.scss +9 -9
- package/styles/_bootstrap5-definition.scss +8 -8
- package/styles/_fabric-dark-definition.scss +42 -42
- package/styles/_fabric-definition.scss +42 -42
- package/styles/_fluent-dark-definition.scss +9 -9
- package/styles/_fluent-definition.scss +9 -9
- package/styles/_fluent2-definition.scss +9 -0
- package/styles/_fusionnew-dark-definition.scss +8 -8
- package/styles/_fusionnew-definition.scss +8 -8
- package/styles/_highcontrast-definition.scss +42 -42
- package/styles/_highcontrast-light-definition.scss +42 -42
- package/styles/_material-dark-definition.scss +48 -48
- package/styles/_material-definition.scss +49 -49
- package/styles/_material3-dark-definition.scss +14 -14
- package/styles/_material3-definition.scss +15 -15
- package/styles/_tailwind-dark-definition.scss +15 -15
- package/styles/_tailwind-definition.scss +15 -15
- package/styles/animation/_all.scss +560 -560
- package/styles/bootstrap-dark.css +10 -1
- package/styles/bootstrap.css +10 -1
- package/styles/bootstrap4.css +10 -1
- package/styles/bootstrap5-dark.css +10 -1
- package/styles/bootstrap5.css +10 -1
- package/styles/common/_all.scss +2 -2
- package/styles/common/_core.scss +117 -117
- package/styles/common/_mixin.scss +9 -9
- package/styles/definition/_bds-dark.scss +1179 -0
- package/styles/definition/_bds.scss +1474 -0
- package/styles/definition/_bootstrap-dark.scss +219 -219
- package/styles/definition/_bootstrap.scss +215 -215
- package/styles/definition/_bootstrap4.scss +167 -167
- package/styles/definition/_bootstrap5-dark.scss +493 -493
- package/styles/definition/_bootstrap5.scss +494 -494
- package/styles/definition/_fabric-dark.scss +200 -200
- package/styles/definition/_fabric.scss +198 -198
- package/styles/definition/_fluent-dark.scss +557 -557
- package/styles/definition/_fluent.scss +558 -558
- package/styles/definition/_fluent2.scss +2198 -0
- package/styles/definition/_fusionnew-dark.scss +362 -362
- package/styles/definition/_fusionnew.scss +363 -363
- package/styles/definition/_highcontrast-light.scss +193 -193
- package/styles/definition/_highcontrast.scss +195 -195
- package/styles/definition/_material-dark.scss +198 -198
- package/styles/definition/_material.scss +192 -192
- package/styles/definition/_material3-dark.scss +710 -710
- package/styles/definition/_material3.scss +792 -792
- package/styles/definition/_tailwind-dark.scss +488 -488
- package/styles/definition/_tailwind.scss +485 -485
- package/styles/fabric-dark.css +10 -1
- package/styles/fabric.css +10 -1
- package/styles/fluent-dark.css +10 -1
- package/styles/fluent.css +10 -1
- package/styles/highcontrast-light.css +10 -1
- package/styles/highcontrast.css +10 -1
- package/styles/material-dark.css +10 -1
- package/styles/material.css +10 -1
- package/styles/material3-dark.css +10 -1
- package/styles/material3.css +10 -1
- package/styles/offline-theme/material-dark.css +10 -1
- package/styles/offline-theme/material.css +10 -1
- package/styles/offline-theme/tailwind-dark.css +10 -1
- package/styles/offline-theme/tailwind.css +10 -1
- package/styles/tailwind-dark.css +10 -1
- package/styles/tailwind.css +10 -1
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -60
- package/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -42
- package/bin/syncfusion-license.js +0 -2
- package/dist/ej2-base.min.js +0 -10
- package/e2e/index.d.ts +0 -27
- package/src/fetch.d.ts +0 -114
- package/src/fetch.js +0 -116
- package/src/hijri-parser.d.ts +0 -19
- package/src/hijri-parser.js +0 -204
package/src/animation.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 { createElement, selectAll, closest } from './dom';
|
|
21
21
|
import { Base } from './base';
|
|
22
22
|
import { Browser } from './browser';
|
|
@@ -446,15 +446,15 @@ export function setGlobalAnimation(value) {
|
|
|
446
446
|
export var GlobalAnimationMode;
|
|
447
447
|
(function (GlobalAnimationMode) {
|
|
448
448
|
/**
|
|
449
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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 ?
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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
|
|
329
|
+
export var proxyToRaw;
|
|
330
|
+
export var setProxyToRaw = function (toRaw) { proxyToRaw = toRaw; };
|
package/src/component-model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor } from './util';
|
|
1
|
+
import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor } from './util';
|
|
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.d.ts
CHANGED
|
@@ -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():
|
|
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():
|
|
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():
|
|
101
|
+
detachUnloadEvent(): void;
|
|
96
102
|
/**
|
|
97
103
|
* Appends the control within the given HTML element
|
|
98
104
|
*
|
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
|
import { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor } from './util';
|
|
21
21
|
import { ModuleLoader } from './module-loader';
|
|
22
22
|
import { Base } from './base';
|
|
@@ -25,16 +25,9 @@ import { ChildProperty } from './child-property';
|
|
|
25
25
|
import { Property, NotifyPropertyChanges } from './notify-property-change';
|
|
26
26
|
import { onIntlChange, rightToLeft, defaultCulture } from './internationalization';
|
|
27
27
|
import { createElement, addClass, removeClass, select } from './dom';
|
|
28
|
-
import { validateLicense, createLicenseOverlay, componentList } from './validate-lic';
|
|
29
28
|
var componentCount = 0;
|
|
30
29
|
var lastPageID;
|
|
31
30
|
var lastHistoryLen = 0;
|
|
32
|
-
// Decalre the static variable to count the instance
|
|
33
|
-
var instancecount = 0;
|
|
34
|
-
// Decalre the static variable to find if control limit exceed or not
|
|
35
|
-
var isvalid = true;
|
|
36
|
-
// We have added styles to inline type so here declare the static variable to detect if banner is added or not
|
|
37
|
-
var isBannerAdded = false;
|
|
38
31
|
export var versionBasedStatePersistence = false;
|
|
39
32
|
/**
|
|
40
33
|
* To enable or disable version based statePersistence functionality for all components globally.
|
|
@@ -78,14 +71,6 @@ var Component = /** @class */ (function (_super) {
|
|
|
78
71
|
// tslint:disable-next-line:no-function-constructor-with-string-args
|
|
79
72
|
onIntlChange.on('notifyExternalChange', _this.detectFunction, _this, _this.randomId);
|
|
80
73
|
// Based on the considered control list we have count the instance
|
|
81
|
-
if (typeof window !== "undefined" && typeof document !== "undefined" && !validateLicense()) {
|
|
82
|
-
if (componentList.indexOf(_this.getModuleName()) !== -1) {
|
|
83
|
-
instancecount = instancecount + 1;
|
|
84
|
-
if (instancecount > 5) {
|
|
85
|
-
isvalid = false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
74
|
if (!isUndefined(selector)) {
|
|
90
75
|
_this.appendTo();
|
|
91
76
|
}
|
|
@@ -169,6 +154,8 @@ var Component = /** @class */ (function (_super) {
|
|
|
169
154
|
};
|
|
170
155
|
/**
|
|
171
156
|
* Adding unload event to persist data when enable persistence true
|
|
157
|
+
*
|
|
158
|
+
* @returns {void}
|
|
172
159
|
*/
|
|
173
160
|
Component.prototype.attachUnloadEvent = function () {
|
|
174
161
|
this.handleUnload = this.handleUnload.bind(this);
|
|
@@ -176,12 +163,16 @@ var Component = /** @class */ (function (_super) {
|
|
|
176
163
|
};
|
|
177
164
|
/**
|
|
178
165
|
* Handling unload event to persist data when enable persistence true
|
|
166
|
+
*
|
|
167
|
+
* @returns {void}
|
|
179
168
|
*/
|
|
180
169
|
Component.prototype.handleUnload = function () {
|
|
181
170
|
this.setPersistData();
|
|
182
171
|
};
|
|
183
172
|
/**
|
|
184
173
|
* Removing unload event to persist data when enable persistence true
|
|
174
|
+
*
|
|
175
|
+
* @returns {void}
|
|
185
176
|
*/
|
|
186
177
|
Component.prototype.detachUnloadEvent = function () {
|
|
187
178
|
window.removeEventListener('unload', this.handleUnload);
|
|
@@ -216,11 +207,32 @@ var Component = /** @class */ (function (_super) {
|
|
|
216
207
|
}
|
|
217
208
|
this.preRender();
|
|
218
209
|
this.injectModules();
|
|
219
|
-
//
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
210
|
+
// Throw a warning for the required modules to be injected.
|
|
211
|
+
var ignoredComponents = {
|
|
212
|
+
schedule: 'all',
|
|
213
|
+
diagram: 'all',
|
|
214
|
+
PdfViewer: 'all',
|
|
215
|
+
grid: ['logger'],
|
|
216
|
+
richtexteditor: ['link', 'table', 'image', 'audio', 'video', 'formatPainter', 'emojiPicker', 'pasteCleanup', 'htmlEditor', 'toolbar'],
|
|
217
|
+
treegrid: ['filter'],
|
|
218
|
+
gantt: ['tooltip'],
|
|
219
|
+
chart: ['Export', 'Zoom'],
|
|
220
|
+
accumulationchart: ['Export']
|
|
221
|
+
};
|
|
222
|
+
var component = this.getModuleName();
|
|
223
|
+
if (this.requiredModules && (!ignoredComponents["" + component] || ignoredComponents["" + component] !== 'all')) {
|
|
224
|
+
var modulesRequired = this.requiredModules();
|
|
225
|
+
for (var _i = 0, _a = this.moduleLoader.getNonInjectedModules(modulesRequired); _i < _a.length; _i++) {
|
|
226
|
+
var module = _a[_i];
|
|
227
|
+
var moduleName = module.name ? module.name : module.member;
|
|
228
|
+
if (ignoredComponents["" + component] && ignoredComponents["" + component].indexOf(module.member) !== -1) {
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
var componentName = component.charAt(0).toUpperCase() + component.slice(1); // To capitalize the component name
|
|
232
|
+
console.warn("[WARNING] :: Module \"" + moduleName + "\" is not available in " + componentName + " component! You either misspelled the module name or forgot to load it.");
|
|
233
|
+
}
|
|
223
234
|
}
|
|
235
|
+
// Checked weather cases are valid or not. If control leads to more than five counts
|
|
224
236
|
this.render();
|
|
225
237
|
if (!this.mount) {
|
|
226
238
|
this.trigger('created');
|
package/src/draggable-model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Base } from './base';
|
|
1
|
+
import { Base } from './base';
|
|
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.d.ts
CHANGED
|
@@ -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;
|