@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/base.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { isUndefined, isNullOrUndefined, merge, setImmediate, setValue, isBlazor, getValue, extend } from './util';
|
|
2
2
|
import { addClass, removeClass } from './dom';
|
|
3
3
|
import { Observer } from './observer';
|
|
4
|
-
var isColEName = new RegExp('
|
|
4
|
+
var isColEName = new RegExp(']');
|
|
5
5
|
/* tslint:enable:no-any */
|
|
6
6
|
/**
|
|
7
7
|
* Base library module is common module for Framework modules like touch,keyboard and etc.,
|
|
8
|
+
*
|
|
8
9
|
* @private
|
|
9
10
|
*/
|
|
10
11
|
var Base = /** @class */ (function () {
|
|
11
12
|
/**
|
|
12
13
|
* Base constructor accept options and element
|
|
14
|
+
*
|
|
15
|
+
* @param {Object} options ?
|
|
16
|
+
* @param {string} element ?
|
|
13
17
|
*/
|
|
14
18
|
function Base(options, element) {
|
|
15
19
|
this.isRendered = false;
|
|
@@ -23,7 +27,7 @@ var Base = /** @class */ (function () {
|
|
|
23
27
|
this.bulkChanges = {};
|
|
24
28
|
this.refreshing = false;
|
|
25
29
|
this.ignoreCollectionWatch = false;
|
|
26
|
-
//
|
|
30
|
+
// eslint-disable-next-line
|
|
27
31
|
this.finalUpdate = function () { };
|
|
28
32
|
this.childChangedProperties = {};
|
|
29
33
|
this.modelObserver = new Observer(this);
|
|
@@ -47,9 +51,11 @@ var Base = /** @class */ (function () {
|
|
|
47
51
|
/** Property base section */
|
|
48
52
|
/**
|
|
49
53
|
* Function used to set bunch of property at a time.
|
|
54
|
+
*
|
|
50
55
|
* @private
|
|
51
56
|
* @param {Object} prop - JSON object which holds components properties.
|
|
52
|
-
* @param {boolean} muteOnChange? - Specifies to true when we set properties.
|
|
57
|
+
* @param {boolean} muteOnChange ? - Specifies to true when we set properties.
|
|
58
|
+
* @returns {void} ?
|
|
53
59
|
*/
|
|
54
60
|
Base.prototype.setProperties = function (prop, muteOnChange) {
|
|
55
61
|
var prevDetection = this.isProtectedOnChange;
|
|
@@ -67,12 +73,12 @@ var Base = /** @class */ (function () {
|
|
|
67
73
|
this.oldProperties = {};
|
|
68
74
|
this.isProtectedOnChange = prevDetection;
|
|
69
75
|
};
|
|
70
|
-
;
|
|
71
76
|
/**
|
|
72
77
|
* Calls for child element data bind
|
|
73
|
-
*
|
|
74
|
-
* @param {Object}
|
|
75
|
-
* @
|
|
78
|
+
*
|
|
79
|
+
* @param {Object} obj ?
|
|
80
|
+
* @param {Object} parent ?
|
|
81
|
+
* @returns {void} ?
|
|
76
82
|
*/
|
|
77
83
|
// tslint:disable-next-line:no-any
|
|
78
84
|
Base.callChildDataBind = function (obj, parent) {
|
|
@@ -100,6 +106,8 @@ var Base = /** @class */ (function () {
|
|
|
100
106
|
};
|
|
101
107
|
/**
|
|
102
108
|
* Bind property changes immediately to components
|
|
109
|
+
*
|
|
110
|
+
* @returns {void} ?
|
|
103
111
|
*/
|
|
104
112
|
Base.prototype.dataBind = function () {
|
|
105
113
|
Base.callChildDataBind(this.childChangedProperties, this);
|
|
@@ -113,7 +121,6 @@ var Base = /** @class */ (function () {
|
|
|
113
121
|
this.isProtectedOnChange = prevDetection;
|
|
114
122
|
}
|
|
115
123
|
};
|
|
116
|
-
;
|
|
117
124
|
/* tslint:disable:no-any */
|
|
118
125
|
Base.prototype.serverDataBind = function (newChanges) {
|
|
119
126
|
if (!isBlazor()) {
|
|
@@ -143,35 +150,37 @@ var Base = /** @class */ (function () {
|
|
|
143
150
|
this.finalUpdate();
|
|
144
151
|
this.finalUpdate = setImmediate(this.dataBind.bind(this));
|
|
145
152
|
};
|
|
146
|
-
;
|
|
147
153
|
/** Event Base Section */
|
|
148
154
|
/**
|
|
149
155
|
* Adds the handler to the given event listener.
|
|
156
|
+
*
|
|
150
157
|
* @param {string} eventName - A String that specifies the name of the event
|
|
151
|
-
* @param {Function}
|
|
152
|
-
* @
|
|
158
|
+
* @param {Function} handler - Specifies the call to run when the event occurs.
|
|
159
|
+
* @returns {void} ?
|
|
153
160
|
*/
|
|
154
161
|
Base.prototype.addEventListener = function (eventName, handler) {
|
|
155
162
|
this.modelObserver.on(eventName, handler);
|
|
156
163
|
};
|
|
157
164
|
/**
|
|
158
165
|
* Removes the handler from the given event listener.
|
|
166
|
+
*
|
|
159
167
|
* @param {string} eventName - A String that specifies the name of the event to remove
|
|
160
|
-
* @param {Function}
|
|
161
|
-
* @
|
|
168
|
+
* @param {Function} handler - Specifies the function to remove
|
|
169
|
+
* @returns {void} ?
|
|
162
170
|
*/
|
|
163
171
|
Base.prototype.removeEventListener = function (eventName, handler) {
|
|
164
172
|
this.modelObserver.off(eventName, handler);
|
|
165
173
|
};
|
|
166
174
|
/**
|
|
167
175
|
* Triggers the handlers in the specified event.
|
|
176
|
+
*
|
|
168
177
|
* @private
|
|
169
178
|
* @param {string} eventName - Specifies the event to trigger for the specified component properties.
|
|
170
179
|
* Can be a custom event, or any of the standard events.
|
|
171
180
|
* @param {Event} eventProp - Additional parameters to pass on to the event properties
|
|
172
181
|
* @param {Function} successHandler - this function will invoke after event successfully triggered
|
|
173
182
|
* @param {Function} errorHandler - this function will invoke after event if it failured to call.
|
|
174
|
-
* @
|
|
183
|
+
* @returns {void} ?
|
|
175
184
|
*/
|
|
176
185
|
Base.prototype.trigger = function (eventName, eventProp, successHandler, errorHandler) {
|
|
177
186
|
var _this = this;
|
|
@@ -225,6 +234,8 @@ var Base = /** @class */ (function () {
|
|
|
225
234
|
};
|
|
226
235
|
/**
|
|
227
236
|
* To maintain instance in base class
|
|
237
|
+
*
|
|
238
|
+
* @returns {void} ?
|
|
228
239
|
*/
|
|
229
240
|
Base.prototype.addInstance = function () {
|
|
230
241
|
// Add module class to the root element
|
|
@@ -239,9 +250,12 @@ var Base = /** @class */ (function () {
|
|
|
239
250
|
};
|
|
240
251
|
/**
|
|
241
252
|
* To remove the instance from the element
|
|
253
|
+
*
|
|
254
|
+
* @returns {void} ?
|
|
242
255
|
*/
|
|
243
256
|
Base.prototype.destroy = function () {
|
|
244
257
|
var _this = this;
|
|
258
|
+
// eslint-disable-next-line
|
|
245
259
|
this.element.ej2_instances =
|
|
246
260
|
this.element.ej2_instances.filter(function (i) { return i !== _this; });
|
|
247
261
|
removeClass([this.element], ['e-' + this.getModuleName()]);
|
|
@@ -258,8 +272,10 @@ var Base = /** @class */ (function () {
|
|
|
258
272
|
export { Base };
|
|
259
273
|
/**
|
|
260
274
|
* Global function to get the component instance from the rendered element.
|
|
261
|
-
*
|
|
262
|
-
* @param
|
|
275
|
+
*
|
|
276
|
+
* @param {HTMLElement} elem Specifies the HTMLElement or element id string.
|
|
277
|
+
* @param {string} comp Specifies the component module name or Component.
|
|
278
|
+
* @returns {any} ?
|
|
263
279
|
*/
|
|
264
280
|
// tslint:disable-next-line:no-any
|
|
265
281
|
export function getComponent(elem, comp) {
|
|
@@ -285,6 +301,8 @@ export function getComponent(elem, comp) {
|
|
|
285
301
|
}
|
|
286
302
|
/**
|
|
287
303
|
* Function to remove the child instances.
|
|
304
|
+
*
|
|
305
|
+
* @param {HTMLElement} element ?
|
|
288
306
|
* @return {void}
|
|
289
307
|
* @private
|
|
290
308
|
*/
|
package/src/browser.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get configuration details for Browser
|
|
3
|
+
*
|
|
3
4
|
* @private
|
|
4
5
|
*/
|
|
5
6
|
export declare class Browser {
|
|
@@ -7,115 +8,152 @@ export declare class Browser {
|
|
|
7
8
|
private static extractBrowserDetail;
|
|
8
9
|
/**
|
|
9
10
|
* To get events from the browser
|
|
11
|
+
*
|
|
10
12
|
* @param {string} event - type of event triggered.
|
|
11
|
-
* @returns {
|
|
13
|
+
* @returns {boolean}
|
|
12
14
|
*/
|
|
13
15
|
private static getEvent;
|
|
14
16
|
/**
|
|
15
17
|
* To get the Touch start event from browser
|
|
18
|
+
*
|
|
16
19
|
* @returns {string}
|
|
17
20
|
*/
|
|
18
21
|
private static getTouchStartEvent;
|
|
19
22
|
/**
|
|
20
23
|
* To get the Touch end event from browser
|
|
24
|
+
*
|
|
21
25
|
* @returns {string}
|
|
22
26
|
*/
|
|
23
27
|
private static getTouchEndEvent;
|
|
24
28
|
/**
|
|
25
29
|
* To get the Touch move event from browser
|
|
30
|
+
*
|
|
26
31
|
* @returns {string}
|
|
27
32
|
*/
|
|
28
33
|
private static getTouchMoveEvent;
|
|
29
34
|
/**
|
|
30
35
|
* To cancel the touch event from browser
|
|
36
|
+
*
|
|
31
37
|
* @returns {string}
|
|
32
38
|
*/
|
|
33
39
|
private static getTouchCancelEvent;
|
|
34
40
|
/**
|
|
35
41
|
* To get the value based on provided key and regX
|
|
36
|
-
*
|
|
37
|
-
* @param {
|
|
38
|
-
* @
|
|
42
|
+
*
|
|
43
|
+
* @param {string} key ?
|
|
44
|
+
* @param {RegExp} regX ?
|
|
45
|
+
* @returns {Object} ?
|
|
39
46
|
*/
|
|
40
47
|
private static getValue;
|
|
41
48
|
/**
|
|
42
49
|
* Property specifies the userAgent of the browser. Default userAgent value is based on the browser.
|
|
43
50
|
* Also we can set our own userAgent.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} uA ?
|
|
44
53
|
*/
|
|
45
54
|
static userAgent: string;
|
|
46
55
|
/**
|
|
47
56
|
* Property is to get the browser information like Name, Version and Language
|
|
48
|
-
*
|
|
57
|
+
*
|
|
58
|
+
* @returns {BrowserInfo} ?
|
|
49
59
|
*/
|
|
50
60
|
static readonly info: BrowserInfo;
|
|
51
61
|
/**
|
|
52
62
|
* Property is to get whether the userAgent is based IE.
|
|
63
|
+
*
|
|
64
|
+
* @returns {boolean} ?
|
|
53
65
|
*/
|
|
54
|
-
static readonly isIE:
|
|
66
|
+
static readonly isIE: boolean;
|
|
55
67
|
/**
|
|
56
68
|
* Property is to get whether the browser has touch support.
|
|
69
|
+
*
|
|
70
|
+
* @returns {boolean} ?
|
|
57
71
|
*/
|
|
58
|
-
static readonly isTouch:
|
|
72
|
+
static readonly isTouch: boolean;
|
|
59
73
|
/**
|
|
60
74
|
* Property is to get whether the browser has Pointer support.
|
|
75
|
+
*
|
|
76
|
+
* @returns {boolean} ?
|
|
61
77
|
*/
|
|
62
|
-
static readonly isPointer:
|
|
78
|
+
static readonly isPointer: boolean;
|
|
63
79
|
/**
|
|
64
80
|
* Property is to get whether the browser has MSPointer support.
|
|
81
|
+
*
|
|
82
|
+
* @returns {boolean} ?
|
|
65
83
|
*/
|
|
66
|
-
static readonly isMSPointer:
|
|
84
|
+
static readonly isMSPointer: boolean;
|
|
67
85
|
/**
|
|
68
86
|
* Property is to get whether the userAgent is device based.
|
|
87
|
+
*
|
|
88
|
+
* @returns {boolean} ?
|
|
69
89
|
*/
|
|
70
|
-
static readonly isDevice:
|
|
90
|
+
static readonly isDevice: boolean;
|
|
71
91
|
/**
|
|
72
92
|
* Property is to get whether the userAgent is IOS.
|
|
93
|
+
*
|
|
94
|
+
* @returns {boolean} ?
|
|
73
95
|
*/
|
|
74
|
-
static readonly isIos:
|
|
96
|
+
static readonly isIos: boolean;
|
|
75
97
|
/**
|
|
76
98
|
* Property is to get whether the userAgent is Ios7.
|
|
99
|
+
*
|
|
100
|
+
* @returns {boolean} ?
|
|
77
101
|
*/
|
|
78
|
-
static readonly isIos7:
|
|
102
|
+
static readonly isIos7: boolean;
|
|
79
103
|
/**
|
|
80
104
|
* Property is to get whether the userAgent is Android.
|
|
105
|
+
*
|
|
106
|
+
* @returns {boolean} ?
|
|
81
107
|
*/
|
|
82
|
-
static readonly isAndroid:
|
|
108
|
+
static readonly isAndroid: boolean;
|
|
83
109
|
/**
|
|
84
110
|
* Property is to identify whether application ran in web view.
|
|
111
|
+
*
|
|
112
|
+
* @returns {boolean} ?
|
|
85
113
|
*/
|
|
86
|
-
static readonly isWebView:
|
|
114
|
+
static readonly isWebView: boolean;
|
|
87
115
|
/**
|
|
88
116
|
* Property is to get whether the userAgent is Windows.
|
|
117
|
+
*
|
|
118
|
+
* @returns {boolean} ?
|
|
89
119
|
*/
|
|
90
|
-
static readonly isWindows:
|
|
120
|
+
static readonly isWindows: boolean;
|
|
91
121
|
/**
|
|
92
122
|
* Property is to get the touch start event. It returns event name based on browser.
|
|
123
|
+
*
|
|
124
|
+
* @returns {string} ?
|
|
93
125
|
*/
|
|
94
126
|
static readonly touchStartEvent: string;
|
|
95
127
|
/**
|
|
96
128
|
* Property is to get the touch move event. It returns event name based on browser.
|
|
129
|
+
*
|
|
130
|
+
* @returns {string} ?
|
|
97
131
|
*/
|
|
98
132
|
static readonly touchMoveEvent: string;
|
|
99
133
|
/**
|
|
100
134
|
* Property is to get the touch end event. It returns event name based on browser.
|
|
135
|
+
*
|
|
136
|
+
* @returns {string} ?
|
|
101
137
|
*/
|
|
102
138
|
static readonly touchEndEvent: string;
|
|
103
139
|
/**
|
|
104
140
|
* Property is to cancel the touch end event.
|
|
141
|
+
*
|
|
142
|
+
* @returns {string} ?
|
|
105
143
|
*/
|
|
106
144
|
static readonly touchCancelEvent: string;
|
|
107
145
|
}
|
|
108
146
|
export interface BrowserDetails {
|
|
109
|
-
isAndroid?:
|
|
110
|
-
isDevice?:
|
|
111
|
-
isIE?:
|
|
112
|
-
isIos?:
|
|
113
|
-
isIos7?:
|
|
114
|
-
isMSPointer?:
|
|
115
|
-
isPointer?:
|
|
116
|
-
isTouch?:
|
|
117
|
-
isWebView?:
|
|
118
|
-
isWindows?:
|
|
147
|
+
isAndroid?: boolean;
|
|
148
|
+
isDevice?: boolean;
|
|
149
|
+
isIE?: boolean;
|
|
150
|
+
isIos?: boolean;
|
|
151
|
+
isIos7?: boolean;
|
|
152
|
+
isMSPointer?: boolean;
|
|
153
|
+
isPointer?: boolean;
|
|
154
|
+
isTouch?: boolean;
|
|
155
|
+
isWebView?: boolean;
|
|
156
|
+
isWindows?: boolean;
|
|
119
157
|
info?: BrowserInfo;
|
|
120
158
|
touchStartEvent?: string;
|
|
121
159
|
touchMoveEvent?: string;
|
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;
|