@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/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') {
|
package/src/dom.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { VirtualObject } from './virtual-dom';
|
|
2
1
|
export interface ElementProperties {
|
|
3
2
|
id?: string;
|
|
4
3
|
className?: string;
|
|
@@ -10,66 +9,86 @@ export interface ElementProperties {
|
|
|
10
9
|
}
|
|
11
10
|
/**
|
|
12
11
|
* Function to create Html element.
|
|
13
|
-
*
|
|
14
|
-
* @param
|
|
15
|
-
* @param properties
|
|
16
|
-
* @param properties.
|
|
17
|
-
* @param properties.
|
|
18
|
-
* @param properties.
|
|
19
|
-
* @param properties.
|
|
12
|
+
*
|
|
13
|
+
* @param {string} tagName - Name of the tag, id and class names.
|
|
14
|
+
* @param {ElementProperties} properties - Object to set properties in the element.
|
|
15
|
+
* @param {ElementProperties} properties.id - To set the id to the created element.
|
|
16
|
+
* @param {ElementProperties} properties.className - To add classes to the element.
|
|
17
|
+
* @param {ElementProperties} properties.innerHTML - To set the innerHTML to element.
|
|
18
|
+
* @param {ElementProperties} properties.styles - To set the some custom styles to element.
|
|
19
|
+
* @param {ElementProperties} properties.attrs - To set the attributes to element.
|
|
20
|
+
* @returns {any} ?
|
|
20
21
|
* @private
|
|
21
22
|
*/
|
|
22
23
|
export declare function createElement(tagName: string, properties?: ElementProperties): HTMLElement;
|
|
23
24
|
/**
|
|
24
25
|
* The function used to add the classes to array of elements
|
|
26
|
+
*
|
|
25
27
|
* @param {Element[]|NodeList} elements - An array of elements that need to add a list of classes
|
|
26
28
|
* @param {string|string[]} classes - String or array of string that need to add an individual element as a class
|
|
29
|
+
* @returns {any} .
|
|
27
30
|
* @private
|
|
28
31
|
*/
|
|
29
32
|
export declare function addClass(elements: Element[] | NodeList, classes: string | string[]): Element[] | NodeList;
|
|
30
33
|
/**
|
|
31
34
|
* The function used to add the classes to array of elements
|
|
35
|
+
*
|
|
32
36
|
* @param {Element[]|NodeList} elements - An array of elements that need to remove a list of classes
|
|
33
37
|
* @param {string|string[]} classes - String or array of string that need to add an individual element as a class
|
|
38
|
+
* @returns {any} .
|
|
34
39
|
* @private
|
|
35
40
|
*/
|
|
36
41
|
export declare function removeClass(elements: Element[] | NodeList, classes: string | string[]): Element[] | NodeList;
|
|
37
42
|
/**
|
|
38
43
|
* The function used to check element is visible or not.
|
|
44
|
+
*
|
|
39
45
|
* @param {Element|Node} element - An element the need to check visibility
|
|
46
|
+
* @returns {boolean} ?
|
|
40
47
|
* @private
|
|
41
48
|
*/
|
|
42
|
-
export declare function isVisible(element: Element | Node):
|
|
49
|
+
export declare function isVisible(element: Element | Node): boolean;
|
|
43
50
|
/**
|
|
44
51
|
* The function used to insert an array of elements into a first of the element.
|
|
52
|
+
*
|
|
45
53
|
* @param {Element[]|NodeList} fromElements - An array of elements that need to prepend.
|
|
46
54
|
* @param {Element} toElement - An element that is going to prepend.
|
|
55
|
+
* @param {boolean} isEval - ?
|
|
56
|
+
* @returns {Element[] | NodeList} ?
|
|
47
57
|
* @private
|
|
48
58
|
*/
|
|
49
|
-
export declare function prepend(fromElements: Element[] | NodeList, toElement: Element, isEval?:
|
|
59
|
+
export declare function prepend(fromElements: Element[] | NodeList, toElement: Element, isEval?: boolean): Element[] | NodeList;
|
|
50
60
|
/**
|
|
51
61
|
* The function used to insert an array of elements into last of the element.
|
|
62
|
+
*
|
|
52
63
|
* @param {Element[]|NodeList} fromElements - An array of elements that need to append.
|
|
53
64
|
* @param {Element} toElement - An element that is going to prepend.
|
|
65
|
+
* @param {boolean} isEval - ?
|
|
66
|
+
* @returns {Element[] | NodeList} ?
|
|
54
67
|
* @private
|
|
55
68
|
*/
|
|
56
|
-
export declare function append(fromElements: Element[] | NodeList, toElement: Element, isEval?:
|
|
69
|
+
export declare function append(fromElements: Element[] | NodeList, toElement: Element, isEval?: boolean): Element[] | NodeList;
|
|
57
70
|
/**
|
|
58
|
-
* The function used to remove the element from
|
|
71
|
+
* The function used to remove the element from parentnode
|
|
72
|
+
*
|
|
59
73
|
* @param {Element|Node|HTMLElement} element - An element that is going to detach from the Dom
|
|
74
|
+
* @returns {any} ?
|
|
60
75
|
* @private
|
|
61
76
|
*/
|
|
62
77
|
export declare function detach(element: Element | Node | HTMLElement): any;
|
|
63
78
|
/**
|
|
64
79
|
* The function used to remove the element from Dom also clear the bounded events
|
|
80
|
+
*
|
|
65
81
|
* @param {Element|Node|HTMLElement} element - An element remove from the Dom
|
|
82
|
+
* @returns {void} ?
|
|
66
83
|
* @private
|
|
67
84
|
*/
|
|
68
85
|
export declare function remove(element: Element | Node | HTMLElement): void;
|
|
69
86
|
/**
|
|
70
87
|
* The function helps to set multiple attributes to an element
|
|
88
|
+
*
|
|
71
89
|
* @param {Element|Node} element - An element that need to set attributes.
|
|
72
|
-
* @param {
|
|
90
|
+
* @param {string} attributes - JSON Object that is going to as attributes.
|
|
91
|
+
* @returns {Element} ?
|
|
73
92
|
* @private
|
|
74
93
|
*/
|
|
75
94
|
export declare function attributes(element: Element | Node | any, attributes: {
|
|
@@ -77,44 +96,57 @@ export declare function attributes(element: Element | Node | any, attributes: {
|
|
|
77
96
|
}): Element;
|
|
78
97
|
/**
|
|
79
98
|
* The function selects the element from giving context.
|
|
80
|
-
*
|
|
81
|
-
* @param {
|
|
99
|
+
*
|
|
100
|
+
* @param {string} selector - Selector string need fetch element
|
|
101
|
+
* @param {Document|Element} context - It is an optional type, That specifies a Dom context.
|
|
102
|
+
* @param {boolean} needsVDOM ?
|
|
103
|
+
* @returns {any} ?
|
|
82
104
|
* @private
|
|
83
105
|
*/
|
|
84
106
|
export declare function select(selector: string, context?: Document | Element, needsVDOM?: boolean): any;
|
|
85
107
|
/**
|
|
86
108
|
* The function selects an array of element from the given context.
|
|
87
|
-
*
|
|
88
|
-
* @param {
|
|
109
|
+
*
|
|
110
|
+
* @param {string} selector - Selector string need fetch element
|
|
111
|
+
* @param {Document|Element} context - It is an optional type, That specifies a Dom context.
|
|
112
|
+
* @param {boolean} needsVDOM ?
|
|
113
|
+
* @returns {HTMLElement[]} ?
|
|
89
114
|
* @private
|
|
90
115
|
*/
|
|
91
116
|
export declare function selectAll(selector: string, context?: Document | Element, needsVDOM?: boolean): HTMLElement[];
|
|
92
117
|
/**
|
|
93
118
|
* Returns single closest parent element based on class selector.
|
|
119
|
+
*
|
|
94
120
|
* @param {Element} element - An element that need to find the closest element.
|
|
95
121
|
* @param {string} selector - A classSelector of closest element.
|
|
122
|
+
* @returns {Element} ?
|
|
96
123
|
* @private
|
|
97
124
|
*/
|
|
98
125
|
export declare function closest(element: Element | Node, selector: string): Element;
|
|
99
126
|
/**
|
|
100
127
|
* Returns all sibling elements of the given element.
|
|
128
|
+
*
|
|
101
129
|
* @param {Element|Node} element - An element that need to get siblings.
|
|
130
|
+
* @returns {Element[]} ?
|
|
102
131
|
* @private
|
|
103
132
|
*/
|
|
104
133
|
export declare function siblings(element: Element | Node): Element[];
|
|
105
134
|
/**
|
|
106
135
|
* set the value if not exist. Otherwise set the existing value
|
|
136
|
+
*
|
|
107
137
|
* @param {HTMLElement} element - An element to which we need to set value.
|
|
108
138
|
* @param {string} property - Property need to get or set.
|
|
109
139
|
* @param {string} value - value need to set.
|
|
140
|
+
* @returns {string} ?
|
|
110
141
|
* @private
|
|
111
142
|
*/
|
|
112
143
|
export declare function getAttributeOrDefault(element: HTMLElement, property: string, value: string): string;
|
|
113
144
|
/**
|
|
114
145
|
* Set the style attributes to Html element.
|
|
146
|
+
*
|
|
115
147
|
* @param {HTMLElement} element - Element which we want to set attributes
|
|
116
148
|
* @param {any} attrs - Set the given attributes to element
|
|
117
|
-
* @
|
|
149
|
+
* @returns {void} ?
|
|
118
150
|
* @private
|
|
119
151
|
*/
|
|
120
152
|
export declare function setStyleAttribute(element: HTMLElement, attrs: {
|
|
@@ -122,28 +154,47 @@ export declare function setStyleAttribute(element: HTMLElement, attrs: {
|
|
|
122
154
|
}): void;
|
|
123
155
|
/**
|
|
124
156
|
* Method for add and remove classes to a dom element.
|
|
157
|
+
*
|
|
125
158
|
* @param {Element} element - Element for add and remove classes
|
|
126
159
|
* @param {string[]} addClasses - List of classes need to be add to the element
|
|
127
160
|
* @param {string[]} removeClasses - List of classes need to be remove from the element
|
|
128
|
-
* @
|
|
161
|
+
* @returns {void} ?
|
|
129
162
|
* @private
|
|
130
163
|
*/
|
|
131
164
|
export declare function classList(element: Element, addClasses: string[], removeClasses: string[]): void;
|
|
132
165
|
/**
|
|
133
166
|
* Method to check whether the element matches the given selector.
|
|
167
|
+
*
|
|
134
168
|
* @param {Element} element - Element to compare with the selector.
|
|
135
169
|
* @param {string} selector - String selector which element will satisfy.
|
|
136
|
-
* @
|
|
170
|
+
* @returns {void} ?
|
|
137
171
|
* @private
|
|
138
172
|
*/
|
|
139
173
|
export declare function matches(element: Element, selector: string): boolean;
|
|
140
|
-
|
|
141
|
-
|
|
174
|
+
/**
|
|
175
|
+
* Method to get the html text from DOM.
|
|
176
|
+
*
|
|
177
|
+
* @param {HTMLElement} ele - Element to compare with the selector.
|
|
178
|
+
* @param {string} innerHTML - String selector which element will satisfy.
|
|
179
|
+
* @returns {void} ?
|
|
180
|
+
* @private
|
|
181
|
+
*/
|
|
182
|
+
export declare function includeInnerHTML(ele: HTMLElement, innerHTML: string): void;
|
|
183
|
+
/**
|
|
184
|
+
* Method to get the containsclass.
|
|
185
|
+
*
|
|
186
|
+
* @param {HTMLElement} ele - Element to compare with the selector.
|
|
187
|
+
* @param {string} className - String selector which element will satisfy.
|
|
188
|
+
* @returns {any} ?
|
|
189
|
+
* @private
|
|
190
|
+
*/
|
|
191
|
+
export declare function containsClass(ele: HTMLElement, className: string): any;
|
|
142
192
|
/**
|
|
143
193
|
* Method to check whether the element matches the given selector.
|
|
144
|
-
*
|
|
145
|
-
* @param {
|
|
146
|
-
* @
|
|
194
|
+
*
|
|
195
|
+
* @param {Object} element - Element to compare with the selector.
|
|
196
|
+
* @param {boolean} deep ?
|
|
197
|
+
* @returns {any} ?
|
|
147
198
|
* @private
|
|
148
199
|
*/
|
|
149
200
|
export declare function cloneNode(element: Object, deep?: boolean): any;
|