@syncfusion/ej2-base 19.2.55 → 19.3.47
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 +1 -89
- package/README.md +1 -1
- package/dist/ej2-base.umd.min.js +2 -2
- 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 +2 -2
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- 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 +7 -64
- 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 +128 -124
- 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 +14 -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 +2157 -0
- package/styles/bootstrap5-dark.scss +3 -0
- package/styles/bootstrap5.css +2157 -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/browser.js
CHANGED
|
@@ -6,14 +6,14 @@ var REGX_IOS = /(ipad|iphone|ipod touch)/i;
|
|
|
6
6
|
var REGX_IOS7 = /(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i;
|
|
7
7
|
var REGX_ANDROID = /android/i;
|
|
8
8
|
var REGX_WINDOWS = /trident|windows phone|edge/i;
|
|
9
|
-
var REGX_VERSION = /(version)[
|
|
9
|
+
var REGX_VERSION = /(version)[ /]([\w.]+)/i;
|
|
10
10
|
var REGX_BROWSER = {
|
|
11
|
-
OPERA: /(opera|opr)(?:.*version|)[
|
|
12
|
-
EDGE: /(edge)(?:.*version|)[
|
|
13
|
-
CHROME: /(chrome|crios)[
|
|
14
|
-
PANTHOMEJS: /(phantomjs)[
|
|
15
|
-
SAFARI: /(safari)[
|
|
16
|
-
WEBKIT: /(webkit)[
|
|
11
|
+
OPERA: /(opera|opr)(?:.*version|)[ /]([\w.]+)/i,
|
|
12
|
+
EDGE: /(edge)(?:.*version|)[ /]([\w.]+)/i,
|
|
13
|
+
CHROME: /(chrome|crios)[ /]([\w.]+)/i,
|
|
14
|
+
PANTHOMEJS: /(phantomjs)[ /]([\w.]+)/i,
|
|
15
|
+
SAFARI: /(safari)[ /]([\w.]+)/i,
|
|
16
|
+
WEBKIT: /(webkit)[ /]([\w.]+)/i,
|
|
17
17
|
MSIE: /(msie|trident) ([\w.]+)/i,
|
|
18
18
|
MOZILLA: /(mozilla)(?:.*? rv:([\w.]+)|)/i
|
|
19
19
|
};
|
|
@@ -23,6 +23,7 @@ if (typeof window !== 'undefined') {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Get configuration details for Browser
|
|
26
|
+
*
|
|
26
27
|
* @private
|
|
27
28
|
*/
|
|
28
29
|
var Browser = /** @class */ (function () {
|
|
@@ -40,6 +41,7 @@ var Browser = /** @class */ (function () {
|
|
|
40
41
|
browserInfo.name = (clientInfo[1].toLowerCase() === 'crios' ? 'chrome' : browserInfo.name);
|
|
41
42
|
browserInfo.version = clientInfo[2];
|
|
42
43
|
browserInfo.culture.name = browserInfo.culture.language = navigator.language;
|
|
44
|
+
// eslint-disable-next-line
|
|
43
45
|
if (!!Browser.userAgent.match(REGX_IE11)) {
|
|
44
46
|
browserInfo.name = 'msie';
|
|
45
47
|
break;
|
|
@@ -55,11 +57,12 @@ var Browser = /** @class */ (function () {
|
|
|
55
57
|
};
|
|
56
58
|
/**
|
|
57
59
|
* To get events from the browser
|
|
60
|
+
*
|
|
58
61
|
* @param {string} event - type of event triggered.
|
|
59
|
-
* @returns {
|
|
62
|
+
* @returns {boolean}
|
|
60
63
|
*/
|
|
61
64
|
Browser.getEvent = function (event) {
|
|
62
|
-
//
|
|
65
|
+
// eslint-disable-next-line
|
|
63
66
|
var events = {
|
|
64
67
|
start: {
|
|
65
68
|
isPointer: 'pointerdown', isTouch: 'touchstart', isDevice: 'mousedown'
|
|
@@ -74,12 +77,13 @@ var Browser = /** @class */ (function () {
|
|
|
74
77
|
isPointer: 'pointercancel', isTouch: 'touchcancel', isDevice: 'mouseleave'
|
|
75
78
|
}
|
|
76
79
|
};
|
|
77
|
-
return (Browser.isPointer
|
|
80
|
+
return (Browser.isPointer ? events[event].isPointer :
|
|
78
81
|
(Browser.isTouch ? events[event].isTouch + (!Browser.isDevice ? ' ' + events[event].isDevice : '')
|
|
79
82
|
: events[event].isDevice));
|
|
80
83
|
};
|
|
81
84
|
/**
|
|
82
85
|
* To get the Touch start event from browser
|
|
86
|
+
*
|
|
83
87
|
* @returns {string}
|
|
84
88
|
*/
|
|
85
89
|
Browser.getTouchStartEvent = function () {
|
|
@@ -87,6 +91,7 @@ var Browser = /** @class */ (function () {
|
|
|
87
91
|
};
|
|
88
92
|
/**
|
|
89
93
|
* To get the Touch end event from browser
|
|
94
|
+
*
|
|
90
95
|
* @returns {string}
|
|
91
96
|
*/
|
|
92
97
|
Browser.getTouchEndEvent = function () {
|
|
@@ -94,6 +99,7 @@ var Browser = /** @class */ (function () {
|
|
|
94
99
|
};
|
|
95
100
|
/**
|
|
96
101
|
* To get the Touch move event from browser
|
|
102
|
+
*
|
|
97
103
|
* @returns {string}
|
|
98
104
|
*/
|
|
99
105
|
Browser.getTouchMoveEvent = function () {
|
|
@@ -101,6 +107,7 @@ var Browser = /** @class */ (function () {
|
|
|
101
107
|
};
|
|
102
108
|
/**
|
|
103
109
|
* To cancel the touch event from browser
|
|
110
|
+
*
|
|
104
111
|
* @returns {string}
|
|
105
112
|
*/
|
|
106
113
|
Browser.getTouchCancelEvent = function () {
|
|
@@ -108,25 +115,34 @@ var Browser = /** @class */ (function () {
|
|
|
108
115
|
};
|
|
109
116
|
/**
|
|
110
117
|
* To get the value based on provided key and regX
|
|
111
|
-
*
|
|
112
|
-
* @param {
|
|
113
|
-
* @
|
|
118
|
+
*
|
|
119
|
+
* @param {string} key ?
|
|
120
|
+
* @param {RegExp} regX ?
|
|
121
|
+
* @returns {Object} ?
|
|
114
122
|
*/
|
|
115
123
|
Browser.getValue = function (key, regX) {
|
|
116
124
|
var browserDetails = window.browserDetails;
|
|
117
125
|
if ('undefined' === typeof browserDetails[key]) {
|
|
118
126
|
return browserDetails[key] = regX.test(Browser.userAgent);
|
|
119
127
|
}
|
|
128
|
+
if (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
|
|
129
|
+
browserDetails['isIos'] = true;
|
|
130
|
+
browserDetails['isDevice'] = true;
|
|
131
|
+
browserDetails['isTouch'] = true;
|
|
132
|
+
browserDetails['isPointer'] = true;
|
|
133
|
+
}
|
|
120
134
|
return browserDetails[key];
|
|
121
135
|
};
|
|
122
136
|
Object.defineProperty(Browser, "userAgent", {
|
|
123
137
|
get: function () {
|
|
124
138
|
return Browser.uA;
|
|
125
139
|
},
|
|
126
|
-
//Properties
|
|
140
|
+
//Properties
|
|
127
141
|
/**
|
|
128
142
|
* Property specifies the userAgent of the browser. Default userAgent value is based on the browser.
|
|
129
143
|
* Also we can set our own userAgent.
|
|
144
|
+
*
|
|
145
|
+
* @param {string} uA ?
|
|
130
146
|
*/
|
|
131
147
|
set: function (uA) {
|
|
132
148
|
Browser.uA = uA;
|
|
@@ -139,7 +155,8 @@ var Browser = /** @class */ (function () {
|
|
|
139
155
|
//Read Only Properties
|
|
140
156
|
/**
|
|
141
157
|
* Property is to get the browser information like Name, Version and Language
|
|
142
|
-
*
|
|
158
|
+
*
|
|
159
|
+
* @returns {BrowserInfo} ?
|
|
143
160
|
*/
|
|
144
161
|
get: function () {
|
|
145
162
|
if (isUndefined(window.browserDetails.info)) {
|
|
@@ -153,6 +170,8 @@ var Browser = /** @class */ (function () {
|
|
|
153
170
|
Object.defineProperty(Browser, "isIE", {
|
|
154
171
|
/**
|
|
155
172
|
* Property is to get whether the userAgent is based IE.
|
|
173
|
+
*
|
|
174
|
+
* @returns {boolean} ?
|
|
156
175
|
*/
|
|
157
176
|
get: function () {
|
|
158
177
|
return Browser.getValue('isIE', REGX_IE);
|
|
@@ -163,6 +182,8 @@ var Browser = /** @class */ (function () {
|
|
|
163
182
|
Object.defineProperty(Browser, "isTouch", {
|
|
164
183
|
/**
|
|
165
184
|
* Property is to get whether the browser has touch support.
|
|
185
|
+
*
|
|
186
|
+
* @returns {boolean} ?
|
|
166
187
|
*/
|
|
167
188
|
get: function () {
|
|
168
189
|
if (isUndefined(window.browserDetails.isTouch)) {
|
|
@@ -180,6 +201,8 @@ var Browser = /** @class */ (function () {
|
|
|
180
201
|
Object.defineProperty(Browser, "isPointer", {
|
|
181
202
|
/**
|
|
182
203
|
* Property is to get whether the browser has Pointer support.
|
|
204
|
+
*
|
|
205
|
+
* @returns {boolean} ?
|
|
183
206
|
*/
|
|
184
207
|
get: function () {
|
|
185
208
|
if (isUndefined(window.browserDetails.isPointer)) {
|
|
@@ -193,6 +216,8 @@ var Browser = /** @class */ (function () {
|
|
|
193
216
|
Object.defineProperty(Browser, "isMSPointer", {
|
|
194
217
|
/**
|
|
195
218
|
* Property is to get whether the browser has MSPointer support.
|
|
219
|
+
*
|
|
220
|
+
* @returns {boolean} ?
|
|
196
221
|
*/
|
|
197
222
|
get: function () {
|
|
198
223
|
if (isUndefined(window.browserDetails.isMSPointer)) {
|
|
@@ -206,6 +231,8 @@ var Browser = /** @class */ (function () {
|
|
|
206
231
|
Object.defineProperty(Browser, "isDevice", {
|
|
207
232
|
/**
|
|
208
233
|
* Property is to get whether the userAgent is device based.
|
|
234
|
+
*
|
|
235
|
+
* @returns {boolean} ?
|
|
209
236
|
*/
|
|
210
237
|
get: function () {
|
|
211
238
|
return Browser.getValue('isDevice', REGX_MOBILE);
|
|
@@ -216,6 +243,8 @@ var Browser = /** @class */ (function () {
|
|
|
216
243
|
Object.defineProperty(Browser, "isIos", {
|
|
217
244
|
/**
|
|
218
245
|
* Property is to get whether the userAgent is IOS.
|
|
246
|
+
*
|
|
247
|
+
* @returns {boolean} ?
|
|
219
248
|
*/
|
|
220
249
|
get: function () {
|
|
221
250
|
return Browser.getValue('isIos', REGX_IOS);
|
|
@@ -226,6 +255,8 @@ var Browser = /** @class */ (function () {
|
|
|
226
255
|
Object.defineProperty(Browser, "isIos7", {
|
|
227
256
|
/**
|
|
228
257
|
* Property is to get whether the userAgent is Ios7.
|
|
258
|
+
*
|
|
259
|
+
* @returns {boolean} ?
|
|
229
260
|
*/
|
|
230
261
|
get: function () {
|
|
231
262
|
return Browser.getValue('isIos7', REGX_IOS7);
|
|
@@ -236,6 +267,8 @@ var Browser = /** @class */ (function () {
|
|
|
236
267
|
Object.defineProperty(Browser, "isAndroid", {
|
|
237
268
|
/**
|
|
238
269
|
* Property is to get whether the userAgent is Android.
|
|
270
|
+
*
|
|
271
|
+
* @returns {boolean} ?
|
|
239
272
|
*/
|
|
240
273
|
get: function () {
|
|
241
274
|
return Browser.getValue('isAndroid', REGX_ANDROID);
|
|
@@ -246,6 +279,8 @@ var Browser = /** @class */ (function () {
|
|
|
246
279
|
Object.defineProperty(Browser, "isWebView", {
|
|
247
280
|
/**
|
|
248
281
|
* Property is to identify whether application ran in web view.
|
|
282
|
+
*
|
|
283
|
+
* @returns {boolean} ?
|
|
249
284
|
*/
|
|
250
285
|
get: function () {
|
|
251
286
|
if (isUndefined(window.browserDetails.isWebView)) {
|
|
@@ -261,6 +296,8 @@ var Browser = /** @class */ (function () {
|
|
|
261
296
|
Object.defineProperty(Browser, "isWindows", {
|
|
262
297
|
/**
|
|
263
298
|
* Property is to get whether the userAgent is Windows.
|
|
299
|
+
*
|
|
300
|
+
* @returns {boolean} ?
|
|
264
301
|
*/
|
|
265
302
|
get: function () {
|
|
266
303
|
return Browser.getValue('isWindows', REGX_WINDOWS);
|
|
@@ -271,6 +308,8 @@ var Browser = /** @class */ (function () {
|
|
|
271
308
|
Object.defineProperty(Browser, "touchStartEvent", {
|
|
272
309
|
/**
|
|
273
310
|
* Property is to get the touch start event. It returns event name based on browser.
|
|
311
|
+
*
|
|
312
|
+
* @returns {string} ?
|
|
274
313
|
*/
|
|
275
314
|
get: function () {
|
|
276
315
|
if (isUndefined(window.browserDetails.touchStartEvent)) {
|
|
@@ -284,6 +323,8 @@ var Browser = /** @class */ (function () {
|
|
|
284
323
|
Object.defineProperty(Browser, "touchMoveEvent", {
|
|
285
324
|
/**
|
|
286
325
|
* Property is to get the touch move event. It returns event name based on browser.
|
|
326
|
+
*
|
|
327
|
+
* @returns {string} ?
|
|
287
328
|
*/
|
|
288
329
|
get: function () {
|
|
289
330
|
if (isUndefined(window.browserDetails.touchMoveEvent)) {
|
|
@@ -297,6 +338,8 @@ var Browser = /** @class */ (function () {
|
|
|
297
338
|
Object.defineProperty(Browser, "touchEndEvent", {
|
|
298
339
|
/**
|
|
299
340
|
* Property is to get the touch end event. It returns event name based on browser.
|
|
341
|
+
*
|
|
342
|
+
* @returns {string} ?
|
|
300
343
|
*/
|
|
301
344
|
get: function () {
|
|
302
345
|
if (isUndefined(window.browserDetails.touchEndEvent)) {
|
|
@@ -310,6 +353,8 @@ var Browser = /** @class */ (function () {
|
|
|
310
353
|
Object.defineProperty(Browser, "touchCancelEvent", {
|
|
311
354
|
/**
|
|
312
355
|
* Property is to cancel the touch end event.
|
|
356
|
+
*
|
|
357
|
+
* @returns {string} ?
|
|
313
358
|
*/
|
|
314
359
|
get: function () {
|
|
315
360
|
if (isUndefined(window.browserDetails.touchCancelEvent)) {
|
package/src/child-property.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* To detect the changes for inner properties.
|
|
3
|
+
*
|
|
3
4
|
* @private
|
|
4
5
|
*/
|
|
5
6
|
export declare class ChildProperty<T> {
|
|
@@ -25,36 +26,46 @@ export declare class ChildProperty<T> {
|
|
|
25
26
|
constructor(parent: T, propName: string, defaultValue: Object, isArray?: boolean);
|
|
26
27
|
/**
|
|
27
28
|
* Updates the property changes
|
|
28
|
-
*
|
|
29
|
-
* @param {
|
|
30
|
-
* @
|
|
29
|
+
*
|
|
30
|
+
* @param {boolean} val ?
|
|
31
|
+
* @param {string} propName ?
|
|
32
|
+
* @returns {void} ?
|
|
31
33
|
*/
|
|
32
34
|
private updateChange;
|
|
33
35
|
/**
|
|
34
36
|
* Updates time out duration
|
|
37
|
+
*
|
|
38
|
+
* @returns {void} ?
|
|
35
39
|
*/
|
|
36
40
|
private updateTimeOut;
|
|
37
41
|
/**
|
|
38
42
|
* Clears changed properties
|
|
43
|
+
*
|
|
44
|
+
* @returns {void} ?
|
|
39
45
|
*/
|
|
40
46
|
private clearChanges;
|
|
41
47
|
/**
|
|
42
48
|
* Set property changes
|
|
43
|
-
*
|
|
44
|
-
* @param {
|
|
45
|
-
* {
|
|
49
|
+
*
|
|
50
|
+
* @param {Object} prop ?
|
|
51
|
+
* @param {boolean} muteOnChange ?
|
|
52
|
+
* @returns {void} ?
|
|
46
53
|
*/
|
|
47
54
|
protected setProperties(prop: Object, muteOnChange: boolean): void;
|
|
48
55
|
/**
|
|
49
56
|
* Binds data
|
|
57
|
+
*
|
|
58
|
+
* @returns {void} ?
|
|
50
59
|
*/
|
|
51
60
|
protected dataBind(): void;
|
|
52
61
|
/**
|
|
53
62
|
* Saves changes to newer values
|
|
54
|
-
*
|
|
55
|
-
* @param {
|
|
56
|
-
* @param {Object}
|
|
57
|
-
* @
|
|
63
|
+
*
|
|
64
|
+
* @param {string} key ?
|
|
65
|
+
* @param {Object} newValue ?
|
|
66
|
+
* @param {Object} oldValue ?
|
|
67
|
+
* @param {boolean} restrictServerDataBind ?
|
|
68
|
+
* @returns {void} ?
|
|
58
69
|
*/
|
|
59
70
|
protected saveChanges(key: string, newValue: Object, oldValue: Object, restrictServerDataBind?: boolean): void;
|
|
60
71
|
protected serverDataBind(key: string, value: Object, isSaveChanges?: boolean, action?: string): void;
|
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;
|