@syncfusion/ej2-base 25.2.7 → 26.1.35-7502
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/{README.md → ReadMe.md} +100 -100
- package/bin/syncfusion-license.js +104 -1
- package/dist/ej2-base.min.js +1 -10
- package/dist/ej2-base.umd.min.js +1 -10
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +268 -486
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +307 -522
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +1 -10
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/dist/ts/undefined +67 -0
- package/e2e/crypto.js +16 -16
- package/e2e/index.d.ts +27 -27
- package/e2e/m.protractor.config.js +286 -286
- package/e2e/modified-protractor/protractor.config.js +316 -316
- package/e2e/protractor.config.js +389 -389
- package/helpers/e2e/index.js +3 -3
- package/license +10 -10
- package/package.json +225 -161
- package/src/ajax.d.ts +1 -1
- package/src/ajax.js +3 -7
- package/src/animation-model.d.ts +41 -41
- package/src/animation.d.ts +1 -1
- package/src/animation.js +20 -22
- package/src/base.d.ts +2 -1
- package/src/base.js +4 -13
- package/src/browser.d.ts +1 -1
- package/src/browser.js +3 -4
- package/src/child-property.d.ts +1 -0
- package/src/child-property.js +2 -2
- package/src/component-model.d.ts +16 -16
- package/src/component.d.ts +4 -0
- package/src/component.js +28 -36
- package/src/dom.js +4 -11
- package/src/draggable-model.d.ts +113 -113
- package/src/draggable.js +20 -41
- package/src/droppable-model.d.ts +23 -23
- package/src/droppable.js +19 -20
- package/src/event-handler.js +2 -6
- package/src/fetch.js +1 -2
- package/src/hijri-parser.js +3 -3
- package/src/internationalization.d.ts +4 -0
- package/src/internationalization.js +0 -5
- package/src/intl/date-formatter.js +19 -33
- package/src/intl/date-parser.js +33 -62
- package/src/intl/intl-base.d.ts +9 -1
- package/src/intl/intl-base.js +19 -18
- package/src/intl/number-formatter.js +14 -7
- package/src/intl/number-parser.js +2 -6
- package/src/intl/parser-base.js +6 -11
- package/src/keyboard-model.d.ts +16 -16
- package/src/keyboard.js +19 -20
- package/src/module-loader.js +1 -0
- package/src/notify-property-change.d.ts +0 -20
- package/src/notify-property-change.js +16 -55
- package/src/observer.js +3 -6
- package/src/sanitize-helper.js +0 -1
- package/src/template-engine.js +1 -7
- package/src/template.js +13 -18
- package/src/touch-model.d.ts +39 -39
- package/src/touch.js +22 -27
- package/src/util.d.ts +4 -4
- package/src/util.js +12 -37
- package/src/validate-lic.js +4 -3
- package/styles/_all.scss +2 -2
- package/styles/_bds-dark-definition.scss +16 -15
- package/styles/_bds-definition.scss +16 -15
- package/styles/_bootstrap-dark-definition.scss +42 -42
- package/styles/_bootstrap-definition.scss +42 -42
- package/styles/_bootstrap4-definition.scss +11 -11
- package/styles/_bootstrap5-dark-definition.scss +9 -9
- package/styles/_bootstrap5-definition.scss +8 -8
- package/styles/_bootstrap5.3-dark-definition.scss +8 -0
- package/styles/_bootstrap5.3-definition.scss +8 -0
- package/styles/_fabric-dark-definition.scss +42 -42
- package/styles/_fabric-definition.scss +42 -42
- package/styles/_fluent-dark-definition.scss +9 -9
- package/styles/_fluent-definition.scss +9 -9
- package/styles/_fluent2-dark-definition.scss +9 -0
- package/styles/_fluent2-definition.scss +9 -0
- package/styles/_fluent2-highcontrast-definition.scss +9 -0
- package/styles/_fusionnew-dark-definition.scss +8 -8
- package/styles/_fusionnew-definition.scss +8 -8
- package/styles/_highcontrast-definition.scss +42 -42
- package/styles/_highcontrast-light-definition.scss +42 -42
- package/styles/_material-dark-definition.scss +49 -48
- package/styles/_material-definition.scss +50 -49
- package/styles/_material3-dark-definition.scss +15 -14
- package/styles/_material3-definition.scss +16 -15
- package/styles/_tailwind-dark-definition.scss +16 -15
- package/styles/_tailwind-definition.scss +16 -15
- package/styles/_tailwind3-dark-definition.scss +15 -0
- package/styles/_tailwind3-definition.scss +15 -0
- package/styles/animation/_all.scss +535 -560
- package/styles/bds-lite.css +3408 -0
- package/styles/bds-lite.scss +3 -0
- package/styles/bds.css +3408 -0
- package/styles/bds.scss +3 -0
- package/styles/bootstrap-dark-lite.css +3749 -0
- package/styles/bootstrap-dark-lite.scss +3 -0
- package/styles/bootstrap-dark.css +1075 -169
- package/styles/bootstrap-lite.css +3749 -0
- package/styles/bootstrap-lite.scss +3 -0
- package/styles/bootstrap.css +1075 -169
- package/styles/bootstrap4-lite.css +3390 -0
- package/styles/bootstrap4-lite.scss +3 -0
- package/styles/bootstrap4.css +1063 -169
- package/styles/bootstrap5-dark-lite.css +2966 -0
- package/styles/bootstrap5-dark-lite.scss +3 -0
- package/styles/bootstrap5-dark.css +1068 -171
- package/styles/bootstrap5-lite.css +2966 -0
- package/styles/bootstrap5-lite.scss +3 -0
- package/styles/bootstrap5.3-lite.css +3559 -0
- package/styles/bootstrap5.3-lite.scss +3 -0
- package/styles/bootstrap5.3.css +3559 -0
- package/styles/bootstrap5.3.scss +3 -0
- package/styles/bootstrap5.css +1066 -169
- package/styles/common/_all.scss +2 -2
- package/styles/common/_core.scss +111 -117
- package/styles/common/_mixin.scss +11 -9
- package/styles/definition/_bds-dark.scss +1193 -1178
- package/styles/definition/_bds.scss +1488 -1458
- package/styles/definition/_bootstrap-dark.scss +213 -219
- package/styles/definition/_bootstrap.scss +208 -215
- package/styles/definition/_bootstrap4.scss +159 -167
- package/styles/definition/_bootstrap5-dark.scss +481 -494
- package/styles/definition/_bootstrap5.3-dark.scss +1232 -0
- package/styles/definition/_bootstrap5.3.scss +1579 -0
- package/styles/definition/_bootstrap5.scss +481 -495
- package/styles/definition/_fabric-dark.scss +194 -200
- package/styles/definition/_fabric.scss +192 -198
- package/styles/definition/_fluent-dark.scss +494 -557
- package/styles/definition/_fluent.scss +494 -558
- package/styles/definition/_fluent2-dark.scss +1523 -0
- package/styles/definition/_fluent2-highcontrast.scss +1523 -0
- package/styles/definition/_fluent2.scss +2295 -0
- package/styles/definition/_fusionnew-dark.scss +330 -362
- package/styles/definition/_fusionnew.scss +331 -363
- package/styles/definition/_highcontrast-light.scss +189 -193
- package/styles/definition/_highcontrast.scss +189 -195
- package/styles/definition/_material-dark.scss +193 -198
- package/styles/definition/_material.scss +186 -192
- package/styles/definition/_material3-dark.scss +660 -710
- package/styles/definition/_material3.scss +729 -792
- package/styles/definition/_tailwind-dark.scss +445 -488
- package/styles/definition/_tailwind.scss +443 -485
- package/styles/definition/_tailwind3-dark.scss +1622 -0
- package/styles/definition/_tailwind3.scss +2093 -0
- package/styles/fabric-dark-lite.css +3734 -0
- package/styles/fabric-dark-lite.scss +3 -0
- package/styles/fabric-dark.css +1075 -169
- package/styles/fabric-lite.css +3734 -0
- package/styles/fabric-lite.scss +3 -0
- package/styles/fabric.css +1075 -169
- package/styles/fluent-dark-lite.css +2966 -0
- package/styles/fluent-dark-lite.scss +3 -0
- package/styles/fluent-dark.css +1066 -169
- package/styles/fluent-lite.css +2966 -0
- package/styles/fluent-lite.scss +3 -0
- package/styles/fluent.css +1066 -169
- package/styles/fluent2-lite.css +4017 -0
- package/styles/fluent2-lite.scss +3 -0
- package/styles/fluent2.css +4017 -0
- package/styles/fluent2.scss +3 -0
- package/styles/highcontrast-light-lite.css +3725 -0
- package/styles/highcontrast-light-lite.scss +3 -0
- package/styles/highcontrast-light.css +1075 -169
- package/styles/highcontrast-lite.css +3725 -0
- package/styles/highcontrast-lite.scss +3 -0
- package/styles/highcontrast.css +1075 -169
- package/styles/material-dark-lite.css +3702 -0
- package/styles/material-dark-lite.scss +3 -0
- package/styles/material-dark.css +1075 -169
- package/styles/material-lite.css +3702 -0
- package/styles/material-lite.scss +3 -0
- package/styles/material.css +1075 -169
- package/styles/material3-dark-lite.css +3021 -0
- package/styles/material3-dark-lite.scss +3 -0
- package/styles/material3-dark.css +1066 -170
- package/styles/material3-lite.css +3077 -0
- package/styles/material3-lite.scss +3 -0
- package/styles/material3.css +1066 -170
- package/styles/offline-theme/material-dark.css +1075 -169
- package/styles/offline-theme/material.css +1075 -169
- package/styles/offline-theme/tailwind-dark.css +1067 -170
- package/styles/offline-theme/tailwind.css +1067 -170
- package/styles/tailwind-dark-lite.css +2967 -0
- package/styles/tailwind-dark-lite.scss +3 -0
- package/styles/tailwind-dark.css +1067 -170
- package/styles/tailwind-lite.css +2967 -0
- package/styles/tailwind-lite.scss +3 -0
- package/styles/tailwind.css +1067 -170
- package/styles/tailwind3-lite.css +3775 -0
- package/styles/tailwind3-lite.scss +3 -0
- package/styles/tailwind3.css +3775 -0
- package/styles/tailwind3.scss +3 -0
- package/.eslintrc.json +0 -260
- package/CHANGELOG.md +0 -649
- package/tslint.json +0 -111
|
@@ -18,7 +18,6 @@ function disableBlazorMode() {
|
|
|
18
18
|
* @returns {any} ?
|
|
19
19
|
* @private
|
|
20
20
|
*/
|
|
21
|
-
// eslint-disable-next-line
|
|
22
21
|
function createInstance(classFunction, params) {
|
|
23
22
|
const arrayParam = params;
|
|
24
23
|
arrayParam.unshift(undefined);
|
|
@@ -33,12 +32,10 @@ function createInstance(classFunction, params) {
|
|
|
33
32
|
*/
|
|
34
33
|
function setImmediate(handler) {
|
|
35
34
|
let unbind;
|
|
36
|
-
// eslint-disable-next-line
|
|
37
35
|
const num = new Uint16Array(5);
|
|
38
36
|
const intCrypto = window.msCrypto || window.crypto;
|
|
39
37
|
intCrypto.getRandomValues(num);
|
|
40
38
|
let secret = 'ej2' + combineArray(num);
|
|
41
|
-
// eslint-disable-next-line
|
|
42
39
|
let messageHandler = (event) => {
|
|
43
40
|
if (event.source === window && typeof event.data === 'string' && event.data.length <= 32 && event.data === secret) {
|
|
44
41
|
handler();
|
|
@@ -60,9 +57,7 @@ function setImmediate(handler) {
|
|
|
60
57
|
* @returns {any} ?
|
|
61
58
|
* @private
|
|
62
59
|
*/
|
|
63
|
-
// eslint-disable-next-line
|
|
64
60
|
function getValue(nameSpace, obj) {
|
|
65
|
-
// eslint-disable-next-line
|
|
66
61
|
let value = obj;
|
|
67
62
|
const splits = nameSpace.replace(/\[/g, '.').replace(/\]/g, '').split('.');
|
|
68
63
|
for (let i = 0; i < splits.length && !isUndefined(value); i++) {
|
|
@@ -79,12 +74,9 @@ function getValue(nameSpace, obj) {
|
|
|
79
74
|
* @returns {any} ?
|
|
80
75
|
* @private
|
|
81
76
|
*/
|
|
82
|
-
// eslint-disable-next-line
|
|
83
77
|
function setValue(nameSpace, value, obj) {
|
|
84
78
|
const keys = nameSpace.replace(/\[/g, '.').replace(/\]/g, '').split('.');
|
|
85
|
-
// eslint-disable-next-line
|
|
86
79
|
const start = obj || {};
|
|
87
|
-
// eslint-disable-next-line
|
|
88
80
|
let fromObj = start;
|
|
89
81
|
let i;
|
|
90
82
|
const length = keys.length;
|
|
@@ -109,14 +101,12 @@ function setValue(nameSpace, value, obj) {
|
|
|
109
101
|
* @returns {void} ?
|
|
110
102
|
* @private
|
|
111
103
|
*/
|
|
112
|
-
// eslint-disable-next-line
|
|
113
104
|
function deleteObject(obj, key) {
|
|
114
105
|
delete obj[`${key}`];
|
|
115
106
|
}
|
|
116
107
|
/**
|
|
117
108
|
*@private
|
|
118
109
|
*/
|
|
119
|
-
// eslint-disable-next-line
|
|
120
110
|
const containerObject = typeof window !== 'undefined' ? window : {};
|
|
121
111
|
/**
|
|
122
112
|
* Check weather the given argument is only object.
|
|
@@ -125,7 +115,6 @@ const containerObject = typeof window !== 'undefined' ? window : {};
|
|
|
125
115
|
* @returns {boolean} ?
|
|
126
116
|
* @private
|
|
127
117
|
*/
|
|
128
|
-
// eslint-disable-next-line
|
|
129
118
|
function isObject(obj) {
|
|
130
119
|
const objCon = {};
|
|
131
120
|
return (!isNullOrUndefined(obj) && obj.constructor === objCon.constructor);
|
|
@@ -138,10 +127,8 @@ function isObject(obj) {
|
|
|
138
127
|
* @returns {any} ?
|
|
139
128
|
* @private
|
|
140
129
|
*/
|
|
141
|
-
// eslint-disable-next-line
|
|
142
130
|
function getEnumValue(enumObject, enumValue) {
|
|
143
|
-
|
|
144
|
-
return enumObject[enumValue];
|
|
131
|
+
return enumObject[`${enumValue}`];
|
|
145
132
|
}
|
|
146
133
|
/**
|
|
147
134
|
* Merge the source object into destination object.
|
|
@@ -181,28 +168,25 @@ function merge(source, destination) {
|
|
|
181
168
|
function extend(copied, first, second, deep) {
|
|
182
169
|
const result = copied && typeof copied === 'object' ? copied : {};
|
|
183
170
|
let length = arguments.length;
|
|
171
|
+
const args = [copied, first, second, deep];
|
|
184
172
|
if (deep) {
|
|
185
173
|
length = length - 1;
|
|
186
174
|
}
|
|
187
175
|
for (let i = 1; i < length; i++) {
|
|
188
|
-
|
|
189
|
-
if (!arguments[i]) {
|
|
176
|
+
if (!args[parseInt(i.toString(), 10)]) {
|
|
190
177
|
continue;
|
|
191
178
|
}
|
|
192
|
-
|
|
193
|
-
let obj1 = arguments[i];
|
|
179
|
+
const obj1 = args[parseInt(i.toString(), 10)];
|
|
194
180
|
Object.keys(obj1).forEach((key) => {
|
|
195
181
|
const src = result[`${key}`];
|
|
196
182
|
const copy = obj1[`${key}`];
|
|
197
183
|
let clone;
|
|
198
184
|
const isArrayChanged = Array.isArray(copy) && Array.isArray(src) && (copy.length !== src.length);
|
|
199
|
-
// eslint-disable-next-line
|
|
200
185
|
const blazorEventExtend = isBlazor() ? (!(src instanceof Event) && !isArrayChanged) : true;
|
|
201
186
|
if (deep && blazorEventExtend && (isObject(copy) || Array.isArray(copy))) {
|
|
202
187
|
if (isObject(copy)) {
|
|
203
188
|
clone = src ? src : {};
|
|
204
|
-
|
|
205
|
-
if (Array.isArray(clone) && clone.hasOwnProperty('isComplexArray')) {
|
|
189
|
+
if (Array.isArray(clone) && Object.prototype.hasOwnProperty.call(clone, 'isComplexArray')) {
|
|
206
190
|
extend(clone, {}, copy, deep);
|
|
207
191
|
}
|
|
208
192
|
else {
|
|
@@ -212,7 +196,6 @@ function extend(copied, first, second, deep) {
|
|
|
212
196
|
else {
|
|
213
197
|
/* istanbul ignore next */
|
|
214
198
|
clone = isBlazor() ? src && Object.keys(copy).length : src ? src : [];
|
|
215
|
-
// eslint-disable-next-line
|
|
216
199
|
result[`${key}`] = extend([], clone, copy, (clone && clone.length) || (copy && copy.length));
|
|
217
200
|
}
|
|
218
201
|
}
|
|
@@ -226,7 +209,7 @@ function extend(copied, first, second, deep) {
|
|
|
226
209
|
/**
|
|
227
210
|
* To check whether the object is null or undefined.
|
|
228
211
|
*
|
|
229
|
-
* @param {
|
|
212
|
+
* @param {any} value - To check the object is null or undefined
|
|
230
213
|
* @returns {boolean} ?
|
|
231
214
|
* @private
|
|
232
215
|
*/
|
|
@@ -236,7 +219,7 @@ function isNullOrUndefined(value) {
|
|
|
236
219
|
/**
|
|
237
220
|
* To check whether the object is undefined.
|
|
238
221
|
*
|
|
239
|
-
* @param {
|
|
222
|
+
* @param {any} value - To check the object is undefined
|
|
240
223
|
* @returns {boolean} ?
|
|
241
224
|
* @private
|
|
242
225
|
*/
|
|
@@ -262,11 +245,8 @@ function getUniqueID(definedName) {
|
|
|
262
245
|
* @private
|
|
263
246
|
*/
|
|
264
247
|
function debounce(eventFunction, delay) {
|
|
265
|
-
// eslint-disable-next-line
|
|
266
248
|
let out;
|
|
267
|
-
return function () {
|
|
268
|
-
// eslint-disable-next-line
|
|
269
|
-
const args = arguments;
|
|
249
|
+
return function (...args) {
|
|
270
250
|
const later = () => {
|
|
271
251
|
out = null;
|
|
272
252
|
return eventFunction.apply(this, args);
|
|
@@ -282,7 +262,6 @@ function debounce(eventFunction, delay) {
|
|
|
282
262
|
* @returns {string} ?
|
|
283
263
|
* @private
|
|
284
264
|
*/
|
|
285
|
-
// eslint-disable-next-line
|
|
286
265
|
function queryParams(data) {
|
|
287
266
|
const array = [];
|
|
288
267
|
const keys = Object.keys(data);
|
|
@@ -339,8 +318,7 @@ function throwError(message) {
|
|
|
339
318
|
throw new Error(message);
|
|
340
319
|
}
|
|
341
320
|
catch (e) {
|
|
342
|
-
|
|
343
|
-
throw e.message + '\n' + e.stack;
|
|
321
|
+
throw new Error(e.message + '\n' + e.stack);
|
|
344
322
|
}
|
|
345
323
|
}
|
|
346
324
|
/**
|
|
@@ -372,7 +350,6 @@ function print(element, printWindow) {
|
|
|
372
350
|
'<script> (function() { window.ready = true; })(); </script>' + '</body></html>');
|
|
373
351
|
printWindow.document.close();
|
|
374
352
|
printWindow.focus();
|
|
375
|
-
// eslint-disable-next-line
|
|
376
353
|
const interval = setInterval(() => {
|
|
377
354
|
if (printWindow.ready) {
|
|
378
355
|
printWindow.print();
|
|
@@ -436,10 +413,8 @@ function getElement(element) {
|
|
|
436
413
|
* @returns {Object} ?
|
|
437
414
|
* @private
|
|
438
415
|
*/
|
|
439
|
-
// eslint-disable-next-line
|
|
440
416
|
function getInstance(element, component) {
|
|
441
|
-
|
|
442
|
-
let elem = (typeof (element) === 'string') ? document.querySelector(element) : element;
|
|
417
|
+
const elem = (typeof (element) === 'string') ? document.querySelector(element) : element;
|
|
443
418
|
if (elem[`${instances}`]) {
|
|
444
419
|
for (const inst of elem[`${instances}`]) {
|
|
445
420
|
if (inst instanceof component) {
|
|
@@ -458,8 +433,7 @@ function getInstance(element, component) {
|
|
|
458
433
|
* @private
|
|
459
434
|
*/
|
|
460
435
|
function addInstance(element, instance) {
|
|
461
|
-
|
|
462
|
-
let elem = (typeof (element) === 'string') ? document.querySelector(element) : element;
|
|
436
|
+
const elem = (typeof (element) === 'string') ? document.querySelector(element) : element;
|
|
463
437
|
if (elem[`${instances}`]) {
|
|
464
438
|
elem[`${instances}`].push(instance);
|
|
465
439
|
}
|
|
@@ -473,13 +447,11 @@ function addInstance(element, instance) {
|
|
|
473
447
|
* @returns {any} ?
|
|
474
448
|
* @private
|
|
475
449
|
*/
|
|
476
|
-
// eslint-disable-next-line
|
|
477
450
|
function uniqueID() {
|
|
478
451
|
if ((typeof window) === 'undefined') {
|
|
479
452
|
return;
|
|
480
453
|
}
|
|
481
|
-
|
|
482
|
-
let num = new Uint16Array(5);
|
|
454
|
+
const num = new Uint16Array(5);
|
|
483
455
|
const intCrypto = window.msCrypto || window.crypto;
|
|
484
456
|
return intCrypto.getRandomValues(num);
|
|
485
457
|
}
|
|
@@ -496,6 +468,7 @@ function combineArray(num) {
|
|
|
496
468
|
return ret;
|
|
497
469
|
}
|
|
498
470
|
|
|
471
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
499
472
|
/**
|
|
500
473
|
* Parser
|
|
501
474
|
*/
|
|
@@ -553,10 +526,8 @@ class ParserBase {
|
|
|
553
526
|
const propKeys = keys || Object.keys(prop);
|
|
554
527
|
const res = {};
|
|
555
528
|
for (const key of propKeys) {
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
// eslint-disable-next-line
|
|
559
|
-
res[prop[key]] = key;
|
|
529
|
+
if (!Object.prototype.hasOwnProperty.call(res, prop[`${key}`])) {
|
|
530
|
+
res[prop[`${key}`]] = key;
|
|
560
531
|
}
|
|
561
532
|
}
|
|
562
533
|
return res;
|
|
@@ -583,8 +554,7 @@ class ParserBase {
|
|
|
583
554
|
const matchKeys = Object.keys(defaultNumberSymbols);
|
|
584
555
|
const ret = {};
|
|
585
556
|
for (const key of matchKeys) {
|
|
586
|
-
|
|
587
|
-
ret[prop[key]] = defaultNumberSymbols[key];
|
|
557
|
+
ret[prop[`${key}`]] = defaultNumberSymbols[`${key}`];
|
|
588
558
|
}
|
|
589
559
|
return ret;
|
|
590
560
|
}
|
|
@@ -617,8 +587,7 @@ class ParserBase {
|
|
|
617
587
|
*/
|
|
618
588
|
static convertValueParts(value, regex, obj) {
|
|
619
589
|
return value.replace(regex, (str) => {
|
|
620
|
-
|
|
621
|
-
return obj[str];
|
|
590
|
+
return obj[`${str}`];
|
|
622
591
|
});
|
|
623
592
|
}
|
|
624
593
|
/**
|
|
@@ -670,7 +639,6 @@ class ParserBase {
|
|
|
670
639
|
* @param {boolean} isNumber ?
|
|
671
640
|
* @returns {NumberMapper} ?
|
|
672
641
|
*/
|
|
673
|
-
// eslint-disable-next-line
|
|
674
642
|
static getNumberMapper(curObj, numberSystem, isNumber) {
|
|
675
643
|
const ret = { mapper: {} };
|
|
676
644
|
const cur = this.getDefaultNumberingSystem(curObj);
|
|
@@ -681,8 +649,7 @@ class ParserBase {
|
|
|
681
649
|
const digits = getValue(cur.nSystem + '._digits', numberSystem);
|
|
682
650
|
if (!isUndefined(digits)) {
|
|
683
651
|
for (const i of latnNumberSystem) {
|
|
684
|
-
|
|
685
|
-
ret.mapper[i] = digits[i];
|
|
652
|
+
ret.mapper[parseInt(i.toString(), 10)] = digits[parseInt(i.toString(), 10)];
|
|
686
653
|
}
|
|
687
654
|
}
|
|
688
655
|
}
|
|
@@ -863,7 +830,7 @@ function getBlazorCurrencySymbol(currencyCode) {
|
|
|
863
830
|
/***
|
|
864
831
|
* Hijri parser
|
|
865
832
|
*/
|
|
866
|
-
// eslint-disable-next-line
|
|
833
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
867
834
|
var HijriParser;
|
|
868
835
|
(function (HijriParser) {
|
|
869
836
|
const dateCorrection = [28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990,
|
|
@@ -979,7 +946,7 @@ var HijriParser;
|
|
|
979
946
|
tYear -= 1;
|
|
980
947
|
tMonth += 12;
|
|
981
948
|
}
|
|
982
|
-
let yPrefix = Math.floor(tYear / 100
|
|
949
|
+
let yPrefix = Math.floor(tYear / 100);
|
|
983
950
|
let julilanOffset = yPrefix - Math.floor(yPrefix / 4.) - 2;
|
|
984
951
|
const julianNumber = Math.floor(365.25 * (tYear + 4716)) + Math.floor(30.6001 * (tMonth + 1)) + day - julilanOffset - 1524;
|
|
985
952
|
yPrefix = Math.floor((julianNumber - 1867216.25) / 36524.25);
|
|
@@ -998,7 +965,7 @@ var HijriParser;
|
|
|
998
965
|
year = c - 4716;
|
|
999
966
|
const modifiedJulianDate = julianNumber - 2400000;
|
|
1000
967
|
// date calculation for year after 2077
|
|
1001
|
-
const iyear = 10631
|
|
968
|
+
const iyear = 10631 / 30;
|
|
1002
969
|
let z = julianNumber - 1948084;
|
|
1003
970
|
const cyc = Math.floor(z / 10631.);
|
|
1004
971
|
z = z - 10631 * cyc;
|
|
@@ -1068,7 +1035,6 @@ var HijriParser;
|
|
|
1068
1035
|
const abbreviateRegexGlobal = /\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi;
|
|
1069
1036
|
const standalone = 'stand-alone';
|
|
1070
1037
|
const weekdayKey = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
|
|
1071
|
-
|
|
1072
1038
|
const timeSetter = {
|
|
1073
1039
|
m: 'getMinutes',
|
|
1074
1040
|
h: 'getHours',
|
|
@@ -1095,7 +1061,6 @@ const datePartMatcher = {
|
|
|
1095
1061
|
'f': 'milliseconds'
|
|
1096
1062
|
};
|
|
1097
1063
|
const timeSeparator = 'timeSeparator';
|
|
1098
|
-
/* tslint:disable no-any */
|
|
1099
1064
|
/**
|
|
1100
1065
|
* Date Format is a framework provides support for date formatting.
|
|
1101
1066
|
*
|
|
@@ -1143,34 +1108,30 @@ class DateFormat {
|
|
|
1143
1108
|
case 'E':
|
|
1144
1109
|
case 'c':
|
|
1145
1110
|
if (isBlazor()) {
|
|
1146
|
-
|
|
1147
|
-
formatOptions.weekday = getValue('days.' + IntlBase.monthIndex[len], dateObject);
|
|
1111
|
+
formatOptions.weekday = getValue('days.' + IntlBase.monthIndex[`${len}`], dateObject);
|
|
1148
1112
|
}
|
|
1149
1113
|
else {
|
|
1150
|
-
|
|
1151
|
-
formatOptions.weekday = dependable.dateObject[IntlBase.days][standalone][IntlBase.monthIndex[len]];
|
|
1114
|
+
formatOptions.weekday = dependable.dateObject[`${IntlBase.days}`][`${standalone}`][IntlBase.monthIndex[`${len}`]];
|
|
1152
1115
|
}
|
|
1153
1116
|
break;
|
|
1154
1117
|
case 'M':
|
|
1155
1118
|
case 'L':
|
|
1156
1119
|
if (isBlazor()) {
|
|
1157
|
-
|
|
1158
|
-
formatOptions.month = getValue('months.' + IntlBase.monthIndex[len], dateObject);
|
|
1120
|
+
formatOptions.month = getValue('months.' + IntlBase.monthIndex[`${len}`], dateObject);
|
|
1159
1121
|
}
|
|
1160
1122
|
else {
|
|
1161
|
-
|
|
1162
|
-
formatOptions.month = dependable.dateObject[IntlBase.month][standalone][IntlBase.monthIndex[len]];
|
|
1123
|
+
formatOptions.month = dependable.dateObject[`${IntlBase.month}`][`${standalone}`][IntlBase.monthIndex[`${len}`]];
|
|
1163
1124
|
}
|
|
1164
1125
|
break;
|
|
1165
1126
|
case 'a':
|
|
1166
1127
|
formatOptions.designator = isBlazor() ?
|
|
1167
1128
|
getValue('dayPeriods', dateObject) : getValue('dayPeriods.format.wide', dateObject);
|
|
1168
1129
|
break;
|
|
1169
|
-
case 'G':
|
|
1170
|
-
// eslint-disable-next-line
|
|
1130
|
+
case 'G': {
|
|
1171
1131
|
const eText = (len <= 3) ? 'eraAbbr' : (len === 4) ? 'eraNames' : 'eraNarrow';
|
|
1172
1132
|
formatOptions.era = isBlazor() ? getValue('eras', dateObject) : getValue('eras.' + eText, dependable.dateObject);
|
|
1173
1133
|
break;
|
|
1134
|
+
}
|
|
1174
1135
|
case 'z':
|
|
1175
1136
|
formatOptions.timeZone = getValue('dates.timeZoneNames', dependable.parserObject);
|
|
1176
1137
|
break;
|
|
@@ -1212,8 +1173,7 @@ class DateFormat {
|
|
|
1212
1173
|
case 'L':
|
|
1213
1174
|
curval = dObject.month;
|
|
1214
1175
|
if (length > 2) {
|
|
1215
|
-
|
|
1216
|
-
ret += options.month[curval];
|
|
1176
|
+
ret += options.month[`${curval}`];
|
|
1217
1177
|
}
|
|
1218
1178
|
else {
|
|
1219
1179
|
isNumber = true;
|
|
@@ -1221,8 +1181,7 @@ class DateFormat {
|
|
|
1221
1181
|
break;
|
|
1222
1182
|
case 'E':
|
|
1223
1183
|
case 'c':
|
|
1224
|
-
|
|
1225
|
-
ret += options.weekday[weekdayKey[value.getDay()]];
|
|
1184
|
+
ret += options.weekday[`${weekdayKey[value.getDay()]}`];
|
|
1226
1185
|
break;
|
|
1227
1186
|
case 'H':
|
|
1228
1187
|
case 'h':
|
|
@@ -1237,8 +1196,7 @@ class DateFormat {
|
|
|
1237
1196
|
else if (char === 'f') {
|
|
1238
1197
|
isNumber = false;
|
|
1239
1198
|
processNumber = true;
|
|
1240
|
-
|
|
1241
|
-
curvalstr = value[timeSetter[char]]().toString();
|
|
1199
|
+
curvalstr = value[`${timeSetter[`${char}`]}`]().toString();
|
|
1242
1200
|
curvalstr = curvalstr.substring(0, length);
|
|
1243
1201
|
const curlength = curvalstr.length;
|
|
1244
1202
|
if (length !== curlength) {
|
|
@@ -1252,8 +1210,7 @@ class DateFormat {
|
|
|
1252
1210
|
curstr += curvalstr;
|
|
1253
1211
|
}
|
|
1254
1212
|
else {
|
|
1255
|
-
|
|
1256
|
-
curval = value[timeSetter[char]]();
|
|
1213
|
+
curval = value[`${timeSetter[`${char}`]}`]();
|
|
1257
1214
|
}
|
|
1258
1215
|
if (char === 'h') {
|
|
1259
1216
|
curval = curval % 12 || 12;
|
|
@@ -1266,30 +1223,25 @@ class DateFormat {
|
|
|
1266
1223
|
curstr = curstr.substr(curstr.length - 2);
|
|
1267
1224
|
}
|
|
1268
1225
|
break;
|
|
1269
|
-
case 'a':
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
// eslint-disable-next-line
|
|
1273
|
-
ret += options.designator[desig];
|
|
1226
|
+
case 'a': {
|
|
1227
|
+
const desig = value.getHours() < 12 ? 'am' : 'pm';
|
|
1228
|
+
ret += options.designator[`${desig}`];
|
|
1274
1229
|
break;
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
let retu = options.era[dec];
|
|
1230
|
+
}
|
|
1231
|
+
case 'G': {
|
|
1232
|
+
const dec = value.getFullYear() < 0 ? 0 : 1;
|
|
1233
|
+
let retu = options.era[`${dec}`];
|
|
1280
1234
|
if (isNullOrUndefined(retu)) {
|
|
1281
|
-
// eslint-disable-next-line
|
|
1282
1235
|
retu = options.era[dec ? 0 : 1];
|
|
1283
1236
|
}
|
|
1284
1237
|
ret += retu || '';
|
|
1285
1238
|
break;
|
|
1239
|
+
}
|
|
1286
1240
|
case '\'':
|
|
1287
1241
|
ret += (match === '\'\'') ? '\'' : match.replace(/'/g, '');
|
|
1288
1242
|
break;
|
|
1289
|
-
case 'z':
|
|
1290
|
-
|
|
1291
|
-
let timezone = value.getTimezoneOffset();
|
|
1292
|
-
// eslint-disable-next-line
|
|
1243
|
+
case 'z': {
|
|
1244
|
+
const timezone = value.getTimezoneOffset();
|
|
1293
1245
|
let pattern = (length < 4) ? '+H;-H' : options.timeZone.hourFormat;
|
|
1294
1246
|
pattern = pattern.replace(/:/g, options.numMapper.timeSeparator);
|
|
1295
1247
|
if (timezone === 0) {
|
|
@@ -1301,9 +1253,9 @@ class DateFormat {
|
|
|
1301
1253
|
}
|
|
1302
1254
|
curstr = options.timeZone.gmtFormat.replace(/\{0\}/, curstr);
|
|
1303
1255
|
break;
|
|
1256
|
+
}
|
|
1304
1257
|
case ':':
|
|
1305
|
-
|
|
1306
|
-
ret += options.numMapper.numberSymbols[timeSeparator];
|
|
1258
|
+
ret += options.numMapper.numberSymbols[`${timeSeparator}`];
|
|
1307
1259
|
break;
|
|
1308
1260
|
case '/':
|
|
1309
1261
|
ret += options.dateSeperator;
|
|
@@ -1365,6 +1317,7 @@ class DateFormat {
|
|
|
1365
1317
|
}
|
|
1366
1318
|
}
|
|
1367
1319
|
|
|
1320
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1368
1321
|
const errorText = {
|
|
1369
1322
|
'ms': 'minimumSignificantDigits',
|
|
1370
1323
|
'ls': 'maximumSignificantDigits',
|
|
@@ -1373,7 +1326,7 @@ const errorText = {
|
|
|
1373
1326
|
};
|
|
1374
1327
|
const percentSign = 'percentSign';
|
|
1375
1328
|
const minusSign = 'minusSign';
|
|
1376
|
-
const mapper
|
|
1329
|
+
const mapper = ['infinity', 'nan', 'group', 'decimal', 'exponential'];
|
|
1377
1330
|
/**
|
|
1378
1331
|
* Module for number formatting.
|
|
1379
1332
|
*
|
|
@@ -1397,8 +1350,7 @@ class NumberFormat {
|
|
|
1397
1350
|
const numObject = dependable.numericObject;
|
|
1398
1351
|
dOptions.numberMapper = isBlazor() ? extend({}, numObject) :
|
|
1399
1352
|
ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr), true);
|
|
1400
|
-
dOptions.currencySymbol = isBlazor() ? getValue('currencySymbol', numObject) : IntlBase.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode, option.altSymbol);
|
|
1401
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1353
|
+
dOptions.currencySymbol = isBlazor() ? getValue('currencySymbol', numObject) : IntlBase.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode, option.altSymbol, option.ignoreCurrency);
|
|
1402
1354
|
dOptions.percentSymbol = isBlazor() ? getValue('numberSymbols.percentSign', numObject) :
|
|
1403
1355
|
dOptions.numberMapper.numberSymbols[`${percentSign}`];
|
|
1404
1356
|
dOptions.minusSymbol = isBlazor() ? getValue('numberSymbols.minusSign', numObject) :
|
|
@@ -1406,6 +1358,9 @@ class NumberFormat {
|
|
|
1406
1358
|
const symbols = dOptions.numberMapper.numberSymbols;
|
|
1407
1359
|
if ((option.format) && !(IntlBase.formatRegex.test(option.format))) {
|
|
1408
1360
|
cOptions = IntlBase.customFormat(option.format, dOptions, dependable.numericObject);
|
|
1361
|
+
if (!isUndefined(fOptions.useGrouping) && fOptions.useGrouping) {
|
|
1362
|
+
fOptions.useGrouping = cOptions.pData.useGrouping;
|
|
1363
|
+
}
|
|
1409
1364
|
}
|
|
1410
1365
|
else {
|
|
1411
1366
|
extend(fOptions, IntlBase.getProperNumericSkeleton(option.format || 'N'));
|
|
@@ -1430,7 +1385,7 @@ class NumberFormat {
|
|
|
1430
1385
|
cOptions.nData = IntlBase.getFormatData(split[1] || '-' + split[0], true, dOptions.currencySymbol);
|
|
1431
1386
|
cOptions.pData = IntlBase.getFormatData(split[0], false, dOptions.currencySymbol);
|
|
1432
1387
|
if (fOptions.useGrouping) {
|
|
1433
|
-
fOptions.groupSeparator = symbols[mapper
|
|
1388
|
+
fOptions.groupSeparator = symbols[mapper[2]];
|
|
1434
1389
|
fOptions.groupData = this.getGroupingDetails(split[0]);
|
|
1435
1390
|
}
|
|
1436
1391
|
}
|
|
@@ -1461,10 +1416,10 @@ class NumberFormat {
|
|
|
1461
1416
|
extend(cOptions.pData, fOptions);
|
|
1462
1417
|
return (value) => {
|
|
1463
1418
|
if (isNaN(value)) {
|
|
1464
|
-
return symbols[mapper
|
|
1419
|
+
return symbols[mapper[1]];
|
|
1465
1420
|
}
|
|
1466
1421
|
else if (!isFinite(value)) {
|
|
1467
|
-
return symbols[mapper
|
|
1422
|
+
return symbols[mapper[0]];
|
|
1468
1423
|
}
|
|
1469
1424
|
return this.intNumberFormatter(value, cOptions, dOptions, option);
|
|
1470
1425
|
};
|
|
@@ -1505,8 +1460,7 @@ class NumberFormat {
|
|
|
1505
1460
|
const decide = isFraction ? 'f' : 's';
|
|
1506
1461
|
let dint = 0;
|
|
1507
1462
|
const str1 = errorText['l' + decide];
|
|
1508
|
-
|
|
1509
|
-
let str2 = errorText['m' + decide];
|
|
1463
|
+
const str2 = errorText['m' + decide];
|
|
1510
1464
|
if (!isUndefined(val1)) {
|
|
1511
1465
|
this.checkRange(val1, str1, isFraction);
|
|
1512
1466
|
dint++;
|
|
@@ -1585,25 +1539,31 @@ class NumberFormat {
|
|
|
1585
1539
|
let decimalPart = temp[1];
|
|
1586
1540
|
const len = decimalPart.length;
|
|
1587
1541
|
for (let i = len - 1; i >= 0; i--) {
|
|
1588
|
-
if (decimalPart[
|
|
1542
|
+
if (decimalPart[parseInt(i.toString(), 10)] === '0' && i >= curData.minimumFractionDigits) {
|
|
1589
1543
|
decimalPart = decimalPart.slice(0, i);
|
|
1590
1544
|
}
|
|
1591
1545
|
else {
|
|
1592
1546
|
break;
|
|
1593
1547
|
}
|
|
1594
1548
|
}
|
|
1595
|
-
|
|
1549
|
+
// removes the dot and trailing zero
|
|
1550
|
+
const decimalSeparator = (dOptions).numberMapper.numberSymbols[mapper[3]] || '.';
|
|
1551
|
+
if (decimalPart === '') {
|
|
1552
|
+
fValue = temp[0];
|
|
1553
|
+
}
|
|
1554
|
+
else {
|
|
1555
|
+
fValue = temp[0] + decimalSeparator + decimalPart;
|
|
1556
|
+
}
|
|
1596
1557
|
}
|
|
1597
1558
|
}
|
|
1598
1559
|
if (curData.type === 'scientific') {
|
|
1599
1560
|
fValue = value.toExponential(curData.maximumFractionDigits);
|
|
1600
|
-
fValue = fValue.replace('e', dOptions.numberMapper.numberSymbols[mapper
|
|
1561
|
+
fValue = fValue.replace('e', dOptions.numberMapper.numberSymbols[mapper[4]]);
|
|
1601
1562
|
}
|
|
1602
|
-
fValue = fValue.replace('.', dOptions.numberMapper.numberSymbols[mapper
|
|
1563
|
+
fValue = fValue.replace('.', dOptions.numberMapper.numberSymbols[mapper[3]]);
|
|
1603
1564
|
fValue = curData.format === '#,###,,;(#,###,,)' ? this.customPivotFormat(parseInt(fValue, 10)) : fValue;
|
|
1604
1565
|
if (curData.useGrouping) {
|
|
1605
|
-
|
|
1606
|
-
fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ',', dOptions.numberMapper.numberSymbols[mapper$1[3]] || '.', curData.groupData.secondary);
|
|
1566
|
+
fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ',', dOptions.numberMapper.numberSymbols[mapper[3]] || '.', curData.groupData.secondary);
|
|
1607
1567
|
}
|
|
1608
1568
|
fValue = ParserBase.convertValueParts(fValue, IntlBase.latnParseRegex, dOptions.numberMapper.mapper);
|
|
1609
1569
|
if (curData.nlead === 'N/A') {
|
|
@@ -1729,7 +1689,6 @@ class NumberFormat {
|
|
|
1729
1689
|
static customPivotFormat(value) {
|
|
1730
1690
|
if (value >= 500000) {
|
|
1731
1691
|
value /= 1000000;
|
|
1732
|
-
// eslint-disable-next-line
|
|
1733
1692
|
const [integer, decimal] = value.toString().split('.');
|
|
1734
1693
|
return decimal && +decimal.substring(0, 1) >= 5
|
|
1735
1694
|
? Math.ceil(value).toString()
|
|
@@ -1750,7 +1709,6 @@ const timeSetter$1 = {
|
|
|
1750
1709
|
milliseconds: 'setMilliseconds'
|
|
1751
1710
|
};
|
|
1752
1711
|
const month = 'months';
|
|
1753
|
-
/* tslint:disable no-any */
|
|
1754
1712
|
/**
|
|
1755
1713
|
* Date Parser.
|
|
1756
1714
|
*
|
|
@@ -1788,17 +1746,15 @@ class DateParser {
|
|
|
1788
1746
|
let zCorrectTemp = 0;
|
|
1789
1747
|
let isgmtTraversed = false;
|
|
1790
1748
|
const nRegx = numOptions.numericRegex;
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr));
|
|
1749
|
+
const numMapper = isBlazor() ? dependable.parserObject.numbers
|
|
1750
|
+
: ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr));
|
|
1794
1751
|
for (let i = 0; i < length; i++) {
|
|
1795
1752
|
const str = patternMatch[parseInt(i.toString(), 10)];
|
|
1796
1753
|
const len = str.length;
|
|
1797
1754
|
const char = (str[0] === 'K') ? 'h' : str[0];
|
|
1798
1755
|
let isNumber;
|
|
1799
1756
|
let canUpdate;
|
|
1800
|
-
|
|
1801
|
-
let charKey = datePartMatcher[char];
|
|
1757
|
+
const charKey = datePartMatcher[`${char}`];
|
|
1802
1758
|
const optional = (len === 2) ? '' : '?';
|
|
1803
1759
|
if (isgmtTraversed) {
|
|
1804
1760
|
gmtCorrection = zCorrectTemp;
|
|
@@ -1806,22 +1762,18 @@ class DateParser {
|
|
|
1806
1762
|
}
|
|
1807
1763
|
switch (char) {
|
|
1808
1764
|
case 'E':
|
|
1809
|
-
case 'c':
|
|
1810
|
-
// eslint-disable-next-line
|
|
1765
|
+
case 'c': {
|
|
1811
1766
|
let weekData;
|
|
1812
1767
|
if (isBlazor()) {
|
|
1813
|
-
|
|
1814
|
-
weekData = getValue('days.' + IntlBase.monthIndex[len], dependable.dateObject);
|
|
1768
|
+
weekData = getValue('days.' + IntlBase.monthIndex[`${len}`], dependable.dateObject);
|
|
1815
1769
|
}
|
|
1816
1770
|
else {
|
|
1817
|
-
|
|
1818
|
-
weekData = dependable.dateObject[IntlBase.days][standalone$1][IntlBase.monthIndex[len]];
|
|
1771
|
+
weekData = dependable.dateObject[`${IntlBase.days}`][`${standalone$1}`][IntlBase.monthIndex[`${len}`]];
|
|
1819
1772
|
}
|
|
1820
|
-
|
|
1821
|
-
let weekObject = ParserBase.reverseObject(weekData);
|
|
1822
|
-
// tslint:enable
|
|
1773
|
+
const weekObject = ParserBase.reverseObject(weekData);
|
|
1823
1774
|
regexString += '(' + Object.keys(weekObject).join('|') + ')';
|
|
1824
1775
|
break;
|
|
1776
|
+
}
|
|
1825
1777
|
case 'M':
|
|
1826
1778
|
case 'L':
|
|
1827
1779
|
case 'd':
|
|
@@ -1834,17 +1786,13 @@ class DateParser {
|
|
|
1834
1786
|
if ((char === 'M' || char === 'L') && len > 2) {
|
|
1835
1787
|
let monthData;
|
|
1836
1788
|
if (isBlazor()) {
|
|
1837
|
-
|
|
1838
|
-
monthData = getValue('months.' + IntlBase.monthIndex[len], dependable.dateObject);
|
|
1789
|
+
monthData = getValue('months.' + IntlBase.monthIndex[`${len}`], dependable.dateObject);
|
|
1839
1790
|
}
|
|
1840
1791
|
else {
|
|
1841
|
-
|
|
1842
|
-
monthData = dependable.dateObject[month][standalone$1][IntlBase.monthIndex[len]];
|
|
1792
|
+
monthData = dependable.dateObject[`${month}`][`${standalone$1}`][IntlBase.monthIndex[`${len}`]];
|
|
1843
1793
|
}
|
|
1844
|
-
|
|
1845
|
-
parseOptions[charKey]
|
|
1846
|
-
// eslint-disable-next-line
|
|
1847
|
-
regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + ')';
|
|
1794
|
+
parseOptions[`${charKey}`] = ParserBase.reverseObject(monthData);
|
|
1795
|
+
regexString += '(' + Object.keys(parseOptions[`${charKey}`]).join('|') + ')';
|
|
1848
1796
|
}
|
|
1849
1797
|
else if (char === 'f') {
|
|
1850
1798
|
if (len > 3) {
|
|
@@ -1861,11 +1809,11 @@ class DateParser {
|
|
|
1861
1809
|
parseOptions.hour12 = true;
|
|
1862
1810
|
}
|
|
1863
1811
|
break;
|
|
1864
|
-
case 'W':
|
|
1865
|
-
|
|
1866
|
-
let opt = len === 1 ? '?' : '';
|
|
1812
|
+
case 'W': {
|
|
1813
|
+
const opt = len === 1 ? '?' : '';
|
|
1867
1814
|
regexString += '(' + nRegx + opt + nRegx + ')';
|
|
1868
1815
|
break;
|
|
1816
|
+
}
|
|
1869
1817
|
case 'y':
|
|
1870
1818
|
canUpdate = isNumber = true;
|
|
1871
1819
|
if (len === 2) {
|
|
@@ -1875,48 +1823,41 @@ class DateParser {
|
|
|
1875
1823
|
regexString += '(' + nRegx + '{' + len + ',})';
|
|
1876
1824
|
}
|
|
1877
1825
|
break;
|
|
1878
|
-
case 'a':
|
|
1826
|
+
case 'a': {
|
|
1879
1827
|
canUpdate = true;
|
|
1880
|
-
|
|
1881
|
-
let periodValur = isBlazor() ?
|
|
1828
|
+
const periodValur = isBlazor() ?
|
|
1882
1829
|
getValue('dayPeriods', dependable.dateObject) :
|
|
1883
1830
|
getValue('dayPeriods.format.wide', dependable.dateObject);
|
|
1884
|
-
|
|
1885
|
-
parseOptions[charKey]
|
|
1886
|
-
// eslint-disable-next-line
|
|
1887
|
-
regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + ')';
|
|
1831
|
+
parseOptions[`${charKey}`] = ParserBase.reverseObject(periodValur);
|
|
1832
|
+
regexString += '(' + Object.keys(parseOptions[`${charKey}`]).join('|') + ')';
|
|
1888
1833
|
break;
|
|
1889
|
-
|
|
1834
|
+
}
|
|
1835
|
+
case 'G': {
|
|
1890
1836
|
canUpdate = true;
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
// eslint-disable-next-line
|
|
1894
|
-
parseOptions[charKey] = ParserBase.reverseObject(isBlazor() ?
|
|
1837
|
+
const eText = (len <= 3) ? 'eraAbbr' : (len === 4) ? 'eraNames' : 'eraNarrow';
|
|
1838
|
+
parseOptions[`${charKey}`] = ParserBase.reverseObject(isBlazor() ?
|
|
1895
1839
|
getValue('eras', dependable.dateObject) : getValue('eras.' + eText, dependable.dateObject));
|
|
1896
|
-
|
|
1897
|
-
regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + '?)';
|
|
1840
|
+
regexString += '(' + Object.keys(parseOptions[`${charKey}`]).join('|') + '?)';
|
|
1898
1841
|
break;
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1842
|
+
}
|
|
1843
|
+
case 'z': {
|
|
1844
|
+
const tval = new Date().getTimezoneOffset();
|
|
1902
1845
|
canUpdate = (tval !== 0);
|
|
1903
|
-
|
|
1904
|
-
parseOptions[charKey]
|
|
1905
|
-
// eslint-disable-next-line
|
|
1906
|
-
let tzone = parseOptions[charKey];
|
|
1846
|
+
parseOptions[`${charKey}`] = getValue('dates.timeZoneNames', dependable.parserObject);
|
|
1847
|
+
const tzone = parseOptions[`${charKey}`];
|
|
1907
1848
|
hourOnly = (len < 4);
|
|
1908
|
-
// eslint-disable-next-line
|
|
1909
1849
|
let hpattern = hourOnly ? '+H;-H' : tzone.hourFormat;
|
|
1910
1850
|
hpattern = hpattern.replace(/:/g, numMapper.timeSeparator);
|
|
1911
1851
|
regexString += '(' + this.parseTimeZoneRegx(hpattern, tzone, nRegx) + ')?';
|
|
1912
1852
|
isgmtTraversed = true;
|
|
1913
1853
|
zCorrectTemp = hourOnly ? 6 : 12;
|
|
1914
1854
|
break;
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1855
|
+
}
|
|
1856
|
+
case '\'': {
|
|
1857
|
+
const iString = str.replace(/'/g, '');
|
|
1918
1858
|
regexString += '(' + iString + ')?';
|
|
1919
1859
|
break;
|
|
1860
|
+
}
|
|
1920
1861
|
default:
|
|
1921
1862
|
regexString += '([\\D])';
|
|
1922
1863
|
break;
|
|
@@ -1948,7 +1889,6 @@ class DateParser {
|
|
|
1948
1889
|
if (is2DigitYear) {
|
|
1949
1890
|
tYear = parseInt((dobj.year + '').slice(0, 2) + ystrig, 10);
|
|
1950
1891
|
}
|
|
1951
|
-
// tslint:disable-next-line
|
|
1952
1892
|
const dateObject = HijriParser.toGregorian(tYear || dobj.year, tMonth || dobj.month, tDate || dobj.date);
|
|
1953
1893
|
parsedDateParts.year = dateObject.getFullYear();
|
|
1954
1894
|
parsedDateParts.month = dateObject.getMonth() + 1;
|
|
@@ -1957,7 +1897,6 @@ class DateParser {
|
|
|
1957
1897
|
return this.getDateObject(parsedDateParts);
|
|
1958
1898
|
};
|
|
1959
1899
|
}
|
|
1960
|
-
/* tslint:disable */
|
|
1961
1900
|
/**
|
|
1962
1901
|
* Returns date object for provided date options
|
|
1963
1902
|
*
|
|
@@ -1981,8 +1920,7 @@ class DateParser {
|
|
|
1981
1920
|
res.setFullYear(y);
|
|
1982
1921
|
}
|
|
1983
1922
|
for (const key of tKeys) {
|
|
1984
|
-
|
|
1985
|
-
let tValue = options[key];
|
|
1923
|
+
let tValue = options[`${key}`];
|
|
1986
1924
|
if (isUndefined(tValue) && key === 'day') {
|
|
1987
1925
|
res.setDate(1);
|
|
1988
1926
|
}
|
|
@@ -1994,8 +1932,7 @@ class DateParser {
|
|
|
1994
1932
|
}
|
|
1995
1933
|
const pDate = res.getDate();
|
|
1996
1934
|
res.setDate(1);
|
|
1997
|
-
|
|
1998
|
-
res[timeSetter$1[key]](tValue);
|
|
1935
|
+
res[timeSetter$1[`${key}`]](tValue);
|
|
1999
1936
|
const lDate = new Date(res.getFullYear(), tValue + 1, 0).getDate();
|
|
2000
1937
|
res.setDate(pDate < lDate ? pDate : lDate);
|
|
2001
1938
|
}
|
|
@@ -2006,8 +1943,7 @@ class DateParser {
|
|
|
2006
1943
|
return null;
|
|
2007
1944
|
}
|
|
2008
1945
|
}
|
|
2009
|
-
|
|
2010
|
-
res[timeSetter$1[key]](tValue);
|
|
1946
|
+
res[`${timeSetter$1[`${key}`]}`](tValue);
|
|
2011
1947
|
}
|
|
2012
1948
|
}
|
|
2013
1949
|
}
|
|
@@ -2048,8 +1984,7 @@ class DateParser {
|
|
|
2048
1984
|
const curObject = parseOptions.evalposition[`${prop}`];
|
|
2049
1985
|
let matchString = matches[curObject.pos];
|
|
2050
1986
|
if (curObject.isNumber) {
|
|
2051
|
-
|
|
2052
|
-
retOptions[prop] = this.internalNumberParser(matchString, num);
|
|
1987
|
+
retOptions[`${prop}`] = this.internalNumberParser(matchString, num);
|
|
2053
1988
|
}
|
|
2054
1989
|
else {
|
|
2055
1990
|
if (prop === 'timeZone' && !isUndefined(matchString)) {
|
|
@@ -2070,14 +2005,11 @@ class DateParser {
|
|
|
2070
2005
|
}
|
|
2071
2006
|
else {
|
|
2072
2007
|
const cultureOptions = ['en-US', 'en-MH', 'en-MP'];
|
|
2073
|
-
// eslint-disable-next-line
|
|
2074
2008
|
matchString = ((prop === 'month') && (!parseOptions.isIslamic) && (parseOptions.culture === 'en' || parseOptions.culture === 'en-GB' || parseOptions.culture === 'en-US'))
|
|
2075
2009
|
? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
|
|
2076
|
-
// eslint-disable-next-line
|
|
2077
2010
|
matchString = ((prop !== 'month') && (prop === 'designator') && parseOptions.culture && parseOptions.culture.indexOf('en-') !== -1 && cultureOptions.indexOf(parseOptions.culture) === -1)
|
|
2078
2011
|
? matchString.toLowerCase() : matchString;
|
|
2079
|
-
|
|
2080
|
-
retOptions[prop] = parseOptions[prop][matchString];
|
|
2012
|
+
retOptions[`${prop}`] = parseOptions[`${prop}`][`${matchString}`];
|
|
2081
2013
|
}
|
|
2082
2014
|
}
|
|
2083
2015
|
}
|
|
@@ -2113,7 +2045,6 @@ class DateParser {
|
|
|
2113
2045
|
const pattern = tZone.gmtFormat;
|
|
2114
2046
|
let ret;
|
|
2115
2047
|
const cRegex = '(' + nRegex + ')' + '(' + nRegex + ')';
|
|
2116
|
-
let splitStr;
|
|
2117
2048
|
ret = hourFormat.replace('+', '\\+');
|
|
2118
2049
|
if (hourFormat.indexOf('HH') !== -1) {
|
|
2119
2050
|
ret = ret.replace(/HH|mm/g, '(' + cRegex + ')');
|
|
@@ -2121,8 +2052,7 @@ class DateParser {
|
|
|
2121
2052
|
else {
|
|
2122
2053
|
ret = ret.replace(/H|m/g, '(' + cRegex + '?)');
|
|
2123
2054
|
}
|
|
2124
|
-
|
|
2125
|
-
splitStr = (ret.split(';').map((str) => {
|
|
2055
|
+
const splitStr = (ret.split(';').map((str) => {
|
|
2126
2056
|
return pattern.replace('{0}', str);
|
|
2127
2057
|
}));
|
|
2128
2058
|
ret = splitStr.join('|') + '|' + tZone.gmtZeroFormat;
|
|
@@ -2150,9 +2080,8 @@ class DateParser {
|
|
|
2150
2080
|
}
|
|
2151
2081
|
}
|
|
2152
2082
|
|
|
2153
|
-
const regExp
|
|
2154
|
-
|
|
2155
|
-
const parseRegex = new regExp$1('^([^0-9]*)' + '(([0-9,]*[0-9]+)(\.[0-9]+)?)' + '([Ee][+-]?[0-9]+)?([^0-9]*)$');
|
|
2083
|
+
const regExp = RegExp;
|
|
2084
|
+
const parseRegex = new regExp('^([^0-9]*)' + '(([0-9,]*[0-9]+)(.[0-9]+)?)' + '([Ee][+-]?[0-9]+)?([^0-9]*)$');
|
|
2156
2085
|
const groupRegex = /,/g;
|
|
2157
2086
|
const keys = ['minusSign', 'infinity'];
|
|
2158
2087
|
/**
|
|
@@ -2172,7 +2101,6 @@ class NumberParser {
|
|
|
2172
2101
|
static numberParser(culture, option, cldr) {
|
|
2173
2102
|
const dependable = IntlBase.getDependables(cldr, culture, '', true);
|
|
2174
2103
|
const parseOptions = { custom: true };
|
|
2175
|
-
let numOptions;
|
|
2176
2104
|
if ((IntlBase.formatRegex.test(option.format)) || !(option.format)) {
|
|
2177
2105
|
extend(parseOptions, IntlBase.getProperNumericSkeleton(option.format || 'N'));
|
|
2178
2106
|
parseOptions.custom = false;
|
|
@@ -2186,10 +2114,8 @@ class NumberParser {
|
|
|
2186
2114
|
extend(parseOptions, IntlBase.customFormat(option.format, null, null));
|
|
2187
2115
|
}
|
|
2188
2116
|
const numbers = getValue('numbers', dependable.parserObject);
|
|
2189
|
-
|
|
2190
|
-
numOptions = ParserBase.getCurrentNumericOptions(dependable.parserObject, ParserBase.getNumberingSystem(cldr), true, isBlazor());
|
|
2117
|
+
const numOptions = ParserBase.getCurrentNumericOptions(dependable.parserObject, ParserBase.getNumberingSystem(cldr), true, isBlazor());
|
|
2191
2118
|
parseOptions.symbolRegex = ParserBase.getSymbolRegex(Object.keys(numOptions.symbolMatch));
|
|
2192
|
-
// eslint-disable-next-line
|
|
2193
2119
|
parseOptions.infinity = numOptions.symbolNumberSystem[keys[1]];
|
|
2194
2120
|
let symbolpattern;
|
|
2195
2121
|
if (!isBlazor()) {
|
|
@@ -2281,6 +2207,7 @@ class NumberParser {
|
|
|
2281
2207
|
}
|
|
2282
2208
|
}
|
|
2283
2209
|
|
|
2210
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
|
|
2284
2211
|
class Observer {
|
|
2285
2212
|
constructor(context) {
|
|
2286
2213
|
this.ranArray = [];
|
|
@@ -2419,7 +2346,6 @@ class Observer {
|
|
|
2419
2346
|
}
|
|
2420
2347
|
}
|
|
2421
2348
|
}
|
|
2422
|
-
// eslint-disable-next-line
|
|
2423
2349
|
dateReviver(key, value) {
|
|
2424
2350
|
const dPattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/;
|
|
2425
2351
|
if (isBlazor && typeof value === 'string' && value.match(dPattern) !== null) {
|
|
@@ -2450,12 +2376,10 @@ class Observer {
|
|
|
2450
2376
|
* @returns {void} ?
|
|
2451
2377
|
*/
|
|
2452
2378
|
offIntlEvents() {
|
|
2453
|
-
// eslint-disable-next-line
|
|
2454
2379
|
const eventsArr = this.boundedEvents['notifyExternalChange'];
|
|
2455
2380
|
if (eventsArr) {
|
|
2456
2381
|
for (let i = 0; i < eventsArr.length; i++) {
|
|
2457
|
-
|
|
2458
|
-
const curContext = eventsArr[`${i}`].context;
|
|
2382
|
+
const curContext = eventsArr[parseInt(i.toString(), 10)].context;
|
|
2459
2383
|
if (curContext && curContext.detectFunction && curContext.randomId && !curContext.isRendered) {
|
|
2460
2384
|
this.off('notifyExternalChange', curContext.detectFunction, curContext.randomId);
|
|
2461
2385
|
i--;
|
|
@@ -2473,8 +2397,7 @@ class Observer {
|
|
|
2473
2397
|
* @returns {boolean} ?
|
|
2474
2398
|
*/
|
|
2475
2399
|
notExist(prop) {
|
|
2476
|
-
|
|
2477
|
-
return this.boundedEvents.hasOwnProperty(prop) === false || this.boundedEvents[prop].length <= 0;
|
|
2400
|
+
return Object.prototype.hasOwnProperty.call(this.boundedEvents, prop) === false || this.boundedEvents[`${prop}`].length <= 0;
|
|
2478
2401
|
}
|
|
2479
2402
|
/**
|
|
2480
2403
|
* Returns if the handler is present.
|
|
@@ -2519,7 +2442,7 @@ let defaultCulture = 'en-US';
|
|
|
2519
2442
|
* @private
|
|
2520
2443
|
*/
|
|
2521
2444
|
let defaultCurrencyCode = 'USD';
|
|
2522
|
-
const mapper = ['numericObject', 'dateObject'];
|
|
2445
|
+
const mapper$1 = ['numericObject', 'dateObject'];
|
|
2523
2446
|
/**
|
|
2524
2447
|
* Internationalization class provides support to parse and format the number and date object to the desired format.
|
|
2525
2448
|
* ```typescript
|
|
@@ -2736,10 +2659,8 @@ function enableRtl(status = true) {
|
|
|
2736
2659
|
* @private
|
|
2737
2660
|
*/
|
|
2738
2661
|
function getNumericObject(locale, type) {
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
// eslint-disable-next-line
|
|
2742
|
-
const dateObject = IntlBase.getDependables(cldrData, locale, '')[mapper[1]];
|
|
2662
|
+
const numObject = IntlBase.getDependables(cldrData, locale, '', true)[mapper$1[0]];
|
|
2663
|
+
const dateObject = IntlBase.getDependables(cldrData, locale, '')[mapper$1[1]];
|
|
2743
2664
|
const numSystem = getValue('defaultNumberingSystem', numObject);
|
|
2744
2665
|
const symbPattern = isBlazor() ? getValue('numberSymbols', numObject) : getValue('symbols-numberSystem-' + numSystem, numObject);
|
|
2745
2666
|
const pattern = IntlBase.getSymbolPattern(type || 'decimal', numSystem, numObject, false);
|
|
@@ -2755,9 +2676,7 @@ function getNumericObject(locale, type) {
|
|
|
2755
2676
|
* @private
|
|
2756
2677
|
*/
|
|
2757
2678
|
function getNumberDependable(locale, currency) {
|
|
2758
|
-
// eslint-disable-next-line
|
|
2759
2679
|
const numObject = IntlBase.getDependables(cldrData, locale, '', true);
|
|
2760
|
-
// eslint-disable-next-line
|
|
2761
2680
|
return IntlBase.getCurrencySymbol(numObject.numericObject, currency);
|
|
2762
2681
|
}
|
|
2763
2682
|
/**
|
|
@@ -2769,11 +2688,11 @@ function getNumberDependable(locale, currency) {
|
|
|
2769
2688
|
* @private
|
|
2770
2689
|
*/
|
|
2771
2690
|
function getDefaultDateObject(mode) {
|
|
2772
|
-
|
|
2773
|
-
return IntlBase.getDependables(cldrData, '', mode, false)[mapper[1]];
|
|
2691
|
+
return IntlBase.getDependables(cldrData, '', mode, false)[mapper$1[1]];
|
|
2774
2692
|
}
|
|
2775
2693
|
|
|
2776
|
-
|
|
2694
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
|
|
2695
|
+
const regExp$1 = RegExp;
|
|
2777
2696
|
const blazorCultureFormats = {
|
|
2778
2697
|
'en-US': {
|
|
2779
2698
|
'd': 'M/d/y',
|
|
@@ -2798,13 +2717,13 @@ const blazorCultureFormats = {
|
|
|
2798
2717
|
/**
|
|
2799
2718
|
* Date base common constants and function for date parser and formatter.
|
|
2800
2719
|
*/
|
|
2801
|
-
// eslint-disable-next-line
|
|
2720
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
2802
2721
|
var IntlBase;
|
|
2803
2722
|
(function (IntlBase) {
|
|
2804
|
-
|
|
2805
|
-
// tslint:disable-next-line:max-line-length.
|
|
2723
|
+
// eslint-disable-next-line security/detect-unsafe-regex
|
|
2806
2724
|
IntlBase.negativeDataRegex = /^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
|
|
2807
|
-
|
|
2725
|
+
// eslint-disable-next-line security/detect-unsafe-regex
|
|
2726
|
+
IntlBase.customRegex = /^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*[0# ]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
|
|
2808
2727
|
IntlBase.latnParseRegex = /0|1|2|3|4|5|6|7|8|9/g;
|
|
2809
2728
|
const fractionRegex = /[0-9]/g;
|
|
2810
2729
|
IntlBase.defaultCurrency = '$';
|
|
@@ -2835,8 +2754,8 @@ var IntlBase;
|
|
|
2835
2754
|
'fri': 5,
|
|
2836
2755
|
'sat': 6
|
|
2837
2756
|
};
|
|
2838
|
-
IntlBase.formatRegex = new regExp(
|
|
2839
|
-
IntlBase.currencyFormatRegex = new regExp(
|
|
2757
|
+
IntlBase.formatRegex = new regExp$1('(^[ncpae]{1})([0-1]?[0-9]|20)?$', 'i');
|
|
2758
|
+
IntlBase.currencyFormatRegex = new regExp$1('(^[ca]{1})([0-1]?[0-9]|20)?$', 'i');
|
|
2840
2759
|
IntlBase.curWithoutNumberRegex = /(c|a)$/ig;
|
|
2841
2760
|
const typeMapper = {
|
|
2842
2761
|
'$': 'isCurrency',
|
|
@@ -2847,7 +2766,6 @@ var IntlBase;
|
|
|
2847
2766
|
};
|
|
2848
2767
|
IntlBase.dateParseRegex = /([a-z])\1*|'([^']|'')+'|''|./gi;
|
|
2849
2768
|
IntlBase.basicPatterns = ['short', 'medium', 'long', 'full'];
|
|
2850
|
-
/* tslint:disable:quotemark */
|
|
2851
2769
|
IntlBase.defaultObject = {
|
|
2852
2770
|
'dates': {
|
|
2853
2771
|
'calendars': {
|
|
@@ -3398,7 +3316,6 @@ var IntlBase;
|
|
|
3398
3316
|
}
|
|
3399
3317
|
}
|
|
3400
3318
|
};
|
|
3401
|
-
/* tslint:enable:quotemark */
|
|
3402
3319
|
IntlBase.monthIndex = {
|
|
3403
3320
|
3: 'abbreviated',
|
|
3404
3321
|
4: 'wide',
|
|
@@ -3542,7 +3459,7 @@ var IntlBase;
|
|
|
3542
3459
|
const ret = {};
|
|
3543
3460
|
const pattern = matches[1].toUpperCase();
|
|
3544
3461
|
ret.isAccount = (pattern === 'A');
|
|
3545
|
-
ret.type = IntlBase.patternMatcher[pattern];
|
|
3462
|
+
ret.type = IntlBase.patternMatcher[`${pattern}`];
|
|
3546
3463
|
if (skeleton.length > 1) {
|
|
3547
3464
|
ret.fractionDigits = parseInt(matches[2], 10);
|
|
3548
3465
|
}
|
|
@@ -3606,11 +3523,12 @@ var IntlBase;
|
|
|
3606
3523
|
* @param {Object} numericObject ?
|
|
3607
3524
|
* @param {string} currencyCode ?
|
|
3608
3525
|
* @param {string} altSymbol ?
|
|
3526
|
+
* @param {string} ignoreCurrency ?
|
|
3609
3527
|
* @returns {string} ?
|
|
3610
3528
|
*/
|
|
3611
|
-
function getCurrencySymbol(numericObject, currencyCode, altSymbol) {
|
|
3529
|
+
function getCurrencySymbol(numericObject, currencyCode, altSymbol, ignoreCurrency) {
|
|
3612
3530
|
const symbol = altSymbol ? ('.' + altSymbol) : '.symbol';
|
|
3613
|
-
const getCurrency = getValue('currencies.' + currencyCode + symbol, numericObject) ||
|
|
3531
|
+
const getCurrency = ignoreCurrency ? '$' : getValue('currencies.' + currencyCode + symbol, numericObject) ||
|
|
3614
3532
|
getValue('currencies.' + currencyCode + '.symbol-alt-narrow', numericObject) || '$';
|
|
3615
3533
|
return getCurrency;
|
|
3616
3534
|
}
|
|
@@ -3629,7 +3547,7 @@ var IntlBase;
|
|
|
3629
3547
|
const formatSplit = format.split(';');
|
|
3630
3548
|
const data = ['pData', 'nData', 'zeroData'];
|
|
3631
3549
|
for (let i = 0; i < formatSplit.length; i++) {
|
|
3632
|
-
options[data[i]] = customNumberFormat(formatSplit[i], dOptions, obj);
|
|
3550
|
+
options[`${data[parseInt(i.toString(), 10)]}`] = customNumberFormat(formatSplit[parseInt(i.toString(), 10)], dOptions, obj);
|
|
3633
3551
|
}
|
|
3634
3552
|
if (isNullOrUndefined(options.nData)) {
|
|
3635
3553
|
options.nData = extend({}, options.pData);
|
|
@@ -3657,8 +3575,8 @@ var IntlBase;
|
|
|
3657
3575
|
cOptions.nlead = pattern[1];
|
|
3658
3576
|
cOptions.nend = pattern[10];
|
|
3659
3577
|
let integerPart = pattern[6];
|
|
3660
|
-
const spaceCapture = integerPart.match(
|
|
3661
|
-
const spaceGrouping = integerPart.replace(
|
|
3578
|
+
const spaceCapture = integerPart.match(/ $/g) ? true : false;
|
|
3579
|
+
const spaceGrouping = integerPart.replace(/ $/g, '').indexOf(' ') !== -1;
|
|
3662
3580
|
cOptions.useGrouping = integerPart.indexOf(',') !== -1 || spaceGrouping;
|
|
3663
3581
|
integerPart = integerPart.replace(/,/g, '');
|
|
3664
3582
|
const fractionPart = pattern[7];
|
|
@@ -3712,8 +3630,8 @@ var IntlBase;
|
|
|
3712
3630
|
const part = parts[parseInt(i.toString(), 10)];
|
|
3713
3631
|
const loc = part.indexOf(actual);
|
|
3714
3632
|
if ((loc !== -1) && ((loc < part.indexOf('\'')) || (loc > part.lastIndexOf('\'')))) {
|
|
3715
|
-
options[typeMapper[i]] = part.substr(0, loc) + symbol + part.substr(loc + 1);
|
|
3716
|
-
options[typeMapper[actual]] = true;
|
|
3633
|
+
options[`${typeMapper[parseInt(i.toString(), 10)]}`] = part.substr(0, loc) + symbol + part.substr(loc + 1);
|
|
3634
|
+
options[`${typeMapper[`${actual}`]}`] = true;
|
|
3717
3635
|
options.type = options.isCurrency ? 'currency' : 'percent';
|
|
3718
3636
|
break;
|
|
3719
3637
|
}
|
|
@@ -3729,7 +3647,7 @@ var IntlBase;
|
|
|
3729
3647
|
* @returns {string} ?
|
|
3730
3648
|
*/
|
|
3731
3649
|
function getDateSeparator(dateObj) {
|
|
3732
|
-
const value = (getValue('dateFormats.short', dateObj) || '').match(/[
|
|
3650
|
+
const value = (getValue('dateFormats.short', dateObj) || '').match(/[dM]([^dM])[dM]/i);
|
|
3733
3651
|
return value ? value[1] : '/';
|
|
3734
3652
|
}
|
|
3735
3653
|
IntlBase.getDateSeparator = getDateSeparator;
|
|
@@ -3751,7 +3669,7 @@ var IntlBase;
|
|
|
3751
3669
|
let actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);
|
|
3752
3670
|
if (isExcelFormat) {
|
|
3753
3671
|
actualPattern = actualPattern.replace(patternRegex, (pattern) => {
|
|
3754
|
-
return patternMatch[pattern];
|
|
3672
|
+
return patternMatch[`${pattern}`];
|
|
3755
3673
|
});
|
|
3756
3674
|
if (actualPattern.indexOf('z') !== -1) {
|
|
3757
3675
|
const tLength = actualPattern.match(/z/g).length;
|
|
@@ -3785,7 +3703,7 @@ var IntlBase;
|
|
|
3785
3703
|
*/
|
|
3786
3704
|
function processSymbol(actual, option) {
|
|
3787
3705
|
if (actual.indexOf(',') !== -1) {
|
|
3788
|
-
|
|
3706
|
+
const split = actual.split(',');
|
|
3789
3707
|
actual = (split[0] + getValue('numberMapper.numberSymbols.group', option) +
|
|
3790
3708
|
split[1].replace('.', getValue('numberMapper.numberSymbols.decimal', option)));
|
|
3791
3709
|
}
|
|
@@ -3794,6 +3712,7 @@ var IntlBase;
|
|
|
3794
3712
|
}
|
|
3795
3713
|
return actual;
|
|
3796
3714
|
}
|
|
3715
|
+
IntlBase.processSymbol = processSymbol;
|
|
3797
3716
|
/**
|
|
3798
3717
|
* Returns Native Number pattern
|
|
3799
3718
|
*
|
|
@@ -4051,7 +3970,7 @@ class Ajax {
|
|
|
4051
3970
|
* Send the request to server.
|
|
4052
3971
|
*
|
|
4053
3972
|
* @param {any} data - To send the user data
|
|
4054
|
-
* @
|
|
3973
|
+
* @returns {Promise} ?
|
|
4055
3974
|
*/
|
|
4056
3975
|
send(data) {
|
|
4057
3976
|
this.data = isNullOrUndefined(data) ? this.data : data;
|
|
@@ -4145,21 +4064,18 @@ class Ajax {
|
|
|
4145
4064
|
* @returns {string} ?
|
|
4146
4065
|
*/
|
|
4147
4066
|
getResponseHeader(key) {
|
|
4148
|
-
|
|
4149
|
-
let header;
|
|
4150
|
-
// eslint-disable-next-line
|
|
4151
|
-
responseHeaders = {};
|
|
4067
|
+
const responseHeaders = {};
|
|
4152
4068
|
let headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders());
|
|
4153
4069
|
while (headers) {
|
|
4154
4070
|
responseHeaders[headers[1].toLowerCase()] = headers[2];
|
|
4155
4071
|
headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders());
|
|
4156
4072
|
}
|
|
4157
|
-
|
|
4158
|
-
header = responseHeaders[key.toLowerCase()];
|
|
4073
|
+
const header = responseHeaders[key.toLowerCase()];
|
|
4159
4074
|
return isNullOrUndefined(header) ? null : header;
|
|
4160
4075
|
}
|
|
4161
4076
|
}
|
|
4162
4077
|
|
|
4078
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4163
4079
|
/**
|
|
4164
4080
|
* The Fetch class provides a way to make asynchronous network requests, typically to retrieve resources from a server.
|
|
4165
4081
|
* ```typescript
|
|
@@ -4247,11 +4163,9 @@ class Fetch {
|
|
|
4247
4163
|
}
|
|
4248
4164
|
}
|
|
4249
4165
|
return response[responseType]();
|
|
4250
|
-
// eslint-disable-next-line
|
|
4251
4166
|
}).then((data) => {
|
|
4252
4167
|
this.triggerEvent(this['onSuccess'], data, this);
|
|
4253
4168
|
return data;
|
|
4254
|
-
// eslint-disable-next-line
|
|
4255
4169
|
}).catch((error) => {
|
|
4256
4170
|
let returnVal = {};
|
|
4257
4171
|
if (this.emitError) {
|
|
@@ -4272,6 +4186,7 @@ class Fetch {
|
|
|
4272
4186
|
}
|
|
4273
4187
|
}
|
|
4274
4188
|
|
|
4189
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4275
4190
|
const REGX_MOBILE = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i;
|
|
4276
4191
|
const REGX_IE = /msie|trident/i;
|
|
4277
4192
|
const REGX_IE11 = /Trident\/7\./;
|
|
@@ -4311,8 +4226,7 @@ class Browser {
|
|
|
4311
4226
|
browserInfo.name = (clientInfo[1].toLowerCase() === 'crios' ? 'chrome' : browserInfo.name);
|
|
4312
4227
|
browserInfo.version = clientInfo[2];
|
|
4313
4228
|
browserInfo.culture.name = browserInfo.culture.language = navigator.language;
|
|
4314
|
-
|
|
4315
|
-
if (!!Browser.userAgent.match(REGX_IE11)) {
|
|
4229
|
+
if (Browser.userAgent.match(REGX_IE11)) {
|
|
4316
4230
|
browserInfo.name = 'msie';
|
|
4317
4231
|
break;
|
|
4318
4232
|
}
|
|
@@ -4329,10 +4243,9 @@ class Browser {
|
|
|
4329
4243
|
* To get events from the browser
|
|
4330
4244
|
*
|
|
4331
4245
|
* @param {string} event - type of event triggered.
|
|
4332
|
-
* @returns {
|
|
4246
|
+
* @returns {string} ?
|
|
4333
4247
|
*/
|
|
4334
4248
|
static getEvent(event) {
|
|
4335
|
-
// eslint-disable-next-line
|
|
4336
4249
|
const events = {
|
|
4337
4250
|
start: {
|
|
4338
4251
|
isPointer: 'pointerdown', isTouch: 'touchstart', isDevice: 'mousedown'
|
|
@@ -4688,12 +4601,8 @@ class EventHandler {
|
|
|
4688
4601
|
* @returns {void} ?
|
|
4689
4602
|
*/
|
|
4690
4603
|
static clearEvents(element) {
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
// eslint-disable-next-line
|
|
4694
|
-
eventData = EventHandler.addOrGetEventData(element);
|
|
4695
|
-
// eslint-disable-next-line
|
|
4696
|
-
copyData = extend([], copyData, eventData);
|
|
4604
|
+
const eventData = EventHandler.addOrGetEventData(element);
|
|
4605
|
+
const copyData = extend([], undefined, eventData);
|
|
4697
4606
|
for (let i = 0; i < copyData.length; i++) {
|
|
4698
4607
|
const parseValue = copyData[parseInt(i.toString(), 10)];
|
|
4699
4608
|
element.removeEventListener(parseValue.name, parseValue.debounce);
|
|
@@ -4719,9 +4628,7 @@ class EventHandler {
|
|
|
4719
4628
|
}
|
|
4720
4629
|
}
|
|
4721
4630
|
|
|
4722
|
-
|
|
4723
|
-
* Functions related to dom operations.
|
|
4724
|
-
*/
|
|
4631
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4725
4632
|
const SVG_REG = /^svg|^path|^g/;
|
|
4726
4633
|
/**
|
|
4727
4634
|
* Function to create Html element.
|
|
@@ -4916,7 +4823,6 @@ function executeScript(ele) {
|
|
|
4916
4823
|
* @returns {any} ?
|
|
4917
4824
|
* @private
|
|
4918
4825
|
*/
|
|
4919
|
-
// eslint-disable-next-line
|
|
4920
4826
|
function detach(element) {
|
|
4921
4827
|
const parentNode = element.parentNode;
|
|
4922
4828
|
if (parentNode) {
|
|
@@ -4943,7 +4849,6 @@ function remove(element) {
|
|
|
4943
4849
|
* @returns {Element} ?
|
|
4944
4850
|
* @private
|
|
4945
4851
|
*/
|
|
4946
|
-
// eslint-disable-next-line
|
|
4947
4852
|
function attributes(element, attributes) {
|
|
4948
4853
|
const keys = Object.keys(attributes);
|
|
4949
4854
|
const ele = element;
|
|
@@ -4970,7 +4875,6 @@ function attributes(element, attributes) {
|
|
|
4970
4875
|
* @returns {any} ?
|
|
4971
4876
|
* @private
|
|
4972
4877
|
*/
|
|
4973
|
-
// eslint-disable-next-line
|
|
4974
4878
|
function select(selector, context = document, needsVDOM) {
|
|
4975
4879
|
selector = querySelectId(selector);
|
|
4976
4880
|
return context.querySelector(selector);
|
|
@@ -4984,7 +4888,6 @@ function select(selector, context = document, needsVDOM) {
|
|
|
4984
4888
|
* @returns {HTMLElement[]} ?
|
|
4985
4889
|
* @private
|
|
4986
4890
|
*/
|
|
4987
|
-
// eslint-disable-next-line
|
|
4988
4891
|
function selectAll(selector, context = document, needsVDOM) {
|
|
4989
4892
|
selector = querySelectId(selector);
|
|
4990
4893
|
const nodeList = context.querySelectorAll(selector);
|
|
@@ -5099,8 +5002,7 @@ function getAttributeOrDefault(element, property, value) {
|
|
|
5099
5002
|
function setStyleAttribute(element, attrs) {
|
|
5100
5003
|
if (attrs !== undefined) {
|
|
5101
5004
|
Object.keys(attrs).forEach((key) => {
|
|
5102
|
-
|
|
5103
|
-
element.style[key] = attrs[key];
|
|
5005
|
+
element.style[`${key}`] = attrs[`${key}`];
|
|
5104
5006
|
});
|
|
5105
5007
|
}
|
|
5106
5008
|
}
|
|
@@ -5126,8 +5028,7 @@ function classList(element, addClasses, removeClasses) {
|
|
|
5126
5028
|
* @private
|
|
5127
5029
|
*/
|
|
5128
5030
|
function matches(element, selector) {
|
|
5129
|
-
|
|
5130
|
-
let matches = element.matches || element.msMatchesSelector || element.webkitMatchesSelector;
|
|
5031
|
+
const matches = element.matches || element.msMatchesSelector || element.webkitMatchesSelector;
|
|
5131
5032
|
if (matches) {
|
|
5132
5033
|
return matches.call(element, selector);
|
|
5133
5034
|
}
|
|
@@ -5154,11 +5055,10 @@ function includeInnerHTML(ele, innerHTML) {
|
|
|
5154
5055
|
* @returns {any} ?
|
|
5155
5056
|
* @private
|
|
5156
5057
|
*/
|
|
5157
|
-
// eslint-disable-next-line
|
|
5158
5058
|
function containsClass(ele, className) {
|
|
5159
5059
|
if (isObject(ele)) {
|
|
5160
|
-
|
|
5161
|
-
return new
|
|
5060
|
+
const regExp = RegExp;
|
|
5061
|
+
return new regExp('\\b' + className + '\\b', 'i').test(ele.attributes.className);
|
|
5162
5062
|
}
|
|
5163
5063
|
else {
|
|
5164
5064
|
return ele.classList.contains(className);
|
|
@@ -5172,7 +5072,6 @@ function containsClass(ele, className) {
|
|
|
5172
5072
|
* @returns {any} ?
|
|
5173
5073
|
* @private
|
|
5174
5074
|
*/
|
|
5175
|
-
// eslint-disable-next-line
|
|
5176
5075
|
function cloneNode(element, deep) {
|
|
5177
5076
|
if (isObject(element)) {
|
|
5178
5077
|
if (deep) {
|
|
@@ -5184,12 +5083,13 @@ function cloneNode(element, deep) {
|
|
|
5184
5083
|
}
|
|
5185
5084
|
}
|
|
5186
5085
|
|
|
5086
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5187
5087
|
const isColEName = new RegExp(']');
|
|
5188
|
-
/* tslint:enable:no-any */
|
|
5189
5088
|
/**
|
|
5190
5089
|
* Base library module is common module for Framework modules like touch,keyboard and etc.,
|
|
5191
5090
|
*
|
|
5192
5091
|
* @private
|
|
5092
|
+
* @returns {void} ?
|
|
5193
5093
|
*/
|
|
5194
5094
|
class Base {
|
|
5195
5095
|
/**
|
|
@@ -5210,7 +5110,6 @@ class Base {
|
|
|
5210
5110
|
this.bulkChanges = {};
|
|
5211
5111
|
this.refreshing = false;
|
|
5212
5112
|
this.ignoreCollectionWatch = false;
|
|
5213
|
-
// eslint-disable-next-line
|
|
5214
5113
|
this.finalUpdate = () => { };
|
|
5215
5114
|
this.childChangedProperties = {};
|
|
5216
5115
|
this.modelObserver = new Observer(this);
|
|
@@ -5263,7 +5162,6 @@ class Base {
|
|
|
5263
5162
|
* @param {Object} parent ?
|
|
5264
5163
|
* @returns {void} ?
|
|
5265
5164
|
*/
|
|
5266
|
-
// tslint:disable-next-line:no-any
|
|
5267
5165
|
static callChildDataBind(obj, parent) {
|
|
5268
5166
|
const keys = Object.keys(obj);
|
|
5269
5167
|
for (const key of keys) {
|
|
@@ -5302,7 +5200,6 @@ class Base {
|
|
|
5302
5200
|
this.isProtectedOnChange = prevDetection;
|
|
5303
5201
|
}
|
|
5304
5202
|
}
|
|
5305
|
-
/* tslint:disable:no-any */
|
|
5306
5203
|
serverDataBind(newChanges) {
|
|
5307
5204
|
if (!isBlazor()) {
|
|
5308
5205
|
return;
|
|
@@ -5315,10 +5212,8 @@ class Base {
|
|
|
5315
5212
|
this.bulkChanges = {};
|
|
5316
5213
|
}
|
|
5317
5214
|
}
|
|
5318
|
-
/* tslint:enable:no-any */
|
|
5319
5215
|
saveChanges(key, newValue, oldValue) {
|
|
5320
5216
|
if (isBlazor()) {
|
|
5321
|
-
// tslint:disable-next-line:no-any
|
|
5322
5217
|
const newChanges = {};
|
|
5323
5218
|
newChanges[`${key}`] = newValue;
|
|
5324
5219
|
this.serverDataBind(newChanges);
|
|
@@ -5434,7 +5329,7 @@ class Base {
|
|
|
5434
5329
|
* @returns {void} ?
|
|
5435
5330
|
*/
|
|
5436
5331
|
destroy() {
|
|
5437
|
-
// eslint-disable-next-line
|
|
5332
|
+
// eslint-disable-next-line camelcase
|
|
5438
5333
|
this.element.ej2_instances =
|
|
5439
5334
|
this.element.ej2_instances ?
|
|
5440
5335
|
this.element.ej2_instances.filter((i) => {
|
|
@@ -5461,7 +5356,6 @@ class Base {
|
|
|
5461
5356
|
* @param {string} comp Specifies the component module name or Component.
|
|
5462
5357
|
* @returns {any} ?
|
|
5463
5358
|
*/
|
|
5464
|
-
// tslint:disable-next-line:no-any
|
|
5465
5359
|
function getComponent(elem, comp) {
|
|
5466
5360
|
let instance;
|
|
5467
5361
|
let i;
|
|
@@ -5475,7 +5369,6 @@ function getComponent(elem, comp) {
|
|
|
5475
5369
|
}
|
|
5476
5370
|
}
|
|
5477
5371
|
else {
|
|
5478
|
-
// tslint:disable-next-line:no-any
|
|
5479
5372
|
if (instance instanceof comp) {
|
|
5480
5373
|
return instance;
|
|
5481
5374
|
}
|
|
@@ -5487,16 +5380,13 @@ function getComponent(elem, comp) {
|
|
|
5487
5380
|
* Function to remove the child instances.
|
|
5488
5381
|
*
|
|
5489
5382
|
* @param {HTMLElement} element ?
|
|
5490
|
-
* @
|
|
5383
|
+
* @returns {void} ?
|
|
5491
5384
|
* @private
|
|
5492
5385
|
*/
|
|
5493
|
-
// tslint:disable-next-line:no-any
|
|
5494
5386
|
function removeChildInstance(element) {
|
|
5495
|
-
// tslint:disable-next-line:no-any
|
|
5496
5387
|
const childEle = [].slice.call(element.getElementsByClassName('e-control'));
|
|
5497
5388
|
for (let i = 0; i < childEle.length; i++) {
|
|
5498
5389
|
const compName = childEle[parseInt(i.toString(), 10)].classList[1].split('e-')[1];
|
|
5499
|
-
// tslint:disable-next-line:no-any
|
|
5500
5390
|
const compInstance = getComponent(childEle[parseInt(i.toString(), 10)], compName);
|
|
5501
5391
|
if (!isUndefined(compInstance)) {
|
|
5502
5392
|
compInstance.destroy();
|
|
@@ -5506,6 +5396,7 @@ function removeChildInstance(element) {
|
|
|
5506
5396
|
let proxyToRaw;
|
|
5507
5397
|
const setProxyToRaw = (toRaw) => { proxyToRaw = toRaw; };
|
|
5508
5398
|
|
|
5399
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5509
5400
|
/**
|
|
5510
5401
|
* Returns the Class Object
|
|
5511
5402
|
*
|
|
@@ -5515,10 +5406,8 @@ const setProxyToRaw = (toRaw) => { proxyToRaw = toRaw; };
|
|
|
5515
5406
|
* @param {Object[]} type ?
|
|
5516
5407
|
* @returns {ClassObject} ?
|
|
5517
5408
|
*/
|
|
5518
|
-
// eslint-disable-next-line
|
|
5519
5409
|
function getObject(instance, curKey, defaultValue, type) {
|
|
5520
|
-
|
|
5521
|
-
if (!instance.properties.hasOwnProperty(curKey) || !(instance.properties[curKey] instanceof type)) {
|
|
5410
|
+
if (!Object.prototype.hasOwnProperty.call(instance.properties, curKey) || !(instance.properties[`${curKey}`] instanceof type)) {
|
|
5522
5411
|
instance.properties[`${curKey}`] = createInstance(type, [instance, curKey, defaultValue]);
|
|
5523
5412
|
}
|
|
5524
5413
|
return instance.properties[`${curKey}`];
|
|
@@ -5534,7 +5423,6 @@ function getObject(instance, curKey, defaultValue, type) {
|
|
|
5534
5423
|
* @param {boolean} isFactory ?
|
|
5535
5424
|
* @returns {Object[]} ?
|
|
5536
5425
|
*/
|
|
5537
|
-
// eslint-disable-next-line
|
|
5538
5426
|
function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactory) {
|
|
5539
5427
|
const result = [];
|
|
5540
5428
|
const len = defaultValue ? defaultValue.length : 0;
|
|
@@ -5563,8 +5451,7 @@ function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactor
|
|
|
5563
5451
|
*/
|
|
5564
5452
|
function propertyGetter(defaultValue, curKey) {
|
|
5565
5453
|
return function () {
|
|
5566
|
-
|
|
5567
|
-
if (!this.properties.hasOwnProperty(curKey)) {
|
|
5454
|
+
if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
|
|
5568
5455
|
this.properties[`${curKey}`] = defaultValue;
|
|
5569
5456
|
}
|
|
5570
5457
|
return this.properties[`${curKey}`];
|
|
@@ -5580,8 +5467,7 @@ function propertyGetter(defaultValue, curKey) {
|
|
|
5580
5467
|
function propertySetter(defaultValue, curKey) {
|
|
5581
5468
|
return function (newValue) {
|
|
5582
5469
|
if (this.properties[`${curKey}`] !== newValue) {
|
|
5583
|
-
|
|
5584
|
-
let oldVal = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;
|
|
5470
|
+
const oldVal = Object.prototype.hasOwnProperty.call(this.properties, curKey) ? this.properties[`${curKey}`] : defaultValue;
|
|
5585
5471
|
this.saveChanges(curKey, newValue, oldVal);
|
|
5586
5472
|
this.properties[`${curKey}`] = newValue;
|
|
5587
5473
|
}
|
|
@@ -5595,7 +5481,6 @@ function propertySetter(defaultValue, curKey) {
|
|
|
5595
5481
|
* @param {Object[]} type ?
|
|
5596
5482
|
* @returns {void} ?
|
|
5597
5483
|
*/
|
|
5598
|
-
// eslint-disable-next-line
|
|
5599
5484
|
function complexGetter(defaultValue, curKey, type) {
|
|
5600
5485
|
return function () {
|
|
5601
5486
|
return getObject(this, curKey, defaultValue, type);
|
|
@@ -5621,12 +5506,10 @@ function complexSetter(defaultValue, curKey, type) {
|
|
|
5621
5506
|
* @param {FunctionConstructor} type ?
|
|
5622
5507
|
* @returns {void} ?
|
|
5623
5508
|
*/
|
|
5624
|
-
// eslint-disable-next-line
|
|
5625
5509
|
function complexFactoryGetter(defaultValue, curKey, type) {
|
|
5626
5510
|
return function () {
|
|
5627
5511
|
const curType = type({});
|
|
5628
|
-
|
|
5629
|
-
if (this.properties.hasOwnProperty(curKey)) {
|
|
5512
|
+
if (Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
|
|
5630
5513
|
return this.properties[`${curKey}`];
|
|
5631
5514
|
}
|
|
5632
5515
|
else {
|
|
@@ -5656,15 +5539,13 @@ function complexFactorySetter(defaultValue, curKey, type) {
|
|
|
5656
5539
|
*/
|
|
5657
5540
|
function complexArrayGetter(defaultValue, curKey, type) {
|
|
5658
5541
|
return function () {
|
|
5659
|
-
|
|
5660
|
-
if (!this.properties.hasOwnProperty(curKey)) {
|
|
5542
|
+
if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
|
|
5661
5543
|
const defCollection = getObjectArray(this, curKey, defaultValue, type, false);
|
|
5662
5544
|
this.properties[`${curKey}`] = defCollection;
|
|
5663
5545
|
}
|
|
5664
5546
|
const ignore = ((this.controlParent !== undefined && this.controlParent.ignoreCollectionWatch)
|
|
5665
5547
|
|| this.ignoreCollectionWatch);
|
|
5666
|
-
|
|
5667
|
-
if (!this.properties[curKey].hasOwnProperty('push') && !ignore) {
|
|
5548
|
+
if (!Object.prototype.hasOwnProperty.call(this.properties[`${curKey}`], 'push') && !ignore) {
|
|
5668
5549
|
['push', 'pop'].forEach((extendFunc) => {
|
|
5669
5550
|
const descriptor = {
|
|
5670
5551
|
value: complexArrayDefinedCallback(extendFunc, curKey, type, this.properties[`${curKey}`]).bind(this),
|
|
@@ -5673,8 +5554,7 @@ function complexArrayGetter(defaultValue, curKey, type) {
|
|
|
5673
5554
|
Object.defineProperty(this.properties[`${curKey}`], extendFunc, descriptor);
|
|
5674
5555
|
});
|
|
5675
5556
|
}
|
|
5676
|
-
|
|
5677
|
-
if (!this.properties[curKey].hasOwnProperty('isComplexArray')) {
|
|
5557
|
+
if (!Object.prototype.hasOwnProperty.call(this.properties[`${curKey}`], 'isComplexArray')) {
|
|
5678
5558
|
Object.defineProperty(this.properties[`${curKey}`], 'isComplexArray', { value: true });
|
|
5679
5559
|
}
|
|
5680
5560
|
return this.properties[`${curKey}`];
|
|
@@ -5706,8 +5586,7 @@ function complexArraySetter(defaultValue, curKey, type) {
|
|
|
5706
5586
|
*/
|
|
5707
5587
|
function complexArrayFactorySetter(defaultValue, curKey, type) {
|
|
5708
5588
|
return function (newValue) {
|
|
5709
|
-
|
|
5710
|
-
const oldValueCollection = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;
|
|
5589
|
+
const oldValueCollection = Object.prototype.hasOwnProperty.call(this.properties, curKey) ? this.properties[`${curKey}`] : defaultValue;
|
|
5711
5590
|
const newValCollection = getObjectArray(this, curKey, newValue, type, true, true);
|
|
5712
5591
|
this.saveChanges(curKey, newValCollection, oldValueCollection);
|
|
5713
5592
|
this.properties[`${curKey}`] = newValCollection;
|
|
@@ -5723,8 +5602,7 @@ function complexArrayFactorySetter(defaultValue, curKey, type) {
|
|
|
5723
5602
|
function complexArrayFactoryGetter(defaultValue, curKey, type) {
|
|
5724
5603
|
return function () {
|
|
5725
5604
|
const curType = type({});
|
|
5726
|
-
|
|
5727
|
-
if (!this.properties.hasOwnProperty(curKey)) {
|
|
5605
|
+
if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
|
|
5728
5606
|
const defCollection = getObjectArray(this, curKey, defaultValue, curType, false);
|
|
5729
5607
|
this.properties[`${curKey}`] = defCollection;
|
|
5730
5608
|
}
|
|
@@ -5740,7 +5618,6 @@ function complexArrayFactoryGetter(defaultValue, curKey, type) {
|
|
|
5740
5618
|
* @returns {Object} ?
|
|
5741
5619
|
*/
|
|
5742
5620
|
function complexArrayDefinedCallback(dFunc, curKey, type, prop) {
|
|
5743
|
-
/* tslint:disable no-function-expression */
|
|
5744
5621
|
return function (...newValue) {
|
|
5745
5622
|
const keyString = this.propName ? this.getParentKey() + '.' + curKey + '-' : curKey + '-';
|
|
5746
5623
|
switch (dFunc) {
|
|
@@ -5752,12 +5629,12 @@ function complexArrayDefinedCallback(dFunc, curKey, type, prop) {
|
|
|
5752
5629
|
this.serverDataBind(model, newValue[parseInt(i.toString(), 10)], false, dFunc);
|
|
5753
5630
|
}
|
|
5754
5631
|
break;
|
|
5755
|
-
case 'pop':
|
|
5632
|
+
case 'pop': {
|
|
5756
5633
|
Array.prototype[`${dFunc}`].apply(prop);
|
|
5757
|
-
|
|
5758
|
-
let model = getArrayModel(keyString + prop.length, null, !this.controlParent, dFunc);
|
|
5634
|
+
const model = getArrayModel(keyString + prop.length, null, !this.controlParent, dFunc);
|
|
5759
5635
|
this.serverDataBind(model, { ejsAction: 'pop' }, false, dFunc);
|
|
5760
5636
|
break;
|
|
5637
|
+
}
|
|
5761
5638
|
}
|
|
5762
5639
|
return prop;
|
|
5763
5640
|
};
|
|
@@ -5782,16 +5659,11 @@ function getArrayModel(keyString, value, isControlParent, arrayFunction) {
|
|
|
5782
5659
|
}
|
|
5783
5660
|
return modelObject;
|
|
5784
5661
|
}
|
|
5785
|
-
// eslint-disable-next-line
|
|
5786
5662
|
/**
|
|
5787
5663
|
* Method used to create property. General syntax below.
|
|
5788
5664
|
*
|
|
5789
5665
|
* @param {Object} defaultValue - Specifies the default value of property.
|
|
5790
5666
|
* @returns {PropertyDecorator} ?
|
|
5791
|
-
* ```
|
|
5792
|
-
* @Property('TypeScript')
|
|
5793
|
-
* propertyName: Type;
|
|
5794
|
-
* ```
|
|
5795
5667
|
* @private
|
|
5796
5668
|
*/
|
|
5797
5669
|
function Property(defaultValue) {
|
|
@@ -5941,25 +5813,8 @@ function Event$1() {
|
|
|
5941
5813
|
*
|
|
5942
5814
|
* @param {Function} classConstructor ?
|
|
5943
5815
|
* @returns {void} ?
|
|
5944
|
-
* ```
|
|
5945
|
-
* @NotifyPropertyChanges
|
|
5946
|
-
* class DemoClass implements INotifyPropertyChanged {
|
|
5947
|
-
*
|
|
5948
|
-
* @Property()
|
|
5949
|
-
* property1: string;
|
|
5950
|
-
*
|
|
5951
|
-
* dataBind: () => void;
|
|
5952
|
-
*
|
|
5953
|
-
* constructor() { }
|
|
5954
|
-
*
|
|
5955
|
-
* onPropertyChanged(newProp: any, oldProp: any) {
|
|
5956
|
-
* // Called when property changed
|
|
5957
|
-
* }
|
|
5958
|
-
* }
|
|
5959
|
-
* ```
|
|
5960
5816
|
* @private
|
|
5961
5817
|
*/
|
|
5962
|
-
// eslint-disable-next-line
|
|
5963
5818
|
function NotifyPropertyChanges(classConstructor) {
|
|
5964
5819
|
/** Need to code */
|
|
5965
5820
|
}
|
|
@@ -5987,13 +5842,11 @@ function addPropertyCollection(target, key, propertyType, defaultValue, type) {
|
|
|
5987
5842
|
eventNames: []
|
|
5988
5843
|
};
|
|
5989
5844
|
}
|
|
5990
|
-
// eslint-disable-next-line
|
|
5991
5845
|
target.propList[propertyType + 's'].push({
|
|
5992
5846
|
propertyName: key,
|
|
5993
5847
|
defaultValue: defaultValue,
|
|
5994
5848
|
type: type
|
|
5995
5849
|
});
|
|
5996
|
-
// eslint-disable-next-line
|
|
5997
5850
|
target.propList[propertyType + 'Names'].push(key);
|
|
5998
5851
|
}
|
|
5999
5852
|
/**
|
|
@@ -6057,8 +5910,7 @@ function CreateBuilder(component) {
|
|
|
6057
5910
|
return this;
|
|
6058
5911
|
};
|
|
6059
5912
|
const instanceFunction = (element) => {
|
|
6060
|
-
|
|
6061
|
-
if (!builderFunction.prototype.hasOwnProperty('create')) {
|
|
5913
|
+
if (!Object.prototype.hasOwnProperty.call(builderFunction, 'create')) {
|
|
6062
5914
|
builderFunction.prototype = getBuilderProperties(component);
|
|
6063
5915
|
builderFunction.prototype.create = function () {
|
|
6064
5916
|
const temp = extend({}, {}, this.properties);
|
|
@@ -6079,8 +5931,7 @@ function CreateBuilder(component) {
|
|
|
6079
5931
|
* @private
|
|
6080
5932
|
*/
|
|
6081
5933
|
function getParentContext(context, prefix) {
|
|
6082
|
-
|
|
6083
|
-
if (context.hasOwnProperty('parentObj') === false) {
|
|
5934
|
+
if (Object.prototype.hasOwnProperty.call(context, 'parentObj') === false) {
|
|
6084
5935
|
return { context: context, prefix: prefix };
|
|
6085
5936
|
}
|
|
6086
5937
|
else {
|
|
@@ -6092,12 +5943,12 @@ function getParentContext(context, prefix) {
|
|
|
6092
5943
|
}
|
|
6093
5944
|
}
|
|
6094
5945
|
|
|
6095
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
6096
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6097
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
6098
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6099
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6100
|
-
};
|
|
5946
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
5947
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5948
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5949
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5950
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5951
|
+
};
|
|
6101
5952
|
var Animation_1;
|
|
6102
5953
|
/**
|
|
6103
5954
|
* The Animation framework provide options to animate the html DOM elements
|
|
@@ -6154,7 +6005,7 @@ let Animation = Animation_1 = class Animation extends Base {
|
|
|
6154
6005
|
*
|
|
6155
6006
|
* @param {HTMLElement} element - Element which needs to be stop the animation.
|
|
6156
6007
|
* @param {AnimationOptions} model - Handling the animation model at stop function.
|
|
6157
|
-
* @
|
|
6008
|
+
* @returns {void}
|
|
6158
6009
|
*/
|
|
6159
6010
|
static stop(element, model) {
|
|
6160
6011
|
element.style.animation = '';
|
|
@@ -6283,7 +6134,6 @@ let Animation = Animation_1 = class Animation extends Base {
|
|
|
6283
6134
|
* @param {AnimationModel} oldProp ?
|
|
6284
6135
|
* @returns {void} ?
|
|
6285
6136
|
*/
|
|
6286
|
-
// eslint-disable-next-line
|
|
6287
6137
|
onPropertyChanged(newProp, oldProp) {
|
|
6288
6138
|
// no code needed
|
|
6289
6139
|
}
|
|
@@ -6470,7 +6320,6 @@ function removeRipple(e, eventArgs) {
|
|
|
6470
6320
|
if (eventArgs.parent !== element) {
|
|
6471
6321
|
EventHandler.remove(element, 'mouseleave', rippleLeaveHandler);
|
|
6472
6322
|
}
|
|
6473
|
-
/* tslint:disable:align */
|
|
6474
6323
|
setTimeout(() => {
|
|
6475
6324
|
if (rippleElement && rippleElement.parentNode) {
|
|
6476
6325
|
rippleElement.parentNode.removeChild(rippleElement);
|
|
@@ -6528,9 +6377,7 @@ var GlobalAnimationMode;
|
|
|
6528
6377
|
GlobalAnimationMode["Disable"] = "Disable";
|
|
6529
6378
|
})(GlobalAnimationMode || (GlobalAnimationMode = {}));
|
|
6530
6379
|
|
|
6531
|
-
|
|
6532
|
-
* Module loading operations
|
|
6533
|
-
*/
|
|
6380
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6534
6381
|
const MODULE_SUFFIX = 'Module';
|
|
6535
6382
|
class ModuleLoader {
|
|
6536
6383
|
constructor(parent) {
|
|
@@ -6640,10 +6487,12 @@ class ModuleLoader {
|
|
|
6640
6487
|
}
|
|
6641
6488
|
}
|
|
6642
6489
|
|
|
6490
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6643
6491
|
/**
|
|
6644
6492
|
* To detect the changes for inner properties.
|
|
6645
6493
|
*
|
|
6646
6494
|
* @private
|
|
6495
|
+
* @returns {void} ?
|
|
6647
6496
|
*/
|
|
6648
6497
|
class ChildProperty {
|
|
6649
6498
|
constructor(parent, propName, defaultValue, isArray) {
|
|
@@ -6652,7 +6501,6 @@ class ChildProperty {
|
|
|
6652
6501
|
this.changedProperties = {};
|
|
6653
6502
|
this.childChangedProperties = {};
|
|
6654
6503
|
this.oldProperties = {};
|
|
6655
|
-
// eslint-disable-next-line
|
|
6656
6504
|
this.finalUpdate = () => { };
|
|
6657
6505
|
this.callChildDataBind = getValue('callChildDataBind', Base);
|
|
6658
6506
|
this.parentObj = parent;
|
|
@@ -6796,7 +6644,6 @@ class ChildProperty {
|
|
|
6796
6644
|
}
|
|
6797
6645
|
}
|
|
6798
6646
|
getParentKey(isSaveChanges) {
|
|
6799
|
-
// eslint-disable-next-line
|
|
6800
6647
|
let index = '';
|
|
6801
6648
|
let propName = this.propName;
|
|
6802
6649
|
/* istanbul ignore next */
|
|
@@ -6828,7 +6675,7 @@ class LicenseValidator {
|
|
|
6828
6675
|
constructor(key) {
|
|
6829
6676
|
this.isValidated = false;
|
|
6830
6677
|
this.isLicensed = true;
|
|
6831
|
-
this.version = '
|
|
6678
|
+
this.version = '{syncfusionReleaseversion}';
|
|
6832
6679
|
this.platform = /JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats|essentialstudio/i;
|
|
6833
6680
|
this.errors = {
|
|
6834
6681
|
noLicense: '<span>This application was built using a trial version of Syncfusion Essential Studio.' +
|
|
@@ -6931,7 +6778,7 @@ class LicenseValidator {
|
|
|
6931
6778
|
}
|
|
6932
6779
|
}
|
|
6933
6780
|
if (validateMsg && typeof document !== 'undefined' && !isNullOrUndefined(document)) {
|
|
6934
|
-
accountURL = (validateURL && validateURL !== '') ? validateURL : 'https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=
|
|
6781
|
+
accountURL = (validateURL && validateURL !== '') ? validateURL : 'https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs={versionencodedData}&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information';
|
|
6935
6782
|
const errorDiv = createElement('div', {
|
|
6936
6783
|
innerHTML: `<img src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE5OV80KSI+CjxwYXRoIGQ9Ik0xMiAyMUMxNi45NzA2IDIxIDIxIDE2Ljk3MDYgMjEgMTJDMjEgNy4wMjk0NCAxNi45NzA2IDMgMTIgM0M3LjAyOTQ0IDMgMyA3LjAyOTQ0IDMgMTJDMyAxNi45NzA2IDcuMDI5NDQgMjEgMTIgMjFaIiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBmaWxsPSIjNjE2MDYzIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS44MTI1IDlDMTIuNDMzOCA5IDEyLjkzNzUgOC40OTYzMiAxMi45Mzc1IDcuODc1QzEyLjkzNzUgNy4yNTM2OCAxMi40MzM4IDYuNzUgMTEuODEyNSA2Ljc1QzExLjE5MTIgNi43NSAxMC42ODc1IDcuMjUzNjggMTAuNjg3NSA3Ljg3NUMxMC42ODc1IDguNDk2MzIgMTEuMTkxMiA5IDExLjgxMjUgOVoiIGZpbGw9IiM3MzczNzMiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xOTlfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style="top: 6px;
|
|
6937
6784
|
position: absolute;
|
|
@@ -7011,7 +6858,8 @@ class LicenseValidator {
|
|
|
7011
6858
|
const charKey = decodeStr[decodeStr.length - 1];
|
|
7012
6859
|
const decryptedKey = [];
|
|
7013
6860
|
for (let i = 0; i < decodeStr.length; i++) {
|
|
7014
|
-
decryptedKey[
|
|
6861
|
+
decryptedKey[parseInt(i.toString(), 10)] = decodeStr[parseInt(i.toString(), 10)].charCodeAt(0)
|
|
6862
|
+
- charKey.charCodeAt(0);
|
|
7015
6863
|
}
|
|
7016
6864
|
for (let i = 0; i < decryptedKey.length; i++) {
|
|
7017
6865
|
buffr += String.fromCharCode(decryptedKey[parseInt(i.toString(), 10)]);
|
|
@@ -7214,12 +7062,12 @@ font-weight: 500;">Sign In</a></div>
|
|
|
7214
7062
|
}
|
|
7215
7063
|
};
|
|
7216
7064
|
|
|
7217
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7218
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7219
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7220
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7221
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7222
|
-
};
|
|
7065
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7066
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7067
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7068
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7069
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7070
|
+
};
|
|
7223
7071
|
let componentCount = 0;
|
|
7224
7072
|
let lastPageID;
|
|
7225
7073
|
let lastHistoryLen = 0;
|
|
@@ -7260,6 +7108,9 @@ let Component = class Component extends Base {
|
|
|
7260
7108
|
this.isStringTemplate = false;
|
|
7261
7109
|
this.needsID = false;
|
|
7262
7110
|
this.isReactHybrid = false;
|
|
7111
|
+
this.isAngular = false;
|
|
7112
|
+
this.isReact = false;
|
|
7113
|
+
this.isVue = false;
|
|
7263
7114
|
if (isNullOrUndefined(this.enableRtl)) {
|
|
7264
7115
|
this.setProperties({ 'enableRtl': rightToLeft }, true);
|
|
7265
7116
|
}
|
|
@@ -7268,7 +7119,6 @@ let Component = class Component extends Base {
|
|
|
7268
7119
|
}
|
|
7269
7120
|
this.moduleLoader = new ModuleLoader(this);
|
|
7270
7121
|
this.localObserver = new Observer(this);
|
|
7271
|
-
// tslint:disable-next-line:no-function-constructor-with-string-args
|
|
7272
7122
|
onIntlChange.on('notifyExternalChange', this.detectFunction, this, this.randomId);
|
|
7273
7123
|
// Based on the considered control list we have count the instance
|
|
7274
7124
|
if (typeof window !== 'undefined' && typeof document !== 'undefined' && !validateLicense()) {
|
|
@@ -7337,7 +7187,6 @@ let Component = class Component extends Base {
|
|
|
7337
7187
|
*/
|
|
7338
7188
|
getRootElement() {
|
|
7339
7189
|
if (this.isReactHybrid) {
|
|
7340
|
-
// eslint-disable-next-line
|
|
7341
7190
|
return this.actualElement;
|
|
7342
7191
|
}
|
|
7343
7192
|
else {
|
|
@@ -7349,7 +7198,6 @@ let Component = class Component extends Base {
|
|
|
7349
7198
|
*
|
|
7350
7199
|
* @returns {any} ?
|
|
7351
7200
|
*/
|
|
7352
|
-
// eslint-disable-next-line
|
|
7353
7201
|
getLocalData() {
|
|
7354
7202
|
const eleId = this.getModuleName() + this.element.id;
|
|
7355
7203
|
if (versionBasedStatePersistence) {
|
|
@@ -7424,7 +7272,8 @@ let Component = class Component extends Base {
|
|
|
7424
7272
|
treegrid: ['filter'],
|
|
7425
7273
|
gantt: ['tooltip'],
|
|
7426
7274
|
chart: ['Export', 'Zoom'],
|
|
7427
|
-
accumulationchart: ['Export']
|
|
7275
|
+
accumulationchart: ['Export'],
|
|
7276
|
+
'query-builder': 'all'
|
|
7428
7277
|
};
|
|
7429
7278
|
const component = this.getModuleName();
|
|
7430
7279
|
if (this.requiredModules && (!ignoredComponents[`${component}`] || ignoredComponents[`${component}`] !== 'all')) {
|
|
@@ -7461,8 +7310,7 @@ let Component = class Component extends Base {
|
|
|
7461
7310
|
renderComplete(wrapperElement) {
|
|
7462
7311
|
if (isBlazor()) {
|
|
7463
7312
|
const sfBlazor = 'sfBlazor';
|
|
7464
|
-
|
|
7465
|
-
window[sfBlazor].renderComplete(this.element, wrapperElement);
|
|
7313
|
+
window[`${sfBlazor}`].renderComplete(this.element, wrapperElement);
|
|
7466
7314
|
}
|
|
7467
7315
|
this.isRendered = true;
|
|
7468
7316
|
}
|
|
@@ -7560,7 +7408,6 @@ let Component = class Component extends Base {
|
|
|
7560
7408
|
* @returns {any} ?
|
|
7561
7409
|
* @private
|
|
7562
7410
|
*/
|
|
7563
|
-
// eslint-disable-next-line
|
|
7564
7411
|
createElement(tagName, prop, isVDOM) {
|
|
7565
7412
|
return createElement(tagName, prop);
|
|
7566
7413
|
}
|
|
@@ -7571,15 +7418,12 @@ let Component = class Component extends Base {
|
|
|
7571
7418
|
* @returns {void} .
|
|
7572
7419
|
* @private
|
|
7573
7420
|
*/
|
|
7574
|
-
// eslint-disable-next-line
|
|
7575
7421
|
triggerStateChange(handler, argument) {
|
|
7576
7422
|
if (this.isReactHybrid) {
|
|
7577
|
-
// eslint-disable-next-line
|
|
7578
7423
|
this.setState();
|
|
7579
7424
|
this.currentContext = { calls: handler, args: argument };
|
|
7580
7425
|
}
|
|
7581
7426
|
}
|
|
7582
|
-
// tslint: enable: no-any
|
|
7583
7427
|
injectModules() {
|
|
7584
7428
|
if (this.injectedModules && this.injectedModules.length) {
|
|
7585
7429
|
this.moduleLoader.inject(this.requiredModules(), this.injectedModules);
|
|
@@ -7614,13 +7458,11 @@ let Component = class Component extends Base {
|
|
|
7614
7458
|
}
|
|
7615
7459
|
}
|
|
7616
7460
|
}
|
|
7617
|
-
// eslint-disable-next-line
|
|
7618
7461
|
renderReactTemplates(callback) {
|
|
7619
7462
|
if (!isNullOrUndefined(callback)) {
|
|
7620
7463
|
callback();
|
|
7621
7464
|
}
|
|
7622
7465
|
}
|
|
7623
|
-
// eslint-disable-next-line
|
|
7624
7466
|
clearTemplate(templateName, index) {
|
|
7625
7467
|
//No Code
|
|
7626
7468
|
}
|
|
@@ -7650,9 +7492,7 @@ let Component = class Component extends Base {
|
|
|
7650
7492
|
addOnPersist(options) {
|
|
7651
7493
|
const persistObj = {};
|
|
7652
7494
|
for (const key of options) {
|
|
7653
|
-
|
|
7654
|
-
// eslint-disable-next-line
|
|
7655
|
-
objValue = getValue(key, this);
|
|
7495
|
+
const objValue = getValue(key, this);
|
|
7656
7496
|
if (!isUndefined(objValue)) {
|
|
7657
7497
|
setValue(key, this.getActualProperties(objValue), persistObj);
|
|
7658
7498
|
}
|
|
@@ -7676,8 +7516,7 @@ let Component = class Component extends Base {
|
|
|
7676
7516
|
const newObj = {};
|
|
7677
7517
|
for (const key of Object.keys(obj)) {
|
|
7678
7518
|
if (ignoreList.indexOf(key) === -1) {
|
|
7679
|
-
|
|
7680
|
-
const value = obj[key];
|
|
7519
|
+
const value = obj[`${key}`];
|
|
7681
7520
|
if (typeof value === 'object' && !(value instanceof Array)) {
|
|
7682
7521
|
const newList = ignoreList.filter((str) => {
|
|
7683
7522
|
const regExp = RegExp;
|
|
@@ -7719,12 +7558,12 @@ Component = __decorate$1([
|
|
|
7719
7558
|
}
|
|
7720
7559
|
})();
|
|
7721
7560
|
|
|
7722
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7723
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7724
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7725
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7726
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7727
|
-
};
|
|
7561
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7562
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7563
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7564
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7565
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7566
|
+
};
|
|
7728
7567
|
var Draggable_1;
|
|
7729
7568
|
const defaultPosition = { left: 0, top: 0, bottom: 0, right: 0 };
|
|
7730
7569
|
const isDraggedObject = { isDragged: false };
|
|
@@ -7766,7 +7605,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
7766
7605
|
this.prevTop = 0;
|
|
7767
7606
|
this.dragProcessStarted = false;
|
|
7768
7607
|
this.eleTop = 0;
|
|
7769
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
7770
7608
|
this.tapHoldTimer = 0;
|
|
7771
7609
|
this.externalInitialize = false;
|
|
7772
7610
|
this.diffY = 0;
|
|
@@ -7849,7 +7687,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
7849
7687
|
return this.getScrollableParent(element.parentNode, axis);
|
|
7850
7688
|
}
|
|
7851
7689
|
}
|
|
7852
|
-
/* eslint-disable */
|
|
7853
7690
|
getScrollableValues() {
|
|
7854
7691
|
this.parentScrollX = 0;
|
|
7855
7692
|
this.parentScrollY = 0;
|
|
@@ -7857,7 +7694,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
7857
7694
|
const verticalScrollParent = this.getScrollableParent(this.element.parentNode, 'vertical');
|
|
7858
7695
|
const horizontalScrollParent = this.getScrollableParent(this.element.parentNode, 'horizontal');
|
|
7859
7696
|
}
|
|
7860
|
-
/* eslint-enable */
|
|
7861
7697
|
initialize(evt, curTarget) {
|
|
7862
7698
|
this.currentStateTarget = evt.target;
|
|
7863
7699
|
if (this.isDragStarted()) {
|
|
@@ -7870,8 +7706,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
7870
7706
|
this.target = (evt.currentTarget || curTarget);
|
|
7871
7707
|
this.dragProcessStarted = false;
|
|
7872
7708
|
if (this.abort) {
|
|
7873
|
-
/* tslint:disable no-any */
|
|
7874
|
-
// eslint-disable-next-line
|
|
7875
7709
|
let abortSelectors = this.abort;
|
|
7876
7710
|
if (typeof abortSelectors === 'string') {
|
|
7877
7711
|
abortSelectors = [abortSelectors];
|
|
@@ -7942,7 +7776,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
7942
7776
|
}
|
|
7943
7777
|
/* istanbul ignore next */
|
|
7944
7778
|
if (this.isReplaceDragEle) {
|
|
7945
|
-
// eslint-disable-next-line
|
|
7946
7779
|
element = this.currentStateCheck(evt.target, element);
|
|
7947
7780
|
}
|
|
7948
7781
|
this.offset = this.calculateParentPosition(element);
|
|
@@ -8059,7 +7892,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8059
7892
|
top: (rect.top + window.pageYOffset) - parseInt(style.marginTop, 10)
|
|
8060
7893
|
};
|
|
8061
7894
|
}
|
|
8062
|
-
// tslint:disable-next-line:max-func-body-length
|
|
8063
7895
|
intDrag(evt) {
|
|
8064
7896
|
if (!isUndefined(evt.changedTouches) && (evt.changedTouches.length !== 1)) {
|
|
8065
7897
|
return;
|
|
@@ -8084,7 +7916,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8084
7916
|
}
|
|
8085
7917
|
const eleObj = this.checkTargetElement(evt);
|
|
8086
7918
|
if (eleObj.target && eleObj.instance) {
|
|
8087
|
-
/* tslint:disable no-any */
|
|
8088
7919
|
let flag = true;
|
|
8089
7920
|
if (this.hoverObject) {
|
|
8090
7921
|
if (this.hoverObject.instance !== eleObj.instance) {
|
|
@@ -8095,7 +7926,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8095
7926
|
}
|
|
8096
7927
|
}
|
|
8097
7928
|
if (flag) {
|
|
8098
|
-
// eslint-disable-next-line
|
|
8099
7929
|
eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
|
|
8100
7930
|
eleObj.instance.intOver(evt, eleObj.target);
|
|
8101
7931
|
this.hoverObject = eleObj;
|
|
@@ -8244,8 +8074,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8244
8074
|
if (elements.length === 0) {
|
|
8245
8075
|
elements = this.getPathElements(evt);
|
|
8246
8076
|
}
|
|
8247
|
-
/* tslint:disable no-any */
|
|
8248
|
-
// eslint-disable-next-line
|
|
8249
8077
|
let scrollParent = this.getScrollParent(elements, false);
|
|
8250
8078
|
if (this.elementInViewport(this.helperElement)) {
|
|
8251
8079
|
this.getScrollPosition(scrollParent, draEleTop);
|
|
@@ -8267,11 +8095,7 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8267
8095
|
this.pageX = pagex;
|
|
8268
8096
|
this.pageY = pagey;
|
|
8269
8097
|
}
|
|
8270
|
-
/* tslint:disable no-any */
|
|
8271
|
-
// eslint-disable-next-line
|
|
8272
8098
|
getScrollParent(node, reverse) {
|
|
8273
|
-
/* tslint:disable no-any */
|
|
8274
|
-
// eslint-disable-next-line
|
|
8275
8099
|
const nodeEl = reverse ? node.reverse() : node;
|
|
8276
8100
|
let hasScroll;
|
|
8277
8101
|
for (let i = nodeEl.length - 1; i >= 0; i--) {
|
|
@@ -8355,7 +8179,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8355
8179
|
const eleObj = this.checkTargetElement(evt);
|
|
8356
8180
|
if (eleObj.target && eleObj.instance) {
|
|
8357
8181
|
eleObj.instance.dragStopCalled = true;
|
|
8358
|
-
// eslint-disable-next-line
|
|
8359
8182
|
eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
|
|
8360
8183
|
eleObj.instance.intDrop(evt, eleObj.target);
|
|
8361
8184
|
}
|
|
@@ -8367,7 +8190,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8367
8190
|
* @returns {void}
|
|
8368
8191
|
* @private
|
|
8369
8192
|
*/
|
|
8370
|
-
// eslint-disable-next-line
|
|
8371
8193
|
intDestroy(evt) {
|
|
8372
8194
|
this.dragProcessStarted = false;
|
|
8373
8195
|
this.toggleEvents();
|
|
@@ -8382,7 +8204,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8382
8204
|
}
|
|
8383
8205
|
}
|
|
8384
8206
|
// triggers when property changed
|
|
8385
|
-
// eslint-disable-next-line
|
|
8386
8207
|
onPropertyChanged(newProp, oldProp) {
|
|
8387
8208
|
//No Code to handle
|
|
8388
8209
|
}
|
|
@@ -8413,7 +8234,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8413
8234
|
eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
|
|
8414
8235
|
eleHeightBound = ele.scrollHeight ? (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
|
|
8415
8236
|
const keys = ['Top', 'Left', 'Bottom', 'Right'];
|
|
8416
|
-
/* eslint-disable */
|
|
8417
8237
|
const styles = getComputedStyle(ele);
|
|
8418
8238
|
for (let i = 0; i < keys.length; i++) {
|
|
8419
8239
|
const key = keys[parseInt(i.toString(), 10)];
|
|
@@ -8423,7 +8243,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8423
8243
|
this.borderWidth[`${lowerKey}`] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
|
|
8424
8244
|
this.padding[`${lowerKey}`] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
|
|
8425
8245
|
}
|
|
8426
|
-
/* eslint-enable */
|
|
8427
8246
|
if (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) {
|
|
8428
8247
|
top = elementArea.top + document.scrollingElement.scrollTop;
|
|
8429
8248
|
}
|
|
@@ -8464,8 +8283,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
|
|
|
8464
8283
|
return elem;
|
|
8465
8284
|
}
|
|
8466
8285
|
getMousePosition(evt, isdragscroll) {
|
|
8467
|
-
/* tslint:disable no-any */
|
|
8468
|
-
// eslint-disable-next-line
|
|
8469
8286
|
const dragEle = evt.srcElement !== undefined ? evt.srcElement : evt.target;
|
|
8470
8287
|
const intCoord = this.getCoordinates(evt);
|
|
8471
8288
|
let pageX;
|
|
@@ -8629,12 +8446,12 @@ Draggable = Draggable_1 = __decorate$2([
|
|
|
8629
8446
|
NotifyPropertyChanges
|
|
8630
8447
|
], Draggable);
|
|
8631
8448
|
|
|
8632
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8633
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8634
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8635
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8636
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8637
|
-
};
|
|
8449
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8450
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8451
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8452
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8453
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8454
|
+
};
|
|
8638
8455
|
/**
|
|
8639
8456
|
* Droppable Module provides support to enable droppable functionality in Dom Elements.
|
|
8640
8457
|
* ```html
|
|
@@ -8665,7 +8482,6 @@ let Droppable = class Droppable extends Base {
|
|
|
8665
8482
|
EventHandler.add(this.element, Browser.isSafari() ? 'touchend' : Browser.touchEndEvent, this.intDrop, this);
|
|
8666
8483
|
}
|
|
8667
8484
|
// triggers when property changed
|
|
8668
|
-
// eslint-disable-next-line
|
|
8669
8485
|
onPropertyChanged(newProp, oldProp) {
|
|
8670
8486
|
//No Code to handle
|
|
8671
8487
|
}
|
|
@@ -8747,12 +8563,12 @@ Droppable = __decorate$3([
|
|
|
8747
8563
|
NotifyPropertyChanges
|
|
8748
8564
|
], Droppable);
|
|
8749
8565
|
|
|
8750
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8751
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8752
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8753
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8754
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8755
|
-
};
|
|
8566
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8567
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8568
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8569
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8570
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8571
|
+
};
|
|
8756
8572
|
var KeyboardEvents_1;
|
|
8757
8573
|
const keyCode = {
|
|
8758
8574
|
'backspace': 8,
|
|
@@ -8869,7 +8685,6 @@ let KeyboardEvents = KeyboardEvents_1 = class KeyboardEvents extends Base {
|
|
|
8869
8685
|
* @returns {void} ?
|
|
8870
8686
|
* @private
|
|
8871
8687
|
*/
|
|
8872
|
-
// eslint-disable-next-line
|
|
8873
8688
|
onPropertyChanged(newProp, oldProp) {
|
|
8874
8689
|
// No code are needed
|
|
8875
8690
|
}
|
|
@@ -9034,12 +8849,12 @@ class L10n {
|
|
|
9034
8849
|
}
|
|
9035
8850
|
L10n.locale = {};
|
|
9036
8851
|
|
|
9037
|
-
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
9038
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9039
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9040
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9041
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9042
|
-
};
|
|
8852
|
+
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8853
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8854
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8855
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8856
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8857
|
+
};
|
|
9043
8858
|
/**
|
|
9044
8859
|
* SwipeSettings is a framework module that provides support to handle swipe event like swipe up, swipe right, etc..,
|
|
9045
8860
|
*/
|
|
@@ -9182,10 +8997,8 @@ let Touch = class Touch extends Base {
|
|
|
9182
8997
|
velocity: this.getVelocity(point)
|
|
9183
8998
|
};
|
|
9184
8999
|
if (this.isTouchMoved) {
|
|
9185
|
-
let eSwipeArgs;
|
|
9186
9000
|
const tDistance = this.swipeSettings.swipeThresholdDistance;
|
|
9187
|
-
|
|
9188
|
-
eSwipeArgs = extend(eSwipeArgs, this.defaultArgs, swipeArgs);
|
|
9001
|
+
const eSwipeArgs = extend(undefined, this.defaultArgs, swipeArgs);
|
|
9189
9002
|
let canTrigger = false;
|
|
9190
9003
|
const ele = this.element;
|
|
9191
9004
|
const scrollBool = this.isScrollable(ele);
|
|
@@ -9223,7 +9036,6 @@ let Touch = class Touch extends Base {
|
|
|
9223
9036
|
* @param {TouchModel} oldProp ?
|
|
9224
9037
|
* @returns {void} ?
|
|
9225
9038
|
*/
|
|
9226
|
-
// eslint-disable-next-line
|
|
9227
9039
|
onPropertyChanged(newProp, oldProp) {
|
|
9228
9040
|
//No Code to handle
|
|
9229
9041
|
}
|
|
@@ -9280,11 +9092,9 @@ let Touch = class Touch extends Base {
|
|
|
9280
9092
|
tapHoldEvent(evt) {
|
|
9281
9093
|
this.tapCount = 0;
|
|
9282
9094
|
this.touchAction = true;
|
|
9283
|
-
let eTapArgs;
|
|
9284
9095
|
EventHandler.remove(this.element, Browser.touchMoveEvent, this.moveEvent);
|
|
9285
9096
|
EventHandler.remove(this.element, Browser.touchEndEvent, this.endEvent);
|
|
9286
|
-
|
|
9287
|
-
eTapArgs = { originalEvent: evt };
|
|
9097
|
+
const eTapArgs = { originalEvent: evt };
|
|
9288
9098
|
this.trigger('tapHold', eTapArgs);
|
|
9289
9099
|
EventHandler.remove(this.element, Browser.touchCancelEvent, this.cancelEvent);
|
|
9290
9100
|
}
|
|
@@ -9323,7 +9133,6 @@ let Touch = class Touch extends Base {
|
|
|
9323
9133
|
const interval = newT - this.tStampStart;
|
|
9324
9134
|
return Math.sqrt(xDist * xDist + yDist * yDist) / interval;
|
|
9325
9135
|
}
|
|
9326
|
-
// eslint-disable-next-line
|
|
9327
9136
|
checkSwipe(ele, flag) {
|
|
9328
9137
|
const keys = ['scroll', 'offset'];
|
|
9329
9138
|
const temp = flag ? ['Height', 'Top'] : ['Width', 'Left'];
|
|
@@ -9363,6 +9172,7 @@ Touch = __decorate$5([
|
|
|
9363
9172
|
NotifyPropertyChanges
|
|
9364
9173
|
], Touch);
|
|
9365
9174
|
|
|
9175
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9366
9176
|
/**
|
|
9367
9177
|
* Template Engine
|
|
9368
9178
|
*/
|
|
@@ -9385,14 +9195,6 @@ const SINGLE_SLASH = /\\/gi;
|
|
|
9385
9195
|
const DOUBLE_SLASH = /\\\\/gi;
|
|
9386
9196
|
const WORDFUNC = new RegExp('[\\w"\'@#$.\\s+]+', 'g');
|
|
9387
9197
|
const WINDOWFUNC = /\window\./gm;
|
|
9388
|
-
/**
|
|
9389
|
-
* The function to set regular expression for template expression string.
|
|
9390
|
-
*
|
|
9391
|
-
* @param {RegExp} value - Value expression.
|
|
9392
|
-
* @returns {RegExp} ?
|
|
9393
|
-
* @private
|
|
9394
|
-
*/
|
|
9395
|
-
|
|
9396
9198
|
// /**
|
|
9397
9199
|
// * To render the template string from the given data.
|
|
9398
9200
|
// * @param {string} template - String Template.
|
|
@@ -9418,45 +9220,43 @@ const WINDOWFUNC = /\window\./gm;
|
|
|
9418
9220
|
* @returns {string} ?
|
|
9419
9221
|
* @private
|
|
9420
9222
|
*/
|
|
9421
|
-
function compile
|
|
9223
|
+
function compile(template, helper, ignorePrefix) {
|
|
9422
9224
|
if (typeof template === 'function') {
|
|
9423
9225
|
return template;
|
|
9424
9226
|
}
|
|
9425
9227
|
else {
|
|
9426
9228
|
const argName = 'data';
|
|
9427
9229
|
const evalExpResult = evalExp(template, argName, helper, ignorePrefix);
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
var
|
|
9433
|
-
var
|
|
9434
|
-
|
|
9435
|
-
var
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
var
|
|
9445
|
-
var
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
}
|
|
9230
|
+
const condtion = `var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);
|
|
9231
|
+
var hrefRegex = (/(?:href)([\\s='"./]+)([\\w-./?=&\\\\#"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);
|
|
9232
|
+
if(str.match(valueRegEx)){
|
|
9233
|
+
var check = str.match(valueRegEx);
|
|
9234
|
+
var str1 = str;
|
|
9235
|
+
for (var i=0; i < check.length; i++) {
|
|
9236
|
+
var check1 = str.match(valueRegEx)[i].split('value=')[1];
|
|
9237
|
+
var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '"') : check1;
|
|
9238
|
+
change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'"') : change;
|
|
9239
|
+
str1 = str1.replace(check1, change);
|
|
9240
|
+
}
|
|
9241
|
+
str = str.replace(str, str1);
|
|
9242
|
+
}
|
|
9243
|
+
else if (str.match(/(?:href='')/) === null) {
|
|
9244
|
+
if(str.match(hrefRegex)) {
|
|
9245
|
+
var check = str.match(hrefRegex);
|
|
9246
|
+
var str1 = str;
|
|
9247
|
+
for (var i=0; i < check.length; i++) {
|
|
9248
|
+
var check1 = str.match(hrefRegex)[i].split('href=')[1];
|
|
9249
|
+
if (check1) {
|
|
9250
|
+
var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '"') : check1;
|
|
9251
|
+
change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'"') : change;
|
|
9252
|
+
str1 = str1.replace(check1, change);
|
|
9253
|
+
}
|
|
9254
|
+
}
|
|
9255
|
+
str = str.replace(str, str1);
|
|
9256
|
+
}
|
|
9257
|
+
}
|
|
9457
9258
|
`;
|
|
9458
|
-
const fnCode = 'var str
|
|
9459
|
-
/* eslint-enable */
|
|
9259
|
+
const fnCode = 'var str="' + evalExpResult + '";' + condtion + ' return str;';
|
|
9460
9260
|
const fn = new Function(argName, fnCode);
|
|
9461
9261
|
return fn.bind(helper);
|
|
9462
9262
|
}
|
|
@@ -9500,9 +9300,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
|
|
|
9500
9300
|
else {
|
|
9501
9301
|
str = str.replace(/\\?"/g, '\\"');
|
|
9502
9302
|
}
|
|
9503
|
-
return str.replace(LINES, '').replace(DBL_QUOTED_STR, '\'$1\'').replace(exp,
|
|
9504
|
-
// eslint-disable-next-line
|
|
9505
|
-
(match, cnt, offset, matchStr) => {
|
|
9303
|
+
return str.replace(LINES, '').replace(DBL_QUOTED_STR, '\'$1\'').replace(exp, (match, cnt, offset, matchStr) => {
|
|
9506
9304
|
const SPECIAL_CHAR = /@|#|\$/gm;
|
|
9507
9305
|
const matches = cnt.match(CALL_FUNCTION);
|
|
9508
9306
|
// matches to detect any function calls
|
|
@@ -9525,12 +9323,10 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
|
|
|
9525
9323
|
//handling for condition
|
|
9526
9324
|
const rlStr = matches[1].split(' of ');
|
|
9527
9325
|
// replace for each into actual JavaScript
|
|
9528
|
-
// eslint-disable-next-line
|
|
9529
9326
|
cnt = '"; ' + cnt.replace(matches[1], (mtc) => {
|
|
9530
9327
|
localKeys.push(rlStr[0]);
|
|
9531
9328
|
localKeys.push(rlStr[0] + 'Index');
|
|
9532
9329
|
varCOunt = varCOunt + 1;
|
|
9533
|
-
// tslint:disable-next-line
|
|
9534
9330
|
return 'var i' + varCOunt + '=0; i' + varCOunt + ' < ' + addNameSpace(rlStr[1], true, nameSpace, localKeys, ignorePrefix) + '.length; i' + varCOunt + '++';
|
|
9535
9331
|
}) + '{ \n ' + rlStr[0] + '= ' + addNameSpace(rlStr[1], true, nameSpace, localKeys, ignorePrefix)
|
|
9536
9332
|
+ '[i' + varCOunt + ']; \n var ' + rlStr[0] + 'Index=i' + varCOunt + '; \n str = str + "';
|
|
@@ -9538,8 +9334,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
|
|
|
9538
9334
|
else {
|
|
9539
9335
|
//helper function handling
|
|
9540
9336
|
const fnStr = cnt.split('(');
|
|
9541
|
-
|
|
9542
|
-
let fNameSpace = (helper && helper.hasOwnProperty(fnStr[0]) ? 'this.' : 'global');
|
|
9337
|
+
let fNameSpace = (helper && Object.prototype.hasOwnProperty.call(helper, fnStr[0]) ? 'this.' : 'global');
|
|
9543
9338
|
fNameSpace = (/\./.test(fnStr[0]) ? '' : fNameSpace);
|
|
9544
9339
|
const ftArray = matches[1].split(',');
|
|
9545
9340
|
if (matches[1].length !== 0 && !(/data/).test(ftArray[0]) && !(/window./).test(ftArray[0])) {
|
|
@@ -9550,7 +9345,6 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
|
|
|
9550
9345
|
if (WINDOWFUNC.test(cnt) && arrObj.test(cnt) || splRegexp.test(cnt)) {
|
|
9551
9346
|
const splArrRegexp = /@|\$|#|\]\./gm;
|
|
9552
9347
|
if (splArrRegexp.test(cnt)) {
|
|
9553
|
-
// tslint:disable-next-line
|
|
9554
9348
|
cnt = '"+ ' + (fNameSpace === 'global' ? '' : fNameSpace) + cnt.replace(matches[1], rlStr.replace(WORDFUNC, (strs) => {
|
|
9555
9349
|
return HandleSpecialCharArrObj(strs, nameSpace, localKeys, ignorePrefix);
|
|
9556
9350
|
})) + '+ "';
|
|
@@ -9566,9 +9360,8 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
|
|
|
9566
9360
|
else if (ELSE_STMT.test(cnt)) {
|
|
9567
9361
|
// handling else condition
|
|
9568
9362
|
cnt = '"; ' + cnt.replace(ELSE_STMT, '} else { \n str = str + "');
|
|
9569
|
-
// eslint-disable-next-line
|
|
9570
9363
|
}
|
|
9571
|
-
else if (
|
|
9364
|
+
else if (cnt.match(IF_OR_FOR)) {
|
|
9572
9365
|
// close condition
|
|
9573
9366
|
cnt = cnt.replace(IF_OR_FOR, '"; \n } \n str = str + "');
|
|
9574
9367
|
}
|
|
@@ -9633,17 +9426,20 @@ function NameSpaceArrObj(str, addNS, nameSpace, ignoreList) {
|
|
|
9633
9426
|
function NameSpaceForspecialChar(str, addNS, nameSpace, ignoreList) {
|
|
9634
9427
|
return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1) ? nameSpace + '["' + str : str);
|
|
9635
9428
|
}
|
|
9636
|
-
|
|
9429
|
+
/**
|
|
9430
|
+
* Replace double slashes to single slash.
|
|
9431
|
+
*
|
|
9432
|
+
* @param {string} tempStr ?
|
|
9433
|
+
* @returns {any} ?
|
|
9434
|
+
*/
|
|
9637
9435
|
function SlashReplace(tempStr) {
|
|
9638
9436
|
const double = '\\\\';
|
|
9639
9437
|
if (tempStr.match(DOUBLE_SLASH)) {
|
|
9640
|
-
|
|
9641
|
-
tempStr = tempStr;
|
|
9438
|
+
return tempStr;
|
|
9642
9439
|
}
|
|
9643
9440
|
else {
|
|
9644
|
-
|
|
9441
|
+
return tempStr.replace(SINGLE_SLASH, double);
|
|
9645
9442
|
}
|
|
9646
|
-
return tempStr;
|
|
9647
9443
|
}
|
|
9648
9444
|
/**
|
|
9649
9445
|
*
|
|
@@ -9674,9 +9470,7 @@ function HandleSpecialCharArrObj(str, nameSpaceNew, keys, ignorePrefix) {
|
|
|
9674
9470
|
}
|
|
9675
9471
|
}
|
|
9676
9472
|
|
|
9677
|
-
|
|
9678
|
-
* Template Engine Bridge
|
|
9679
|
-
*/
|
|
9473
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
|
|
9680
9474
|
const HAS_ROW = /^[\n\r.]+<tr|^<tr/;
|
|
9681
9475
|
const HAS_SVG = /^[\n\r.]+<svg|^<path|^<g/;
|
|
9682
9476
|
const blazorTemplates = {};
|
|
@@ -9696,10 +9490,8 @@ function getRandomId() {
|
|
|
9696
9490
|
* @returns {NodeList} ?
|
|
9697
9491
|
* @private
|
|
9698
9492
|
*/
|
|
9699
|
-
|
|
9700
|
-
function compile$$1(templateString, helper, ignorePrefix) {
|
|
9493
|
+
function compile$1(templateString, helper, ignorePrefix) {
|
|
9701
9494
|
const compiler = engineObj.compile(templateString, helper, ignorePrefix);
|
|
9702
|
-
// eslint-disable-next-line
|
|
9703
9495
|
return (data, component, propName, templateId, isStringTemplate, index, element, root) => {
|
|
9704
9496
|
const result = compiler(data, component, propName, element, root);
|
|
9705
9497
|
const blazorTemplateId = 'BlazorTemplateId';
|
|
@@ -9724,9 +9516,7 @@ function compile$$1(templateString, helper, ignorePrefix) {
|
|
|
9724
9516
|
data[`${blazorTemplateId}`] = blazorId;
|
|
9725
9517
|
blazorTemplates[`${templateId}`].push(data);
|
|
9726
9518
|
}
|
|
9727
|
-
// eslint-disable-next-line
|
|
9728
9519
|
return propName === 'rowTemplate' ? [createElement('tr', { id: blazorId, className: 'e-blazor-template' })] :
|
|
9729
|
-
// eslint-disable-next-line
|
|
9730
9520
|
[createElement('div', { id: blazorId, className: 'e-blazor-template' })];
|
|
9731
9521
|
}
|
|
9732
9522
|
if (typeof result === 'string') {
|
|
@@ -9772,7 +9562,6 @@ function updateBlazorTemplate(templateId, templateName, comp, isEmpty, callBack)
|
|
|
9772
9562
|
function resetBlazorTemplate(templateId, templateName, index) {
|
|
9773
9563
|
const templateDiv = document.getElementById(templateId);
|
|
9774
9564
|
if (templateDiv) {
|
|
9775
|
-
// eslint-disable-next-line
|
|
9776
9565
|
const innerTemplates = templateDiv.getElementsByClassName('blazor-inner-template');
|
|
9777
9566
|
for (let i = 0; i < innerTemplates.length; i++) {
|
|
9778
9567
|
let tempId = ' ';
|
|
@@ -9825,7 +9614,6 @@ function getTemplateEngine() {
|
|
|
9825
9614
|
* @returns {Function} ?
|
|
9826
9615
|
* @private
|
|
9827
9616
|
*/
|
|
9828
|
-
// eslint-disable-next-line
|
|
9829
9617
|
function initializeCSPTemplate(template, helper) {
|
|
9830
9618
|
let boundFunc;
|
|
9831
9619
|
template.prototype.CSPTemplate = true;
|
|
@@ -9840,9 +9628,8 @@ function initializeCSPTemplate(template, helper) {
|
|
|
9840
9628
|
}
|
|
9841
9629
|
//Default Engine Class
|
|
9842
9630
|
class Engine {
|
|
9843
|
-
// eslint-disable-next-line
|
|
9844
9631
|
compile(templateString, helper = {}, ignorePrefix) {
|
|
9845
|
-
return compile
|
|
9632
|
+
return compile(templateString, helper);
|
|
9846
9633
|
}
|
|
9847
9634
|
}
|
|
9848
9635
|
const engineObj = { compile: new Engine().compile };
|
|
@@ -10023,7 +9810,6 @@ class SanitizeHtmlHelper {
|
|
|
10023
9810
|
}
|
|
10024
9811
|
}
|
|
10025
9812
|
static removeXssAttrs() {
|
|
10026
|
-
// eslint-disable-next-line
|
|
10027
9813
|
this.removeAttrs.forEach((item, index) => {
|
|
10028
9814
|
const elements = this.wrapElement.querySelectorAll(item.selector);
|
|
10029
9815
|
if (elements.length > 0) {
|
|
@@ -10035,9 +9821,5 @@ class SanitizeHtmlHelper {
|
|
|
10035
9821
|
}
|
|
10036
9822
|
}
|
|
10037
9823
|
|
|
10038
|
-
|
|
10039
|
-
* Base modules
|
|
10040
|
-
*/
|
|
10041
|
-
|
|
10042
|
-
export { blazorCultureFormats, IntlBase, Ajax, Fetch, Animation, rippleEffect, isRippleEnabled, enableRipple, animationMode, setGlobalAnimation, GlobalAnimationMode, Base, getComponent, removeChildInstance, proxyToRaw, setProxyToRaw, Browser, versionBasedStatePersistence, enableVersionBasedPersistence, Component, ChildProperty, Position, Draggable, Droppable, EventHandler, onIntlChange, rightToLeft, cldrData, defaultCulture, defaultCurrencyCode, Internationalization, setCulture, setCurrencyCode, loadCldr, enableRtl, getNumericObject, getNumberDependable, getDefaultDateObject, KeyboardEvents, L10n, ModuleLoader, Property, Complex, ComplexFactory, Collection, CollectionFactory, Event$1 as Event, NotifyPropertyChanges, CreateBuilder, SwipeSettings, Touch, HijriParser, blazorTemplates, getRandomId, compile$$1 as compile, updateBlazorTemplate, resetBlazorTemplate, setTemplateEngine, getTemplateEngine, initializeCSPTemplate, disableBlazorMode, createInstance, setImmediate, getValue, setValue, deleteObject, containerObject, isObject, getEnumValue, merge, extend, isNullOrUndefined, isUndefined, getUniqueID, debounce, queryParams, isObjectArray, compareElementParent, throwError, print, formatUnit, enableBlazorMode, isBlazor, getElement, getInstance, addInstance, uniqueID, createElement, addClass, removeClass, isVisible, prepend, append, detach, remove, attributes, select, selectAll, closest, siblings, getAttributeOrDefault, setStyleAttribute, classList, matches, includeInnerHTML, containsClass, cloneNode, Observer, SanitizeHtmlHelper, componentList, registerLicense, validateLicense, getVersion, createLicenseOverlay };
|
|
9824
|
+
export { Ajax, Animation, Base, Browser, ChildProperty, Collection, CollectionFactory, Complex, ComplexFactory, Component, CreateBuilder, Draggable, Droppable, Event$1 as Event, EventHandler, Fetch, GlobalAnimationMode, HijriParser, Internationalization, IntlBase, KeyboardEvents, L10n, ModuleLoader, NotifyPropertyChanges, Observer, Position, Property, SanitizeHtmlHelper, SwipeSettings, Touch, addClass, addInstance, animationMode, append, attributes, blazorCultureFormats, blazorTemplates, classList, cldrData, cloneNode, closest, compareElementParent, compile$1 as compile, componentList, containerObject, containsClass, createElement, createInstance, createLicenseOverlay, debounce, defaultCulture, defaultCurrencyCode, deleteObject, detach, disableBlazorMode, enableBlazorMode, enableRipple, enableRtl, enableVersionBasedPersistence, extend, formatUnit, getAttributeOrDefault, getComponent, getDefaultDateObject, getElement, getEnumValue, getInstance, getNumberDependable, getNumericObject, getRandomId, getTemplateEngine, getUniqueID, getValue, getVersion, includeInnerHTML, initializeCSPTemplate, isBlazor, isNullOrUndefined, isObject, isObjectArray, isRippleEnabled, isUndefined, isVisible, loadCldr, matches, merge, onIntlChange, prepend, print, proxyToRaw, queryParams, registerLicense, remove, removeChildInstance, removeClass, resetBlazorTemplate, rightToLeft, rippleEffect, select, selectAll, setCulture, setCurrencyCode, setGlobalAnimation, setImmediate, setProxyToRaw, setStyleAttribute, setTemplateEngine, setValue, siblings, throwError, uniqueID, updateBlazorTemplate, validateLicense, versionBasedStatePersistence };
|
|
10043
9825
|
//# sourceMappingURL=ej2-base.es2015.js.map
|