@syncfusion/ej2-base 24.2.8 → 25.1.35-579988
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +2 -1
- package/CHANGELOG.md +641 -677
- package/{README.md → ReadMe.md} +100 -100
- 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 +178 -1025
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +226 -934
- 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/ajax.ts +236 -0
- package/dist/ts/animation.ts +544 -0
- package/dist/ts/base.ts +357 -0
- package/dist/ts/browser.ts +387 -0
- package/dist/ts/child-property.ts +192 -0
- package/dist/ts/component.ts +519 -0
- package/dist/ts/dom.ts +488 -0
- package/dist/ts/draggable.ts +1155 -0
- package/dist/ts/droppable.ts +172 -0
- package/dist/ts/event-handler.ts +169 -0
- package/dist/ts/internationalization.ts +369 -0
- package/dist/ts/intl/date-formatter.ts +317 -0
- package/dist/ts/intl/date-parser.ts +426 -0
- package/dist/ts/intl/intl-base.ts +1104 -0
- package/dist/ts/intl/number-formatter.ts +411 -0
- package/dist/ts/intl/number-parser.ts +158 -0
- package/dist/ts/intl/parser-base.ts +394 -0
- package/dist/ts/keyboard.ts +238 -0
- package/dist/ts/l10n.ts +94 -0
- package/dist/ts/module-loader.ts +149 -0
- package/dist/ts/notify-property-change.ts +726 -0
- package/dist/ts/observer.ts +236 -0
- package/dist/ts/sanitize-helper.ts +224 -0
- package/dist/ts/template-engine.ts +191 -0
- package/dist/ts/template.ts +329 -0
- package/dist/ts/touch.ts +544 -0
- package/dist/ts/util.ts +523 -0
- package/dist/ts/validate-lic.ts +0 -0
- package/e2e/crypto.js +16 -16
- package/e2e/m.protractor.config.js +286 -286
- package/e2e/modified-protractor/protractor.config.js +316 -316
- package/e2e/protractor.config.js +389 -332
- package/helpers/e2e/index.js +3 -3
- package/license +10 -10
- package/package.json +225 -174
- package/src/ajax.d.ts +1 -1
- package/src/ajax.js +3 -8
- package/src/animation-model.d.ts +41 -41
- package/src/animation.d.ts +6 -6
- package/src/animation.js +25 -25
- package/src/base.d.ts +2 -1
- package/src/base.js +9 -7
- package/src/component-model.d.ts +16 -16
- package/src/component.d.ts +9 -3
- package/src/component.js +50 -38
- package/src/draggable-model.d.ts +113 -113
- package/src/draggable.d.ts +2 -0
- package/src/draggable.js +45 -29
- package/src/droppable-model.d.ts +23 -23
- package/src/droppable.js +19 -19
- package/src/event-handler.js +2 -1
- package/src/index.d.ts +0 -3
- package/src/index.js +0 -3
- package/src/intl/date-formatter.js +2 -6
- package/src/intl/date-parser.js +1 -20
- package/src/intl/intl-base.js +1 -164
- package/src/intl/number-formatter.d.ts +3 -0
- package/src/intl/number-formatter.js +7 -7
- package/src/intl/number-parser.js +1 -0
- package/src/keyboard-model.d.ts +16 -16
- package/src/keyboard.js +19 -19
- package/src/module-loader.d.ts +12 -0
- package/src/module-loader.js +11 -0
- package/src/notify-property-change.js +3 -2
- package/src/observer.js +2 -0
- package/src/sanitize-helper.js +5 -0
- package/src/template-engine.js +1 -0
- package/src/template.js +3 -2
- package/src/touch-model.d.ts +39 -39
- package/src/touch.js +19 -19
- package/src/validate-lic.d.ts +0 -11
- package/src/validate-lic.js +1 -259
- package/styles/_all.scss +2 -2
- package/styles/_bds-dark-definition.scss +15 -0
- package/styles/_bds-definition.scss +15 -0
- 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/_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-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 +48 -48
- package/styles/_material-definition.scss +49 -49
- package/styles/_material3-dark-definition.scss +14 -14
- package/styles/_material3-definition.scss +15 -15
- package/styles/_tailwind-dark-definition.scss +15 -15
- package/styles/_tailwind-definition.scss +15 -15
- package/styles/animation/_all.scss +560 -560
- package/styles/bootstrap-dark.css +10 -1
- package/styles/bootstrap.css +10 -1
- package/styles/bootstrap4.css +10 -1
- package/styles/bootstrap5-dark.css +10 -1
- package/styles/bootstrap5.css +10 -1
- package/styles/common/_all.scss +2 -2
- package/styles/common/_core.scss +117 -117
- package/styles/common/_mixin.scss +9 -9
- package/styles/definition/_bds-dark.scss +1179 -0
- package/styles/definition/_bds.scss +1474 -0
- package/styles/definition/_bootstrap-dark.scss +219 -219
- package/styles/definition/_bootstrap.scss +215 -215
- package/styles/definition/_bootstrap4.scss +167 -167
- package/styles/definition/_bootstrap5-dark.scss +493 -493
- package/styles/definition/_bootstrap5.scss +494 -494
- package/styles/definition/_fabric-dark.scss +200 -200
- package/styles/definition/_fabric.scss +198 -198
- package/styles/definition/_fluent-dark.scss +557 -557
- package/styles/definition/_fluent.scss +558 -558
- package/styles/definition/_fluent2.scss +2198 -0
- package/styles/definition/_fusionnew-dark.scss +362 -362
- package/styles/definition/_fusionnew.scss +363 -363
- package/styles/definition/_highcontrast-light.scss +193 -193
- package/styles/definition/_highcontrast.scss +195 -195
- package/styles/definition/_material-dark.scss +198 -198
- package/styles/definition/_material.scss +192 -192
- package/styles/definition/_material3-dark.scss +710 -710
- package/styles/definition/_material3.scss +792 -792
- package/styles/definition/_tailwind-dark.scss +488 -488
- package/styles/definition/_tailwind.scss +485 -485
- package/styles/fabric-dark.css +10 -1
- package/styles/fabric.css +10 -1
- package/styles/fluent-dark.css +10 -1
- package/styles/fluent.css +10 -1
- package/styles/highcontrast-light.css +10 -1
- package/styles/highcontrast.css +10 -1
- package/styles/material-dark.css +10 -1
- package/styles/material.css +10 -1
- package/styles/material3-dark.css +10 -1
- package/styles/material3.css +10 -1
- package/styles/offline-theme/material-dark.css +10 -1
- package/styles/offline-theme/material.css +10 -1
- package/styles/offline-theme/tailwind-dark.css +10 -1
- package/styles/offline-theme/tailwind.css +10 -1
- package/styles/tailwind-dark.css +10 -1
- package/styles/tailwind.css +10 -1
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -60
- package/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -42
- package/bin/syncfusion-license.js +0 -2
- package/dist/ej2-base.min.js +0 -10
- package/e2e/index.d.ts +0 -27
- package/src/fetch.d.ts +0 -114
- package/src/fetch.js +0 -116
- package/src/hijri-parser.d.ts +0 -19
- package/src/hijri-parser.js +0 -204
|
@@ -78,6 +78,7 @@ export declare class NumberFormat {
|
|
|
78
78
|
* @param {number} value ?
|
|
79
79
|
* @param {base.GenericFormatOptions} fOptions ?
|
|
80
80
|
* @param {CommonOptions} dOptions ?
|
|
81
|
+
* @param {NumberFormatOptions} [option] ?
|
|
81
82
|
* @returns {string} ?
|
|
82
83
|
*/
|
|
83
84
|
private static intNumberFormatter;
|
|
@@ -107,6 +108,7 @@ export declare class NumberFormat {
|
|
|
107
108
|
* @param {number} value ?
|
|
108
109
|
* @param {number} min ?
|
|
109
110
|
* @param {number} max ?
|
|
111
|
+
* @param {NumberFormatOptions} [option] ?
|
|
110
112
|
* @returns {string} ?
|
|
111
113
|
*/
|
|
112
114
|
private static processFraction;
|
|
@@ -122,6 +124,7 @@ export declare class NumberFormat {
|
|
|
122
124
|
* Returns custom format for pivot table
|
|
123
125
|
*
|
|
124
126
|
* @param {number} value ?
|
|
127
|
+
* @returns {string} ?
|
|
125
128
|
*/
|
|
126
129
|
private static customPivotFormat;
|
|
127
130
|
}
|
|
@@ -8,13 +8,9 @@ var errorText = {
|
|
|
8
8
|
'mf': 'minimumFractionDigits',
|
|
9
9
|
'lf': 'maximumFractionDigits'
|
|
10
10
|
};
|
|
11
|
-
var integerError = 'minimumIntegerDigits';
|
|
12
11
|
var percentSign = 'percentSign';
|
|
13
12
|
var minusSign = 'minusSign';
|
|
14
|
-
var spaceRegex = /\s/;
|
|
15
13
|
var mapper = ['infinity', 'nan', 'group', 'decimal', 'exponential'];
|
|
16
|
-
var infinity = 'infinity';
|
|
17
|
-
var nan = 'nan';
|
|
18
14
|
/**
|
|
19
15
|
* Module for number formatting.
|
|
20
16
|
*
|
|
@@ -192,6 +188,7 @@ var NumberFormat = /** @class */ (function () {
|
|
|
192
188
|
* @param {number} value ?
|
|
193
189
|
* @param {base.GenericFormatOptions} fOptions ?
|
|
194
190
|
* @param {CommonOptions} dOptions ?
|
|
191
|
+
* @param {NumberFormatOptions} [option] ?
|
|
195
192
|
* @returns {string} ?
|
|
196
193
|
*/
|
|
197
194
|
NumberFormat.intNumberFormatter = function (value, fOptions, dOptions, option) {
|
|
@@ -243,7 +240,7 @@ var NumberFormat = /** @class */ (function () {
|
|
|
243
240
|
fValue = fValue.replace('e', dOptions.numberMapper.numberSymbols[mapper[4]]);
|
|
244
241
|
}
|
|
245
242
|
fValue = fValue.replace('.', dOptions.numberMapper.numberSymbols[mapper[3]]);
|
|
246
|
-
fValue = curData.format ===
|
|
243
|
+
fValue = curData.format === '#,###,,;(#,###,,)' ? this.customPivotFormat(parseInt(fValue, 10)) : fValue;
|
|
247
244
|
if (curData.useGrouping) {
|
|
248
245
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
249
246
|
fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ',', dOptions.numberMapper.numberSymbols[mapper[3]] || '.', curData.groupData.secondary);
|
|
@@ -315,6 +312,7 @@ var NumberFormat = /** @class */ (function () {
|
|
|
315
312
|
* @param {number} value ?
|
|
316
313
|
* @param {number} min ?
|
|
317
314
|
* @param {number} max ?
|
|
315
|
+
* @param {NumberFormatOptions} [option] ?
|
|
318
316
|
* @returns {string} ?
|
|
319
317
|
*/
|
|
320
318
|
NumberFormat.processFraction = function (value, min, max, option) {
|
|
@@ -366,16 +364,18 @@ var NumberFormat = /** @class */ (function () {
|
|
|
366
364
|
* Returns custom format for pivot table
|
|
367
365
|
*
|
|
368
366
|
* @param {number} value ?
|
|
367
|
+
* @returns {string} ?
|
|
369
368
|
*/
|
|
370
369
|
NumberFormat.customPivotFormat = function (value) {
|
|
371
370
|
if (value >= 500000) {
|
|
372
371
|
value /= 1000000;
|
|
373
|
-
|
|
372
|
+
// eslint-disable-next-line
|
|
373
|
+
var _a = value.toString().split('.'), integer = _a[0], decimal = _a[1];
|
|
374
374
|
return decimal && +decimal.substring(0, 1) >= 5
|
|
375
375
|
? Math.ceil(value).toString()
|
|
376
376
|
: Math.floor(value).toString();
|
|
377
377
|
}
|
|
378
|
-
return
|
|
378
|
+
return '';
|
|
379
379
|
};
|
|
380
380
|
return NumberFormat;
|
|
381
381
|
}());
|
|
@@ -2,6 +2,7 @@ import { extend, isNullOrUndefined, isBlazor, getValue } from '../util';
|
|
|
2
2
|
import { ParserBase as parser } from './parser-base';
|
|
3
3
|
import { IntlBase as base } from './intl-base';
|
|
4
4
|
var regExp = RegExp;
|
|
5
|
+
// eslint-disable-next-line
|
|
5
6
|
var parseRegex = new regExp('^([^0-9]*)' + '(([0-9,]*[0-9]+)(\.[0-9]+)?)' + '([Ee][+-]?[0-9]+)?([^0-9]*)$');
|
|
6
7
|
var groupRegex = /,/g;
|
|
7
8
|
var keys = ['minusSign', 'infinity'];
|
package/src/keyboard-model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';
|
|
1
|
+
import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';
|
|
2
2
|
import {KeyboardEventArgs} from "./keyboard";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,24 +7,24 @@ import {KeyboardEventArgs} from "./keyboard";
|
|
|
7
7
|
export interface KeyboardEventsModel {
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Specifies key combination and it respective action name.
|
|
11
|
-
*
|
|
12
|
-
* @default null
|
|
13
|
-
*/
|
|
14
|
-
keyConfigs?: { [key: string]: string };
|
|
10
|
+
* Specifies key combination and it respective action name.
|
|
11
|
+
*
|
|
12
|
+
* @default null
|
|
13
|
+
*/
|
|
14
|
+
keyConfigs?: { [key: string]: string };
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Specifies on which event keyboardEvents class should listen for key press. For ex., `keyup`, `keydown` or `keypress`
|
|
18
|
-
*
|
|
19
|
-
* @default keyup
|
|
20
|
-
*/
|
|
21
|
-
eventName?: string;
|
|
17
|
+
* Specifies on which event keyboardEvents class should listen for key press. For ex., `keyup`, `keydown` or `keypress`
|
|
18
|
+
*
|
|
19
|
+
* @default keyup
|
|
20
|
+
*/
|
|
21
|
+
eventName?: string;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Specifies the listener when keyboard actions is performed.
|
|
25
|
-
*
|
|
26
|
-
* @event keyAction
|
|
27
|
-
*/
|
|
28
|
-
keyAction?: EmitType<KeyboardEventArgs>;
|
|
24
|
+
* Specifies the listener when keyboard actions is performed.
|
|
25
|
+
*
|
|
26
|
+
* @event keyAction
|
|
27
|
+
*/
|
|
28
|
+
keyAction?: EmitType<KeyboardEventArgs>;
|
|
29
29
|
|
|
30
30
|
}
|
package/src/keyboard.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
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;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
20
|
import { Property, NotifyPropertyChanges, Event } from './notify-property-change';
|
|
21
21
|
import { Base } from './base';
|
|
22
22
|
var keyCode = {
|
package/src/module-loader.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ export interface ModuleDeclaration {
|
|
|
10
10
|
* Specifies the member for module declaration.
|
|
11
11
|
*/
|
|
12
12
|
member: string;
|
|
13
|
+
/**
|
|
14
|
+
* Specifies the name for module declaration.
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
13
17
|
/**
|
|
14
18
|
* Specifies whether it is a property or not.
|
|
15
19
|
*/
|
|
@@ -36,6 +40,14 @@ export declare class ModuleLoader {
|
|
|
36
40
|
* @returns {void}
|
|
37
41
|
*/
|
|
38
42
|
clean(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Returns the array of modules that are not loaded in the component library.
|
|
45
|
+
*
|
|
46
|
+
* @param {ModuleDeclaration[]} requiredModules - Array of modules to be required
|
|
47
|
+
* @returns {ModuleDeclaration[]} ?
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
getNonInjectedModules(requiredModules: ModuleDeclaration[]): ModuleDeclaration[];
|
|
39
51
|
/**
|
|
40
52
|
* Removes all unused modules
|
|
41
53
|
*
|
package/src/module-loader.js
CHANGED
|
@@ -59,6 +59,17 @@ var ModuleLoader = /** @class */ (function () {
|
|
|
59
59
|
}
|
|
60
60
|
this.loadedModules = [];
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Returns the array of modules that are not loaded in the component library.
|
|
64
|
+
*
|
|
65
|
+
* @param {ModuleDeclaration[]} requiredModules - Array of modules to be required
|
|
66
|
+
* @returns {ModuleDeclaration[]} ?
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
ModuleLoader.prototype.getNonInjectedModules = function (requiredModules) {
|
|
70
|
+
var _this = this;
|
|
71
|
+
return requiredModules.filter(function (module) { return !_this.isModuleLoaded(module.member); });
|
|
72
|
+
};
|
|
62
73
|
/**
|
|
63
74
|
* Removes all unused modules
|
|
64
75
|
*
|
|
@@ -244,8 +244,9 @@ function complexArrayDefinedCallback(dFunc, curKey, type, prop) {
|
|
|
244
244
|
switch (dFunc) {
|
|
245
245
|
case 'push':
|
|
246
246
|
for (var i = 0; i < newValue.length; i++) {
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
var newValueParse = newValue[parseInt(i.toString(), 10)];
|
|
248
|
+
Array.prototype["" + dFunc].apply(prop, [newValueParse]);
|
|
249
|
+
var model_1 = getArrayModel(keyString + (prop.length - 1), newValueParse, !this.controlParent, dFunc);
|
|
249
250
|
this.serverDataBind(model_1, newValue[parseInt(i.toString(), 10)], false, dFunc);
|
|
250
251
|
}
|
|
251
252
|
break;
|
package/src/observer.js
CHANGED
|
@@ -170,9 +170,11 @@ var Observer = /** @class */ (function () {
|
|
|
170
170
|
* @returns {void} ?
|
|
171
171
|
*/
|
|
172
172
|
Observer.prototype.offIntlEvents = function () {
|
|
173
|
+
// eslint-disable-next-line
|
|
173
174
|
var eventsArr = this.boundedEvents['notifyExternalChange'];
|
|
174
175
|
if (eventsArr) {
|
|
175
176
|
for (var i = 0; i < eventsArr.length; i++) {
|
|
177
|
+
// eslint-disable-next-line
|
|
176
178
|
var curContext = eventsArr["" + i].context;
|
|
177
179
|
if (curContext && curContext.detectFunction && curContext.randomId && !curContext.isRendered) {
|
|
178
180
|
this.off('notifyExternalChange', curContext.detectFunction, curContext.randomId);
|
package/src/sanitize-helper.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* SanitizeHtmlHelper for sanitize the value.
|
|
3
3
|
*/
|
|
4
4
|
import { detach } from './dom';
|
|
5
|
+
import { isNullOrUndefined } from './util';
|
|
5
6
|
var removeTags = [
|
|
6
7
|
'script',
|
|
7
8
|
'style',
|
|
@@ -120,6 +121,9 @@ var SanitizeHtmlHelper = /** @class */ (function () {
|
|
|
120
121
|
};
|
|
121
122
|
};
|
|
122
123
|
SanitizeHtmlHelper.sanitize = function (value) {
|
|
124
|
+
if (isNullOrUndefined(value)) {
|
|
125
|
+
return value;
|
|
126
|
+
}
|
|
123
127
|
var item = this.beforeSanitize();
|
|
124
128
|
var output = this.serializeValue(item, value);
|
|
125
129
|
return output;
|
|
@@ -134,6 +138,7 @@ var SanitizeHtmlHelper = /** @class */ (function () {
|
|
|
134
138
|
this.removeXssAttrs();
|
|
135
139
|
var tempEleValue = this.wrapElement.innerHTML;
|
|
136
140
|
this.removeElement();
|
|
141
|
+
this.wrapElement = null;
|
|
137
142
|
return tempEleValue.replace(/&/g, '&');
|
|
138
143
|
};
|
|
139
144
|
SanitizeHtmlHelper.removeElement = function () {
|
package/src/template-engine.js
CHANGED
package/src/template.js
CHANGED
|
@@ -65,9 +65,10 @@ export function compile(template, helper, ignorePrefix) {
|
|
|
65
65
|
else {
|
|
66
66
|
var argName = 'data';
|
|
67
67
|
var evalExpResult = evalExp(template, argName, helper, ignorePrefix);
|
|
68
|
-
|
|
68
|
+
/* eslint-disable */
|
|
69
69
|
var condtion = "var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-\u25A0\\s]+)['])/g);\n var hrefRegex = (/(?:href)([\\s='\"./]+)([\\w-./?=&\\\\#\"]+)((.)([\\w)(!-;/?-\u25A0\\s]+)['])/g);\n if(str.match(valueRegEx)){\n var check = str.match(valueRegEx);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(valueRegEx)[i].split('value=')[1];\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n str = str.replace(str, str1);\n }\n else if (str.match(/(?:href='')/) === null) {\n if(str.match(hrefRegex)) {\n var check = str.match(hrefRegex);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(hrefRegex)[i].split('href=')[1];\n if (check1) {\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n }\n str = str.replace(str, str1);\n }\n }\n ";
|
|
70
70
|
var fnCode = 'var str=\"' + evalExpResult + '\";' + condtion + ' return str;';
|
|
71
|
+
/* eslint-enable */
|
|
71
72
|
var fn = new Function(argName, fnCode);
|
|
72
73
|
return fn.bind(helper);
|
|
73
74
|
}
|
|
@@ -214,7 +215,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
|
|
|
214
215
|
* @returns {string} ?
|
|
215
216
|
*/
|
|
216
217
|
function addNameSpace(str, addNS, nameSpace, ignoreList, ignorePrefix) {
|
|
217
|
-
return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1 && !ignorePrefix && str !==
|
|
218
|
+
return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1 && !ignorePrefix && str !== 'true' && str !== 'false') ? nameSpace + '.' + str : str);
|
|
218
219
|
}
|
|
219
220
|
/**
|
|
220
221
|
*
|
package/src/touch-model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extend } from './util';
|
|
1
|
+
import { extend } from './util';
|
|
2
2
|
import {TapEventArgs,SwipeEventArgs,ScrollEventArgs} from "./touch";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,9 +7,9 @@ import {TapEventArgs,SwipeEventArgs,ScrollEventArgs} from "./touch";
|
|
|
7
7
|
export interface SwipeSettingsModel {
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Property specifies minimum distance of swipe moved.
|
|
11
|
-
*/
|
|
12
|
-
swipeThresholdDistance?: number;
|
|
10
|
+
* Property specifies minimum distance of swipe moved.
|
|
11
|
+
*/
|
|
12
|
+
swipeThresholdDistance?: number;
|
|
13
13
|
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -19,52 +19,52 @@ export interface SwipeSettingsModel {
|
|
|
19
19
|
export interface TouchModel {
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Specifies the callback function for tap event.
|
|
23
|
-
*
|
|
24
|
-
* @event tap
|
|
25
|
-
*/
|
|
26
|
-
tap?: EmitType<TapEventArgs>;
|
|
22
|
+
* Specifies the callback function for tap event.
|
|
23
|
+
*
|
|
24
|
+
* @event tap
|
|
25
|
+
*/
|
|
26
|
+
tap?: EmitType<TapEventArgs>;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Specifies the callback function for tapHold event.
|
|
30
|
-
*
|
|
31
|
-
* @event tapHold
|
|
32
|
-
*/
|
|
33
|
-
tapHold?: EmitType<TapEventArgs>;
|
|
29
|
+
* Specifies the callback function for tapHold event.
|
|
30
|
+
*
|
|
31
|
+
* @event tapHold
|
|
32
|
+
*/
|
|
33
|
+
tapHold?: EmitType<TapEventArgs>;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* Specifies the callback function for swipe event.
|
|
37
|
-
*
|
|
38
|
-
* @event swipe
|
|
39
|
-
*/
|
|
40
|
-
swipe?: EmitType<SwipeEventArgs>;
|
|
36
|
+
* Specifies the callback function for swipe event.
|
|
37
|
+
*
|
|
38
|
+
* @event swipe
|
|
39
|
+
*/
|
|
40
|
+
swipe?: EmitType<SwipeEventArgs>;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* Specifies the callback function for scroll event.
|
|
44
|
-
*
|
|
45
|
-
* @event scroll
|
|
46
|
-
*/
|
|
47
|
-
scroll?: EmitType<ScrollEventArgs>;
|
|
43
|
+
* Specifies the callback function for scroll event.
|
|
44
|
+
*
|
|
45
|
+
* @event scroll
|
|
46
|
+
*/
|
|
47
|
+
scroll?: EmitType<ScrollEventArgs>;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
* Specifies the time delay for tap.
|
|
51
|
-
*
|
|
52
|
-
* @default 350
|
|
53
|
-
*/
|
|
54
|
-
tapThreshold?: number;
|
|
50
|
+
* Specifies the time delay for tap.
|
|
51
|
+
*
|
|
52
|
+
* @default 350
|
|
53
|
+
*/
|
|
54
|
+
tapThreshold?: number;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
* Specifies the time delay for tap hold.
|
|
58
|
-
*
|
|
59
|
-
* @default 750
|
|
60
|
-
*/
|
|
61
|
-
tapHoldThreshold?: number;
|
|
57
|
+
* Specifies the time delay for tap hold.
|
|
58
|
+
*
|
|
59
|
+
* @default 750
|
|
60
|
+
*/
|
|
61
|
+
tapHoldThreshold?: number;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* Customize the swipe event configuration.
|
|
65
|
-
*
|
|
66
|
-
* @default { swipeThresholdDistance: 50 }
|
|
67
|
-
*/
|
|
68
|
-
swipeSettings?: SwipeSettingsModel;
|
|
64
|
+
* Customize the swipe event configuration.
|
|
65
|
+
*
|
|
66
|
+
* @default { swipeThresholdDistance: 50 }
|
|
67
|
+
*/
|
|
68
|
+
swipeSettings?: SwipeSettingsModel;
|
|
69
69
|
|
|
70
70
|
}
|
package/src/touch.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
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;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
20
|
import { extend } from './util';
|
|
21
21
|
import { Property, Complex, NotifyPropertyChanges, Event } from './notify-property-change';
|
|
22
22
|
import { Browser } from './browser';
|
package/src/validate-lic.d.ts
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare let componentList: string[];
|
|
2
|
-
/**
|
|
3
|
-
* To set license key.
|
|
4
|
-
*
|
|
5
|
-
* @param {string} key - license key
|
|
6
|
-
* @returns {void}
|
|
7
|
-
*/
|
|
8
|
-
export declare function registerLicense(key: string): void;
|
|
9
|
-
export declare const validateLicense: Function;
|
|
10
|
-
export declare const getVersion: Function;
|
|
11
|
-
export declare const createLicenseOverlay: Function;
|