@syncfusion/ej2-base 19.2.57 → 19.3.53
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 +1 -1
- package/CHANGELOG.md +2 -90
- package/{ReadMe.md → README.md} +1 -1
- package/dist/ej2-base.umd.min.js +10 -1
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +2650 -2401
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +3186 -2948
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +10 -1
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/e2e/crypto.js +1 -1
- package/e2e/index.d.ts +0 -3
- package/e2e/m.protractor.config.js +1 -1
- package/e2e/protractor.config.js +1 -1
- package/helpers/e2e/base.js +3 -3
- package/package.json +212 -212
- package/src/ajax.d.ts +24 -10
- package/src/ajax.js +14 -6
- package/src/animation-model.d.ts +12 -4
- package/src/animation.d.ts +37 -12
- package/src/animation.js +48 -22
- package/src/base.d.ts +31 -11
- package/src/base.js +34 -16
- package/src/browser.d.ts +63 -25
- package/src/browser.js +60 -15
- package/src/child-property.d.ts +21 -10
- package/src/child-property.js +23 -13
- package/src/component-model.d.ts +4 -1
- package/src/component.d.ts +42 -5
- package/src/component.js +52 -35
- package/src/dom.d.ts +76 -25
- package/src/dom.js +126 -121
- package/src/draggable-model.d.ts +5 -0
- package/src/draggable.d.ts +4 -1
- package/src/draggable.js +8 -2
- package/src/droppable-model.d.ts +7 -4
- package/src/droppable.d.ts +7 -3
- package/src/droppable.js +1 -0
- package/src/event-handler.d.ts +10 -6
- package/src/event-handler.js +11 -7
- package/src/hijri-parser.d.ts +12 -0
- package/src/hijri-parser.js +111 -90
- package/src/internationalization.d.ts +54 -21
- package/src/internationalization.js +55 -18
- package/src/intl/date-formatter.d.ts +19 -8
- package/src/intl/date-formatter.js +36 -13
- package/src/intl/date-parser.d.ts +30 -23
- package/src/intl/date-parser.js +61 -42
- package/src/intl/intl-base.d.ts +123 -46
- package/src/intl/intl-base.js +451 -377
- package/src/intl/number-formatter.d.ts +45 -34
- package/src/intl/number-formatter.js +47 -35
- package/src/intl/number-parser.d.ts +11 -8
- package/src/intl/number-parser.js +13 -11
- package/src/intl/parser-base.d.ts +38 -13
- package/src/intl/parser-base.js +45 -16
- package/src/keyboard-model.d.ts +5 -2
- package/src/keyboard.d.ts +26 -8
- package/src/keyboard.js +24 -9
- package/src/l10n.d.ts +16 -7
- package/src/l10n.js +16 -7
- package/src/module-loader.d.ts +13 -8
- package/src/module-loader.js +13 -9
- package/src/notify-property-change.d.ts +19 -7
- package/src/notify-property-change.js +140 -24
- package/src/observer.d.ts +17 -5
- package/src/observer.js +19 -7
- package/src/sanitize-helper.d.ts +1 -0
- package/src/sanitize-helper.js +1 -1
- package/src/template-engine.d.ts +30 -4
- package/src/template-engine.js +37 -12
- package/src/template.d.ts +8 -3
- package/src/template.js +67 -19
- package/src/touch-model.d.ts +11 -4
- package/src/touch.d.ts +51 -9
- package/src/touch.js +45 -13
- package/src/util.d.ts +67 -37
- package/src/util.js +99 -49
- package/styles/_bootstrap-definition.scss +0 -1
- package/styles/_bootstrap5-dark-definition.scss +10 -0
- package/styles/_bootstrap5-definition.scss +9 -0
- package/styles/_fabric-dark-definition.scss +0 -1
- package/styles/_highcontrast-light-definition.scss +1 -0
- package/styles/_material-definition.scss +1 -0
- package/styles/bootstrap-dark.css +2613 -32
- package/styles/bootstrap.css +2613 -32
- package/styles/bootstrap4.css +2149 -32
- package/styles/bootstrap5-dark.css +2161 -0
- package/styles/bootstrap5-dark.scss +3 -0
- package/styles/bootstrap5.css +2161 -0
- package/styles/bootstrap5.scss +3 -0
- package/styles/common/_core.scss +28 -63
- package/styles/definition/_bootstrap-dark.scss +3 -3
- package/styles/definition/_bootstrap.scss +1 -1
- package/styles/definition/_bootstrap5-dark.scss +357 -0
- package/styles/definition/_bootstrap5.scss +356 -0
- package/styles/definition/_material-dark.scss +1 -1
- package/styles/definition/_tailwind-dark.scss +18 -1
- package/styles/definition/_tailwind.scss +17 -0
- package/styles/fabric-dark.css +2589 -32
- package/styles/fabric.css +2589 -32
- package/styles/highcontrast-light.css +2573 -32
- package/styles/highcontrast.css +2573 -32
- package/styles/material-dark.css +2549 -32
- package/styles/material.css +2549 -32
- package/styles/tailwind-dark.css +2221 -32
- package/styles/tailwind.css +2221 -32
- package/src/virtual-dom.d.ts +0 -32
- package/src/virtual-dom.js +0 -449
package/src/child-property.js
CHANGED
|
@@ -2,6 +2,7 @@ import { getValue, setValue, merge, isBlazor } from './util';
|
|
|
2
2
|
import { Base } from './base';
|
|
3
3
|
/**
|
|
4
4
|
* To detect the changes for inner properties.
|
|
5
|
+
*
|
|
5
6
|
* @private
|
|
6
7
|
*/
|
|
7
8
|
var ChildProperty = /** @class */ (function () {
|
|
@@ -11,7 +12,7 @@ var ChildProperty = /** @class */ (function () {
|
|
|
11
12
|
this.changedProperties = {};
|
|
12
13
|
this.childChangedProperties = {};
|
|
13
14
|
this.oldProperties = {};
|
|
14
|
-
//
|
|
15
|
+
// eslint-disable-next-line
|
|
15
16
|
this.finalUpdate = function () { };
|
|
16
17
|
this.callChildDataBind = getValue('callChildDataBind', Base);
|
|
17
18
|
this.parentObj = parent;
|
|
@@ -22,9 +23,10 @@ var ChildProperty = /** @class */ (function () {
|
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Updates the property changes
|
|
25
|
-
*
|
|
26
|
-
* @param {
|
|
27
|
-
* @
|
|
26
|
+
*
|
|
27
|
+
* @param {boolean} val ?
|
|
28
|
+
* @param {string} propName ?
|
|
29
|
+
* @returns {void} ?
|
|
28
30
|
*/
|
|
29
31
|
ChildProperty.prototype.updateChange = function (val, propName) {
|
|
30
32
|
if (val === true) {
|
|
@@ -39,6 +41,8 @@ var ChildProperty = /** @class */ (function () {
|
|
|
39
41
|
};
|
|
40
42
|
/**
|
|
41
43
|
* Updates time out duration
|
|
44
|
+
*
|
|
45
|
+
* @returns {void} ?
|
|
42
46
|
*/
|
|
43
47
|
ChildProperty.prototype.updateTimeOut = function () {
|
|
44
48
|
if (this.parentObj.updateTimeOut) {
|
|
@@ -55,6 +59,8 @@ var ChildProperty = /** @class */ (function () {
|
|
|
55
59
|
};
|
|
56
60
|
/**
|
|
57
61
|
* Clears changed properties
|
|
62
|
+
*
|
|
63
|
+
* @returns {void} ?
|
|
58
64
|
*/
|
|
59
65
|
ChildProperty.prototype.clearChanges = function () {
|
|
60
66
|
this.finalUpdate();
|
|
@@ -64,9 +70,10 @@ var ChildProperty = /** @class */ (function () {
|
|
|
64
70
|
};
|
|
65
71
|
/**
|
|
66
72
|
* Set property changes
|
|
67
|
-
*
|
|
68
|
-
* @param {
|
|
69
|
-
* {
|
|
73
|
+
*
|
|
74
|
+
* @param {Object} prop ?
|
|
75
|
+
* @param {boolean} muteOnChange ?
|
|
76
|
+
* @returns {void} ?
|
|
70
77
|
*/
|
|
71
78
|
ChildProperty.prototype.setProperties = function (prop, muteOnChange) {
|
|
72
79
|
if (muteOnChange === true) {
|
|
@@ -80,6 +87,8 @@ var ChildProperty = /** @class */ (function () {
|
|
|
80
87
|
};
|
|
81
88
|
/**
|
|
82
89
|
* Binds data
|
|
90
|
+
*
|
|
91
|
+
* @returns {void} ?
|
|
83
92
|
*/
|
|
84
93
|
ChildProperty.prototype.dataBind = function () {
|
|
85
94
|
this.callChildDataBind(this.childChangedProperties, this);
|
|
@@ -98,10 +107,12 @@ var ChildProperty = /** @class */ (function () {
|
|
|
98
107
|
};
|
|
99
108
|
/**
|
|
100
109
|
* Saves changes to newer values
|
|
101
|
-
*
|
|
102
|
-
* @param {
|
|
103
|
-
* @param {Object}
|
|
104
|
-
* @
|
|
110
|
+
*
|
|
111
|
+
* @param {string} key ?
|
|
112
|
+
* @param {Object} newValue ?
|
|
113
|
+
* @param {Object} oldValue ?
|
|
114
|
+
* @param {boolean} restrictServerDataBind ?
|
|
115
|
+
* @returns {void} ?
|
|
105
116
|
*/
|
|
106
117
|
ChildProperty.prototype.saveChanges = function (key, newValue, oldValue, restrictServerDataBind) {
|
|
107
118
|
if (this.controlParent.isProtectedOnChange) {
|
|
@@ -118,7 +129,6 @@ var ChildProperty = /** @class */ (function () {
|
|
|
118
129
|
};
|
|
119
130
|
ChildProperty.prototype.serverDataBind = function (key, value, isSaveChanges, action) {
|
|
120
131
|
if (isBlazor() && !this.parentObj.isComplexArraySetter) {
|
|
121
|
-
// tslint:disable-next-line:no-any
|
|
122
132
|
var parent_1;
|
|
123
133
|
var newChanges = {};
|
|
124
134
|
var parentKey = isSaveChanges ? this.getParentKey(true) + '.' + key : key;
|
|
@@ -146,7 +156,7 @@ var ChildProperty = /** @class */ (function () {
|
|
|
146
156
|
}
|
|
147
157
|
};
|
|
148
158
|
ChildProperty.prototype.getParentKey = function (isSaveChanges) {
|
|
149
|
-
//
|
|
159
|
+
// eslint-disable-next-line
|
|
150
160
|
var index = '';
|
|
151
161
|
var propName = this.propName;
|
|
152
162
|
/* istanbul ignore next */
|
package/src/component-model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
|
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';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Interface for a class Component
|
|
@@ -7,18 +7,21 @@ export interface ComponentModel {
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Enable or disable persisting component's state between page reloads.
|
|
10
|
+
*
|
|
10
11
|
* @default false
|
|
11
12
|
*/
|
|
12
13
|
enablePersistence?: boolean;
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Enable or disable rendering component in right to left direction.
|
|
17
|
+
*
|
|
16
18
|
* @default false
|
|
17
19
|
*/
|
|
18
20
|
enableRtl?: boolean;
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
|
|
24
|
+
*
|
|
22
25
|
* @default ''
|
|
23
26
|
*/
|
|
24
27
|
locale?: string;
|
package/src/component.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ElementProperties } from './dom';
|
|
|
5
5
|
export declare let versionBasedStatePersistence: boolean;
|
|
6
6
|
/**
|
|
7
7
|
* To enable or disable version based statePersistence functionality for all components globally.
|
|
8
|
+
*
|
|
8
9
|
* @param {boolean} status - Optional argument Specifies the status value to enable or disable versionBasedStatePersistence option.
|
|
9
10
|
* @returns {void}
|
|
10
11
|
*/
|
|
@@ -18,21 +19,25 @@ export declare abstract class Component<ElementType extends HTMLElement> extends
|
|
|
18
19
|
ej2StatePersistenceVersion: string;
|
|
19
20
|
/**
|
|
20
21
|
* Enable or disable persisting component's state between page reloads.
|
|
22
|
+
*
|
|
21
23
|
* @default false
|
|
22
24
|
*/
|
|
23
25
|
enablePersistence: boolean;
|
|
24
26
|
/**
|
|
25
27
|
* Enable or disable rendering component in right to left direction.
|
|
28
|
+
*
|
|
26
29
|
* @default false
|
|
27
30
|
*/
|
|
28
31
|
enableRtl: boolean;
|
|
29
32
|
/**
|
|
30
33
|
* Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
|
|
34
|
+
*
|
|
31
35
|
* @default ''
|
|
32
36
|
*/
|
|
33
37
|
locale: string;
|
|
34
38
|
/**
|
|
35
39
|
* string template option for Blazor template rendering
|
|
40
|
+
*
|
|
36
41
|
* @private
|
|
37
42
|
*/
|
|
38
43
|
isStringTemplate: boolean;
|
|
@@ -52,82 +57,114 @@ export declare abstract class Component<ElementType extends HTMLElement> extends
|
|
|
52
57
|
protected requiredModules(): ModuleDeclaration[];
|
|
53
58
|
/**
|
|
54
59
|
* Destroys the sub modules while destroying the widget
|
|
60
|
+
*
|
|
61
|
+
* @returns {void} ?
|
|
55
62
|
*/
|
|
56
63
|
protected destroy(): void;
|
|
57
64
|
/**
|
|
58
65
|
* Applies all the pending property changes and render the component again.
|
|
66
|
+
*
|
|
67
|
+
* @returns {void} ?
|
|
59
68
|
*/
|
|
60
69
|
refresh(): void;
|
|
61
70
|
private accessMount;
|
|
62
71
|
/**
|
|
63
72
|
* Returns the route element of the component
|
|
73
|
+
*
|
|
74
|
+
* @returns {HTMLElement} ?
|
|
64
75
|
*/
|
|
65
76
|
getRootElement(): HTMLElement;
|
|
66
77
|
/**
|
|
67
78
|
* Returns the persistence data for component
|
|
79
|
+
*
|
|
80
|
+
* @returns {any} ?
|
|
68
81
|
*/
|
|
69
82
|
getLocalData(): any;
|
|
70
83
|
/**
|
|
71
84
|
* Appends the control within the given HTML element
|
|
85
|
+
*
|
|
72
86
|
* @param {string | HTMLElement} selector - Target element where control needs to be appended
|
|
87
|
+
* @returns {void} ?
|
|
73
88
|
*/
|
|
74
89
|
appendTo(selector?: string | HTMLElement): void;
|
|
75
90
|
/**
|
|
76
91
|
* It is used to process the post rendering functionalities to a component.
|
|
92
|
+
*
|
|
93
|
+
* @param {Node} wrapperElement ?
|
|
94
|
+
* @returns {void} ?
|
|
77
95
|
*/
|
|
78
96
|
protected renderComplete(wrapperElement?: Node): void;
|
|
79
97
|
/**
|
|
80
98
|
* When invoked, applies the pending property changes immediately to the component.
|
|
99
|
+
*
|
|
100
|
+
* @returns {void} ?
|
|
81
101
|
*/
|
|
82
102
|
dataBind(): void;
|
|
83
103
|
/**
|
|
84
104
|
* Attach one or more event handler to the current component context.
|
|
85
105
|
* It is used for internal handling event internally within the component only.
|
|
106
|
+
*
|
|
86
107
|
* @param {BoundOptions[]| string} event - It is optional type either to Set the collection of event list or the eventName.
|
|
87
108
|
* @param {Function} handler - optional parameter Specifies the handler to run when the event occurs
|
|
88
109
|
* @param {Object} context - optional parameter Specifies the context to be bind in the handler.
|
|
89
|
-
* @
|
|
110
|
+
* @returns {void} ?
|
|
90
111
|
* @private
|
|
91
112
|
*/
|
|
92
113
|
on(event: BoundOptions[] | string, handler?: Function, context?: Object): void;
|
|
93
114
|
/**
|
|
94
115
|
* To remove one or more event handler that has been attached with the on() method.
|
|
116
|
+
*
|
|
95
117
|
* @param {BoundOptions[]| string} event - It is optional type either to Set the collection of event list or the eventName.
|
|
96
118
|
* @param {Function} handler - optional parameter Specifies the function to run when the event occurs
|
|
97
|
-
* @
|
|
119
|
+
* @returns {void} ?
|
|
98
120
|
* @private
|
|
99
121
|
*/
|
|
100
122
|
off(event: BoundOptions[] | string, handler?: Function): void;
|
|
101
123
|
/**
|
|
102
124
|
* To notify the handlers in the specified event.
|
|
125
|
+
*
|
|
103
126
|
* @param {string} property - Specifies the event to be notify.
|
|
104
127
|
* @param {Object} argument - Additional parameters to pass while calling the handler.
|
|
105
|
-
* @
|
|
128
|
+
* @returns {void} ?
|
|
106
129
|
* @private
|
|
107
130
|
*/
|
|
108
131
|
notify(property: string, argument: Object): void;
|
|
109
132
|
/**
|
|
110
133
|
* Get injected modules
|
|
134
|
+
*
|
|
135
|
+
* @returns {Function} ?
|
|
111
136
|
* @private
|
|
112
137
|
*/
|
|
113
138
|
getInjectedModules(): Function[];
|
|
114
139
|
/**
|
|
115
140
|
* Dynamically injects the required modules to the component.
|
|
141
|
+
*
|
|
142
|
+
* @param {Function} moduleList ?
|
|
143
|
+
* @returns {void} ?
|
|
116
144
|
*/
|
|
117
145
|
static Inject(...moduleList: Function[]): void;
|
|
118
146
|
/**
|
|
119
147
|
* Initialize the constructor for component base
|
|
148
|
+
*
|
|
149
|
+
* @param {Object} options ?
|
|
150
|
+
* @param {string} selector ?
|
|
120
151
|
*/
|
|
121
152
|
constructor(options?: Object, selector?: string | ElementType);
|
|
122
153
|
/**
|
|
123
154
|
* This is a instance method to create an element.
|
|
155
|
+
*
|
|
156
|
+
* @param {string} tagName ?
|
|
157
|
+
* @param {ElementProperties} prop ?
|
|
158
|
+
* @param {boolean} isVDOM ?
|
|
159
|
+
* @returns {any} ?
|
|
124
160
|
* @private
|
|
125
161
|
*/
|
|
126
162
|
createElement(tagName: string, prop?: ElementProperties, isVDOM?: boolean): any;
|
|
127
163
|
/**
|
|
128
164
|
*
|
|
129
|
-
* @param handler - handler to be triggered after state Updated.
|
|
130
|
-
* @param argument - Arguments to be passed to caller.
|
|
165
|
+
* @param {Function} handler - handler to be triggered after state Updated.
|
|
166
|
+
* @param {any} argument - Arguments to be passed to caller.
|
|
167
|
+
* @returns {void} .
|
|
131
168
|
* @private
|
|
132
169
|
*/
|
|
133
170
|
triggerStateChange(handler?: Function, argument?: any): void;
|
package/src/component.js
CHANGED
|
@@ -25,18 +25,16 @@ 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 { VirtualDOM } from './virtual-dom';
|
|
29
|
-
import { getRandomId } from './template-engine';
|
|
30
28
|
var componentCount = 0;
|
|
31
29
|
var lastPageID;
|
|
32
30
|
var lastHistoryLen = 0;
|
|
33
31
|
export var versionBasedStatePersistence = false;
|
|
34
32
|
/**
|
|
35
33
|
* To enable or disable version based statePersistence functionality for all components globally.
|
|
34
|
+
*
|
|
36
35
|
* @param {boolean} status - Optional argument Specifies the status value to enable or disable versionBasedStatePersistence option.
|
|
37
36
|
* @returns {void}
|
|
38
37
|
*/
|
|
39
|
-
/* istanbul ignore next */
|
|
40
38
|
export function enableVersionBasedPersistence(status) {
|
|
41
39
|
versionBasedStatePersistence = status;
|
|
42
40
|
}
|
|
@@ -47,12 +45,16 @@ var Component = /** @class */ (function (_super) {
|
|
|
47
45
|
__extends(Component, _super);
|
|
48
46
|
/**
|
|
49
47
|
* Initialize the constructor for component base
|
|
48
|
+
*
|
|
49
|
+
* @param {Object} options ?
|
|
50
|
+
* @param {string} selector ?
|
|
50
51
|
*/
|
|
51
52
|
function Component(options, selector) {
|
|
52
53
|
var _this = _super.call(this, options, selector) || this;
|
|
53
54
|
_this.randomId = uniqueID();
|
|
54
55
|
/**
|
|
55
56
|
* string template option for Blazor template rendering
|
|
57
|
+
*
|
|
56
58
|
* @private
|
|
57
59
|
*/
|
|
58
60
|
_this.isStringTemplate = false;
|
|
@@ -76,9 +78,10 @@ var Component = /** @class */ (function (_super) {
|
|
|
76
78
|
Component.prototype.requiredModules = function () {
|
|
77
79
|
return [];
|
|
78
80
|
};
|
|
79
|
-
;
|
|
80
81
|
/**
|
|
81
82
|
* Destroys the sub modules while destroying the widget
|
|
83
|
+
*
|
|
84
|
+
* @returns {void} ?
|
|
82
85
|
*/
|
|
83
86
|
Component.prototype.destroy = function () {
|
|
84
87
|
if (this.isDestroyed) {
|
|
@@ -99,6 +102,8 @@ var Component = /** @class */ (function (_super) {
|
|
|
99
102
|
};
|
|
100
103
|
/**
|
|
101
104
|
* Applies all the pending property changes and render the component again.
|
|
105
|
+
*
|
|
106
|
+
* @returns {void} ?
|
|
102
107
|
*/
|
|
103
108
|
Component.prototype.refresh = function () {
|
|
104
109
|
this.refreshing = true;
|
|
@@ -111,7 +116,6 @@ var Component = /** @class */ (function (_super) {
|
|
|
111
116
|
this.render();
|
|
112
117
|
this.refreshing = false;
|
|
113
118
|
};
|
|
114
|
-
/* istanbul ignore next */
|
|
115
119
|
Component.prototype.accessMount = function () {
|
|
116
120
|
if (this.mount && !this.isReactHybrid) {
|
|
117
121
|
this.mount();
|
|
@@ -119,10 +123,12 @@ var Component = /** @class */ (function (_super) {
|
|
|
119
123
|
};
|
|
120
124
|
/**
|
|
121
125
|
* Returns the route element of the component
|
|
126
|
+
*
|
|
127
|
+
* @returns {HTMLElement} ?
|
|
122
128
|
*/
|
|
123
|
-
/* istanbul ignore next */
|
|
124
129
|
Component.prototype.getRootElement = function () {
|
|
125
130
|
if (this.isReactHybrid) {
|
|
131
|
+
// eslint-disable-next-line
|
|
126
132
|
return this.actualElement;
|
|
127
133
|
}
|
|
128
134
|
else {
|
|
@@ -131,9 +137,10 @@ var Component = /** @class */ (function (_super) {
|
|
|
131
137
|
};
|
|
132
138
|
/**
|
|
133
139
|
* Returns the persistence data for component
|
|
140
|
+
*
|
|
141
|
+
* @returns {any} ?
|
|
134
142
|
*/
|
|
135
|
-
|
|
136
|
-
//tslint:disable:no-any
|
|
143
|
+
// eslint-disable-next-line
|
|
137
144
|
Component.prototype.getLocalData = function () {
|
|
138
145
|
var eleId = this.getModuleName() + this.element.id;
|
|
139
146
|
if (versionBasedStatePersistence) {
|
|
@@ -145,7 +152,9 @@ var Component = /** @class */ (function (_super) {
|
|
|
145
152
|
};
|
|
146
153
|
/**
|
|
147
154
|
* Appends the control within the given HTML element
|
|
155
|
+
*
|
|
148
156
|
* @param {string | HTMLElement} selector - Target element where control needs to be appended
|
|
157
|
+
* @returns {void} ?
|
|
149
158
|
*/
|
|
150
159
|
Component.prototype.appendTo = function (selector) {
|
|
151
160
|
if (!isNullOrUndefined(selector) && typeof (selector) === 'string') {
|
|
@@ -182,30 +191,35 @@ var Component = /** @class */ (function (_super) {
|
|
|
182
191
|
};
|
|
183
192
|
/**
|
|
184
193
|
* It is used to process the post rendering functionalities to a component.
|
|
194
|
+
*
|
|
195
|
+
* @param {Node} wrapperElement ?
|
|
196
|
+
* @returns {void} ?
|
|
185
197
|
*/
|
|
186
198
|
Component.prototype.renderComplete = function (wrapperElement) {
|
|
187
199
|
if (isBlazor()) {
|
|
188
200
|
var sfBlazor = 'sfBlazor';
|
|
189
|
-
//
|
|
201
|
+
// eslint-disable-next-line
|
|
190
202
|
window[sfBlazor].renderComplete(this.element, wrapperElement);
|
|
191
203
|
}
|
|
192
204
|
this.isRendered = true;
|
|
193
205
|
};
|
|
194
206
|
/**
|
|
195
207
|
* When invoked, applies the pending property changes immediately to the component.
|
|
208
|
+
*
|
|
209
|
+
* @returns {void} ?
|
|
196
210
|
*/
|
|
197
211
|
Component.prototype.dataBind = function () {
|
|
198
212
|
this.injectModules();
|
|
199
213
|
_super.prototype.dataBind.call(this);
|
|
200
214
|
};
|
|
201
|
-
;
|
|
202
215
|
/**
|
|
203
216
|
* Attach one or more event handler to the current component context.
|
|
204
217
|
* It is used for internal handling event internally within the component only.
|
|
218
|
+
*
|
|
205
219
|
* @param {BoundOptions[]| string} event - It is optional type either to Set the collection of event list or the eventName.
|
|
206
220
|
* @param {Function} handler - optional parameter Specifies the handler to run when the event occurs
|
|
207
221
|
* @param {Object} context - optional parameter Specifies the context to be bind in the handler.
|
|
208
|
-
* @
|
|
222
|
+
* @returns {void} ?
|
|
209
223
|
* @private
|
|
210
224
|
*/
|
|
211
225
|
Component.prototype.on = function (event, handler, context) {
|
|
@@ -221,9 +235,10 @@ var Component = /** @class */ (function (_super) {
|
|
|
221
235
|
};
|
|
222
236
|
/**
|
|
223
237
|
* To remove one or more event handler that has been attached with the on() method.
|
|
238
|
+
*
|
|
224
239
|
* @param {BoundOptions[]| string} event - It is optional type either to Set the collection of event list or the eventName.
|
|
225
240
|
* @param {Function} handler - optional parameter Specifies the function to run when the event occurs
|
|
226
|
-
* @
|
|
241
|
+
* @returns {void} ?
|
|
227
242
|
* @private
|
|
228
243
|
*/
|
|
229
244
|
Component.prototype.off = function (event, handler) {
|
|
@@ -239,9 +254,10 @@ var Component = /** @class */ (function (_super) {
|
|
|
239
254
|
};
|
|
240
255
|
/**
|
|
241
256
|
* To notify the handlers in the specified event.
|
|
257
|
+
*
|
|
242
258
|
* @param {string} property - Specifies the event to be notify.
|
|
243
259
|
* @param {Object} argument - Additional parameters to pass while calling the handler.
|
|
244
|
-
* @
|
|
260
|
+
* @returns {void} ?
|
|
245
261
|
* @private
|
|
246
262
|
*/
|
|
247
263
|
Component.prototype.notify = function (property, argument) {
|
|
@@ -251,14 +267,18 @@ var Component = /** @class */ (function (_super) {
|
|
|
251
267
|
};
|
|
252
268
|
/**
|
|
253
269
|
* Get injected modules
|
|
270
|
+
*
|
|
271
|
+
* @returns {Function} ?
|
|
254
272
|
* @private
|
|
255
273
|
*/
|
|
256
274
|
Component.prototype.getInjectedModules = function () {
|
|
257
275
|
return this.injectedModules;
|
|
258
276
|
};
|
|
259
|
-
;
|
|
260
277
|
/**
|
|
261
278
|
* Dynamically injects the required modules to the component.
|
|
279
|
+
*
|
|
280
|
+
* @param {Function} moduleList ?
|
|
281
|
+
* @returns {void} ?
|
|
262
282
|
*/
|
|
263
283
|
Component.Inject = function () {
|
|
264
284
|
var moduleList = [];
|
|
@@ -276,33 +296,28 @@ var Component = /** @class */ (function (_super) {
|
|
|
276
296
|
};
|
|
277
297
|
/**
|
|
278
298
|
* This is a instance method to create an element.
|
|
299
|
+
*
|
|
300
|
+
* @param {string} tagName ?
|
|
301
|
+
* @param {ElementProperties} prop ?
|
|
302
|
+
* @param {boolean} isVDOM ?
|
|
303
|
+
* @returns {any} ?
|
|
279
304
|
* @private
|
|
280
305
|
*/
|
|
281
|
-
|
|
282
|
-
//tslint:disable:no-any
|
|
306
|
+
// eslint-disable-next-line
|
|
283
307
|
Component.prototype.createElement = function (tagName, prop, isVDOM) {
|
|
284
|
-
|
|
285
|
-
if (prop) {
|
|
286
|
-
prop = {};
|
|
287
|
-
}
|
|
288
|
-
prop['data-id'] = getRandomId();
|
|
289
|
-
return VirtualDOM.createElement(tagName, prop);
|
|
290
|
-
}
|
|
291
|
-
else {
|
|
292
|
-
return createElement(tagName, prop);
|
|
293
|
-
}
|
|
308
|
+
return createElement(tagName, prop);
|
|
294
309
|
};
|
|
295
310
|
/**
|
|
296
311
|
*
|
|
297
|
-
* @param handler - handler to be triggered after state Updated.
|
|
298
|
-
* @param argument - Arguments to be passed to caller.
|
|
312
|
+
* @param {Function} handler - handler to be triggered after state Updated.
|
|
313
|
+
* @param {any} argument - Arguments to be passed to caller.
|
|
314
|
+
* @returns {void} .
|
|
299
315
|
* @private
|
|
300
316
|
*/
|
|
301
|
-
|
|
302
|
-
//tslint:disable:no-any
|
|
317
|
+
// eslint-disable-next-line
|
|
303
318
|
Component.prototype.triggerStateChange = function (handler, argument) {
|
|
304
319
|
if (this.isReactHybrid) {
|
|
305
|
-
//
|
|
320
|
+
// eslint-disable-next-line
|
|
306
321
|
this.setState();
|
|
307
322
|
this.currentContext = { calls: handler, args: argument };
|
|
308
323
|
}
|
|
@@ -334,7 +349,8 @@ var Component = /** @class */ (function (_super) {
|
|
|
334
349
|
Component.prototype.setPersistData = function () {
|
|
335
350
|
if (!this.isDestroyed) {
|
|
336
351
|
if (versionBasedStatePersistence) {
|
|
337
|
-
window.localStorage.setItem(this.getModuleName() +
|
|
352
|
+
window.localStorage.setItem(this.getModuleName() +
|
|
353
|
+
this.element.id + this.ej2StatePersistenceVersion, this.getPersistData());
|
|
338
354
|
}
|
|
339
355
|
else {
|
|
340
356
|
window.localStorage.setItem(this.getModuleName() + this.element.id, this.getPersistData());
|
|
@@ -345,7 +361,7 @@ var Component = /** @class */ (function (_super) {
|
|
|
345
361
|
Component.prototype.renderReactTemplates = function () {
|
|
346
362
|
//No Code
|
|
347
363
|
};
|
|
348
|
-
//
|
|
364
|
+
// eslint-disable-next-line
|
|
349
365
|
Component.prototype.clearTemplate = function (templateName, index) {
|
|
350
366
|
//No Code
|
|
351
367
|
};
|
|
@@ -378,6 +394,7 @@ var Component = /** @class */ (function (_super) {
|
|
|
378
394
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
379
395
|
var key = options_1[_i];
|
|
380
396
|
var objValue = void 0;
|
|
397
|
+
// eslint-disable-next-line
|
|
381
398
|
objValue = getValue(key, this);
|
|
382
399
|
if (!isUndefined(objValue)) {
|
|
383
400
|
setValue(key, this.getActualProperties(objValue), persistObj);
|
|
@@ -402,7 +419,7 @@ var Component = /** @class */ (function (_super) {
|
|
|
402
419
|
var newObj = {};
|
|
403
420
|
var _loop_1 = function (key) {
|
|
404
421
|
if (ignoreList.indexOf(key) === -1) {
|
|
405
|
-
//
|
|
422
|
+
// eslint-disable-next-line
|
|
406
423
|
var value = obj[key];
|
|
407
424
|
if (typeof value === 'object' && !(value instanceof Array)) {
|
|
408
425
|
var newList = ignoreList.filter(function (str) {
|
|
@@ -439,7 +456,7 @@ var Component = /** @class */ (function (_super) {
|
|
|
439
456
|
return Component;
|
|
440
457
|
}(Base));
|
|
441
458
|
export { Component };
|
|
442
|
-
//Function handling for page navigation detection
|
|
459
|
+
//Function handling for page navigation detection
|
|
443
460
|
/* istanbul ignore next */
|
|
444
461
|
(function () {
|
|
445
462
|
if (typeof window !== 'undefined') {
|