@syncfusion/ej2-base 23.1.40 → 23.2.4
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/CHANGELOG.md +13 -1
- package/{ReadMe.md → README.md} +1 -1
- package/bin/syncfusion-license.js +1 -1
- package/dist/ej2-base.min.js +10 -1
- package/dist/ej2-base.umd.min.js +10 -1
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +29 -47
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +29 -47
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +10 -1
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/package.json +224 -182
- package/src/base.js +2 -1
- package/src/fetch.js +1 -1
- package/src/intl/date-parser.js +1 -0
- package/src/intl/intl-base.js +2 -1
- package/src/observer.d.ts +6 -0
- package/src/observer.js +21 -1
- package/src/sanitize-helper.d.ts +0 -1
- package/src/sanitize-helper.js +1 -42
- package/src/template.js +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* filename: index.d.ts
|
|
3
|
+
* version : 23.2.4
|
|
4
|
+
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
|
+
* Use of this code is subject to the terms of our license.
|
|
6
|
+
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
+
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
+
* applicable laws.
|
|
9
|
+
*/
|
|
1
10
|
import * as _base from '@syncfusion/ej2-base';
|
|
2
11
|
|
|
3
12
|
export declare namespace ej {
|
package/package.json
CHANGED
|
@@ -1,183 +1,225 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
2
|
+
"_from": "@syncfusion/ej2-base@*",
|
|
3
|
+
"_id": "@syncfusion/ej2-base@23.1.41",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha512-vLRfnHiVdeB2NPLY1TFLuE3dqcyHEdHIkehsveZZmdhVCD0HEwrhK0wYzXSFG/KtP3FoM9Xkm/9bhZWx5Emtkw==",
|
|
6
|
+
"_location": "/@syncfusion/ej2-base",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "range",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "@syncfusion/ej2-base@*",
|
|
12
|
+
"name": "@syncfusion/ej2-base",
|
|
13
|
+
"escapedName": "@syncfusion%2fej2-base",
|
|
14
|
+
"scope": "@syncfusion",
|
|
15
|
+
"rawSpec": "*",
|
|
16
|
+
"saveSpec": null,
|
|
17
|
+
"fetchSpec": "*"
|
|
18
|
+
},
|
|
19
|
+
"_requiredBy": [
|
|
20
|
+
"/",
|
|
21
|
+
"/@syncfusion/ej2",
|
|
22
|
+
"/@syncfusion/ej2-angular-barcode-generator",
|
|
23
|
+
"/@syncfusion/ej2-angular-base",
|
|
24
|
+
"/@syncfusion/ej2-angular-buttons",
|
|
25
|
+
"/@syncfusion/ej2-angular-calendars",
|
|
26
|
+
"/@syncfusion/ej2-angular-charts",
|
|
27
|
+
"/@syncfusion/ej2-angular-circulargauge",
|
|
28
|
+
"/@syncfusion/ej2-angular-diagrams",
|
|
29
|
+
"/@syncfusion/ej2-angular-documenteditor",
|
|
30
|
+
"/@syncfusion/ej2-angular-dropdowns",
|
|
31
|
+
"/@syncfusion/ej2-angular-filemanager",
|
|
32
|
+
"/@syncfusion/ej2-angular-gantt",
|
|
33
|
+
"/@syncfusion/ej2-angular-grids",
|
|
34
|
+
"/@syncfusion/ej2-angular-heatmap",
|
|
35
|
+
"/@syncfusion/ej2-angular-image-editor",
|
|
36
|
+
"/@syncfusion/ej2-angular-inplace-editor",
|
|
37
|
+
"/@syncfusion/ej2-angular-inputs",
|
|
38
|
+
"/@syncfusion/ej2-angular-kanban",
|
|
39
|
+
"/@syncfusion/ej2-angular-layouts",
|
|
40
|
+
"/@syncfusion/ej2-angular-lineargauge",
|
|
41
|
+
"/@syncfusion/ej2-angular-lists",
|
|
42
|
+
"/@syncfusion/ej2-angular-maps",
|
|
43
|
+
"/@syncfusion/ej2-angular-navigations",
|
|
44
|
+
"/@syncfusion/ej2-angular-notifications",
|
|
45
|
+
"/@syncfusion/ej2-angular-pdfviewer",
|
|
46
|
+
"/@syncfusion/ej2-angular-pivotview",
|
|
47
|
+
"/@syncfusion/ej2-angular-popups",
|
|
48
|
+
"/@syncfusion/ej2-angular-progressbar",
|
|
49
|
+
"/@syncfusion/ej2-angular-querybuilder",
|
|
50
|
+
"/@syncfusion/ej2-angular-ribbon",
|
|
51
|
+
"/@syncfusion/ej2-angular-richtexteditor",
|
|
52
|
+
"/@syncfusion/ej2-angular-schedule",
|
|
53
|
+
"/@syncfusion/ej2-angular-splitbuttons",
|
|
54
|
+
"/@syncfusion/ej2-angular-spreadsheet",
|
|
55
|
+
"/@syncfusion/ej2-angular-treegrid",
|
|
56
|
+
"/@syncfusion/ej2-angular-treemap",
|
|
57
|
+
"/@syncfusion/ej2-barcode-generator",
|
|
58
|
+
"/@syncfusion/ej2-buttons",
|
|
59
|
+
"/@syncfusion/ej2-calendars",
|
|
60
|
+
"/@syncfusion/ej2-charts",
|
|
61
|
+
"/@syncfusion/ej2-circulargauge",
|
|
62
|
+
"/@syncfusion/ej2-data",
|
|
63
|
+
"/@syncfusion/ej2-diagrams",
|
|
64
|
+
"/@syncfusion/ej2-documenteditor",
|
|
65
|
+
"/@syncfusion/ej2-drawings",
|
|
66
|
+
"/@syncfusion/ej2-dropdowns",
|
|
67
|
+
"/@syncfusion/ej2-excel-export",
|
|
68
|
+
"/@syncfusion/ej2-filemanager",
|
|
69
|
+
"/@syncfusion/ej2-gantt",
|
|
70
|
+
"/@syncfusion/ej2-grids",
|
|
71
|
+
"/@syncfusion/ej2-heatmap",
|
|
72
|
+
"/@syncfusion/ej2-image-editor",
|
|
73
|
+
"/@syncfusion/ej2-inplace-editor",
|
|
74
|
+
"/@syncfusion/ej2-inputs",
|
|
75
|
+
"/@syncfusion/ej2-kanban",
|
|
76
|
+
"/@syncfusion/ej2-layouts",
|
|
77
|
+
"/@syncfusion/ej2-lineargauge",
|
|
78
|
+
"/@syncfusion/ej2-lists",
|
|
79
|
+
"/@syncfusion/ej2-maps",
|
|
80
|
+
"/@syncfusion/ej2-navigations",
|
|
81
|
+
"/@syncfusion/ej2-notifications",
|
|
82
|
+
"/@syncfusion/ej2-pdf",
|
|
83
|
+
"/@syncfusion/ej2-pdfviewer",
|
|
84
|
+
"/@syncfusion/ej2-pivotview",
|
|
85
|
+
"/@syncfusion/ej2-popups",
|
|
86
|
+
"/@syncfusion/ej2-progressbar",
|
|
87
|
+
"/@syncfusion/ej2-querybuilder",
|
|
88
|
+
"/@syncfusion/ej2-react-barcode-generator",
|
|
89
|
+
"/@syncfusion/ej2-react-base",
|
|
90
|
+
"/@syncfusion/ej2-react-buttons",
|
|
91
|
+
"/@syncfusion/ej2-react-calendars",
|
|
92
|
+
"/@syncfusion/ej2-react-charts",
|
|
93
|
+
"/@syncfusion/ej2-react-circulargauge",
|
|
94
|
+
"/@syncfusion/ej2-react-diagrams",
|
|
95
|
+
"/@syncfusion/ej2-react-documenteditor",
|
|
96
|
+
"/@syncfusion/ej2-react-dropdowns",
|
|
97
|
+
"/@syncfusion/ej2-react-filemanager",
|
|
98
|
+
"/@syncfusion/ej2-react-gantt",
|
|
99
|
+
"/@syncfusion/ej2-react-grids",
|
|
100
|
+
"/@syncfusion/ej2-react-heatmap",
|
|
101
|
+
"/@syncfusion/ej2-react-image-editor",
|
|
102
|
+
"/@syncfusion/ej2-react-inplace-editor",
|
|
103
|
+
"/@syncfusion/ej2-react-inputs",
|
|
104
|
+
"/@syncfusion/ej2-react-kanban",
|
|
105
|
+
"/@syncfusion/ej2-react-layouts",
|
|
106
|
+
"/@syncfusion/ej2-react-lineargauge",
|
|
107
|
+
"/@syncfusion/ej2-react-lists",
|
|
108
|
+
"/@syncfusion/ej2-react-maps",
|
|
109
|
+
"/@syncfusion/ej2-react-navigations",
|
|
110
|
+
"/@syncfusion/ej2-react-notifications",
|
|
111
|
+
"/@syncfusion/ej2-react-pdfviewer",
|
|
112
|
+
"/@syncfusion/ej2-react-pivotview",
|
|
113
|
+
"/@syncfusion/ej2-react-popups",
|
|
114
|
+
"/@syncfusion/ej2-react-progressbar",
|
|
115
|
+
"/@syncfusion/ej2-react-querybuilder",
|
|
116
|
+
"/@syncfusion/ej2-react-ribbon",
|
|
117
|
+
"/@syncfusion/ej2-react-richtexteditor",
|
|
118
|
+
"/@syncfusion/ej2-react-schedule",
|
|
119
|
+
"/@syncfusion/ej2-react-splitbuttons",
|
|
120
|
+
"/@syncfusion/ej2-react-spreadsheet",
|
|
121
|
+
"/@syncfusion/ej2-react-treegrid",
|
|
122
|
+
"/@syncfusion/ej2-react-treemap",
|
|
123
|
+
"/@syncfusion/ej2-ribbon",
|
|
124
|
+
"/@syncfusion/ej2-richtexteditor",
|
|
125
|
+
"/@syncfusion/ej2-schedule",
|
|
126
|
+
"/@syncfusion/ej2-splitbuttons",
|
|
127
|
+
"/@syncfusion/ej2-spreadsheet",
|
|
128
|
+
"/@syncfusion/ej2-svg-base",
|
|
129
|
+
"/@syncfusion/ej2-treegrid",
|
|
130
|
+
"/@syncfusion/ej2-treemap",
|
|
131
|
+
"/@syncfusion/ej2-vue-barcode-generator",
|
|
132
|
+
"/@syncfusion/ej2-vue-base",
|
|
133
|
+
"/@syncfusion/ej2-vue-buttons",
|
|
134
|
+
"/@syncfusion/ej2-vue-calendars",
|
|
135
|
+
"/@syncfusion/ej2-vue-charts",
|
|
136
|
+
"/@syncfusion/ej2-vue-circulargauge",
|
|
137
|
+
"/@syncfusion/ej2-vue-diagrams",
|
|
138
|
+
"/@syncfusion/ej2-vue-documenteditor",
|
|
139
|
+
"/@syncfusion/ej2-vue-dropdowns",
|
|
140
|
+
"/@syncfusion/ej2-vue-filemanager",
|
|
141
|
+
"/@syncfusion/ej2-vue-gantt",
|
|
142
|
+
"/@syncfusion/ej2-vue-grids",
|
|
143
|
+
"/@syncfusion/ej2-vue-heatmap",
|
|
144
|
+
"/@syncfusion/ej2-vue-image-editor",
|
|
145
|
+
"/@syncfusion/ej2-vue-inplace-editor",
|
|
146
|
+
"/@syncfusion/ej2-vue-inputs",
|
|
147
|
+
"/@syncfusion/ej2-vue-kanban",
|
|
148
|
+
"/@syncfusion/ej2-vue-layouts",
|
|
149
|
+
"/@syncfusion/ej2-vue-lineargauge",
|
|
150
|
+
"/@syncfusion/ej2-vue-lists",
|
|
151
|
+
"/@syncfusion/ej2-vue-maps",
|
|
152
|
+
"/@syncfusion/ej2-vue-navigations",
|
|
153
|
+
"/@syncfusion/ej2-vue-notifications",
|
|
154
|
+
"/@syncfusion/ej2-vue-pdfviewer",
|
|
155
|
+
"/@syncfusion/ej2-vue-pivotview",
|
|
156
|
+
"/@syncfusion/ej2-vue-popups",
|
|
157
|
+
"/@syncfusion/ej2-vue-progressbar",
|
|
158
|
+
"/@syncfusion/ej2-vue-querybuilder",
|
|
159
|
+
"/@syncfusion/ej2-vue-ribbon",
|
|
160
|
+
"/@syncfusion/ej2-vue-richtexteditor",
|
|
161
|
+
"/@syncfusion/ej2-vue-schedule",
|
|
162
|
+
"/@syncfusion/ej2-vue-splitbuttons",
|
|
163
|
+
"/@syncfusion/ej2-vue-spreadsheet",
|
|
164
|
+
"/@syncfusion/ej2-vue-treegrid",
|
|
165
|
+
"/@syncfusion/ej2-vue-treemap"
|
|
166
|
+
],
|
|
167
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-base/-/ej2-base-23.1.41.tgz",
|
|
168
|
+
"_shasum": "3051b44cd378a829734a06f78f46ceea25160ecc",
|
|
169
|
+
"_spec": "@syncfusion/ej2-base@*",
|
|
170
|
+
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
171
|
+
"author": {
|
|
172
|
+
"name": "Syncfusion Inc."
|
|
173
|
+
},
|
|
174
|
+
"bin": {
|
|
175
|
+
"syncfusion-license": "bin/syncfusion-license.js"
|
|
176
|
+
},
|
|
177
|
+
"bugs": {
|
|
178
|
+
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/issues"
|
|
179
|
+
},
|
|
180
|
+
"bundleDependencies": false,
|
|
181
|
+
"dependencies": {
|
|
182
|
+
"@syncfusion/ej2-icons": "~23.2.4"
|
|
183
|
+
},
|
|
184
|
+
"deprecated": false,
|
|
185
|
+
"description": "A common package of Essential JS 2 base libraries, methods and class definitions",
|
|
186
|
+
"devDependencies": {},
|
|
187
|
+
"es2015": "./dist/es6/ej2-base.es5.js",
|
|
188
|
+
"homepage": "https://www.syncfusion.com/javascript-ui-controls",
|
|
189
|
+
"keywords": [
|
|
190
|
+
"ej2",
|
|
191
|
+
"syncfusion",
|
|
192
|
+
"ej2-base",
|
|
193
|
+
"web-components",
|
|
194
|
+
"typescript",
|
|
195
|
+
"base",
|
|
196
|
+
"common",
|
|
197
|
+
"core",
|
|
198
|
+
"library",
|
|
199
|
+
"ajax",
|
|
200
|
+
"animation",
|
|
201
|
+
"internationalization",
|
|
202
|
+
"drag",
|
|
203
|
+
"drop",
|
|
204
|
+
"drag-drop",
|
|
205
|
+
"template",
|
|
206
|
+
"template-engine",
|
|
207
|
+
"rtl",
|
|
208
|
+
"right-to-left",
|
|
209
|
+
"persistence",
|
|
210
|
+
"state-persistence",
|
|
211
|
+
"theme",
|
|
212
|
+
"styles"
|
|
213
|
+
],
|
|
214
|
+
"license": "SEE LICENSE IN license",
|
|
215
|
+
"main": "./dist/ej2-base.umd.min.js",
|
|
216
|
+
"module": "./index.js",
|
|
217
|
+
"name": "@syncfusion/ej2-base",
|
|
218
|
+
"repository": {
|
|
219
|
+
"type": "git",
|
|
220
|
+
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
221
|
+
},
|
|
222
|
+
"typings": "index.d.ts",
|
|
223
|
+
"version": "23.2.4",
|
|
224
|
+
"sideEffects": true
|
|
225
|
+
}
|
package/src/base.js
CHANGED
|
@@ -257,7 +257,8 @@ var Base = /** @class */ (function () {
|
|
|
257
257
|
var _this = this;
|
|
258
258
|
// eslint-disable-next-line
|
|
259
259
|
this.element.ej2_instances =
|
|
260
|
-
this.element.ej2_instances.filter(function (i) { return i !== _this; })
|
|
260
|
+
this.element.ej2_instances ? this.element.ej2_instances.filter(function (i) { return i !== _this; })
|
|
261
|
+
: [];
|
|
261
262
|
removeClass([this.element], ['e-' + this.getModuleName()]);
|
|
262
263
|
if (this.element.ej2_instances.length === 0) {
|
|
263
264
|
// Remove module class from the root element
|
package/src/fetch.js
CHANGED
|
@@ -78,7 +78,7 @@ var Fetch = /** @class */ (function () {
|
|
|
78
78
|
return this.fetchResponse.then(function (response) {
|
|
79
79
|
_this.triggerEvent(_this['onLoad'], response);
|
|
80
80
|
if (!response.ok) {
|
|
81
|
-
throw
|
|
81
|
+
throw response;
|
|
82
82
|
}
|
|
83
83
|
var responseType = 'text';
|
|
84
84
|
for (var _i = 0, _a = Object.keys(contentTypes); _i < _a.length; _i++) {
|
package/src/intl/date-parser.js
CHANGED
|
@@ -341,6 +341,7 @@ var DateParser = /** @class */ (function () {
|
|
|
341
341
|
// eslint-disable-next-line
|
|
342
342
|
matchString = ((prop === 'month') && (!parseOptions.isIslamic) && (parseOptions.culture === 'en' || parseOptions.culture === 'en-GB' || parseOptions.culture === 'en-US'))
|
|
343
343
|
? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
|
|
344
|
+
matchString = ((prop !== 'month') && (prop === 'designator') && parseOptions.culture === 'en-GB') ? matchString.toLowerCase() : matchString;
|
|
344
345
|
// eslint-disable-next-line
|
|
345
346
|
retOptions[prop] = parseOptions[prop][matchString];
|
|
346
347
|
}
|
package/src/intl/intl-base.js
CHANGED
|
@@ -825,7 +825,8 @@ export var IntlBase;
|
|
|
825
825
|
*/
|
|
826
826
|
function changeCurrencySymbol(val, sym) {
|
|
827
827
|
if (val) {
|
|
828
|
-
|
|
828
|
+
val = val.replace(IntlBase.defaultCurrency, sym);
|
|
829
|
+
return (sym === '') ? val.trim() : val;
|
|
829
830
|
}
|
|
830
831
|
return '';
|
|
831
832
|
}
|
package/src/observer.d.ts
CHANGED
package/src/observer.js
CHANGED
|
@@ -23,7 +23,7 @@ var Observer = /** @class */ (function () {
|
|
|
23
23
|
}
|
|
24
24
|
var cntxt = context || this.context;
|
|
25
25
|
if (this.notExist(property)) {
|
|
26
|
-
this.boundedEvents["" + property] = [{ handler: handler, context: cntxt }];
|
|
26
|
+
this.boundedEvents["" + property] = [{ handler: handler, context: cntxt, id: id }];
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
if (!isNullOrUndefined(id)) {
|
|
@@ -164,6 +164,26 @@ var Observer = /** @class */ (function () {
|
|
|
164
164
|
Observer.prototype.destroy = function () {
|
|
165
165
|
this.boundedEvents = this.context = undefined;
|
|
166
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* To remove internationalization events
|
|
169
|
+
*
|
|
170
|
+
* @returns {void} ?
|
|
171
|
+
*/
|
|
172
|
+
Observer.prototype.offIntlEvents = function () {
|
|
173
|
+
var eventsArr = this.boundedEvents['notifyExternalChange'];
|
|
174
|
+
if (eventsArr) {
|
|
175
|
+
for (var i = 0; i < eventsArr.length; i++) {
|
|
176
|
+
var curContext = eventsArr[0].context;
|
|
177
|
+
if (curContext && curContext.detectFunction && curContext.randomId && !curContext.isRendered) {
|
|
178
|
+
this.off('notifyExternalChange', curContext.detectFunction, curContext.randomId);
|
|
179
|
+
i--;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (!this.boundedEvents['notifyExternalChange'].length) {
|
|
183
|
+
delete this.boundedEvents['notifyExternalChange'];
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
};
|
|
167
187
|
/**
|
|
168
188
|
* Returns if the property exists.
|
|
169
189
|
*
|
package/src/sanitize-helper.d.ts
CHANGED
|
@@ -31,7 +31,6 @@ export declare class SanitizeHtmlHelper {
|
|
|
31
31
|
static beforeSanitize(): BeforeSanitizeHtml;
|
|
32
32
|
static sanitize(value: string): string;
|
|
33
33
|
static serializeValue(item: BeforeSanitizeHtml, value: string): string;
|
|
34
|
-
private static sanitizeQuotes;
|
|
35
34
|
private static removeElement;
|
|
36
35
|
private static removeXssTags;
|
|
37
36
|
private static removeJsEvents;
|
package/src/sanitize-helper.js
CHANGED
|
@@ -128,7 +128,7 @@ var SanitizeHtmlHelper = /** @class */ (function () {
|
|
|
128
128
|
this.removeAttrs = item.selectors.attributes;
|
|
129
129
|
this.removeTags = item.selectors.tags;
|
|
130
130
|
this.wrapElement = document.createElement('div');
|
|
131
|
-
this.wrapElement.innerHTML =
|
|
131
|
+
this.wrapElement.innerHTML = value;
|
|
132
132
|
this.removeXssTags();
|
|
133
133
|
this.removeJsEvents();
|
|
134
134
|
this.removeXssAttrs();
|
|
@@ -136,47 +136,6 @@ var SanitizeHtmlHelper = /** @class */ (function () {
|
|
|
136
136
|
this.removeElement();
|
|
137
137
|
return tempEleValue.replace(/&/g, '&');
|
|
138
138
|
};
|
|
139
|
-
SanitizeHtmlHelper.sanitizeQuotes = function (input) {
|
|
140
|
-
var sanityChars = [96, 39, 34];
|
|
141
|
-
var escape = 92;
|
|
142
|
-
var sanitizedValue = '';
|
|
143
|
-
var quoteCounts = {
|
|
144
|
-
96: 0,
|
|
145
|
-
39: 0,
|
|
146
|
-
34: 0
|
|
147
|
-
};
|
|
148
|
-
var isPreviousCharBackslash = false;
|
|
149
|
-
for (var i = 0; i < input.length; i++) {
|
|
150
|
-
var currentChar = input.charCodeAt(i);
|
|
151
|
-
if (sanityChars.indexOf(currentChar) !== -1 && !isPreviousCharBackslash) {
|
|
152
|
-
quoteCounts[currentChar + '']++;
|
|
153
|
-
}
|
|
154
|
-
isPreviousCharBackslash = currentChar === escape;
|
|
155
|
-
}
|
|
156
|
-
try {
|
|
157
|
-
// Replace the quotes which has total count is in odd number
|
|
158
|
-
// Previous char is not backslash, open parenthesis and
|
|
159
|
-
// Next is not close parenthesis
|
|
160
|
-
for (var i = 0; i < input.length; i++) {
|
|
161
|
-
var currentChar = input.charCodeAt(i);
|
|
162
|
-
var previousChar = i > 0 ? input.charCodeAt(i - 1) : null;
|
|
163
|
-
var nextChar = i < input.length - 1 ? input.charCodeAt(i + 1) : null;
|
|
164
|
-
if (sanityChars.indexOf(currentChar) !== -1 && previousChar !== escape) {
|
|
165
|
-
if (quoteCounts[currentChar + ''] % 2 === 1 && previousChar !== 40 && nextChar !== 41) {
|
|
166
|
-
sanitizedValue += String.fromCharCode(escape);
|
|
167
|
-
}
|
|
168
|
-
sanitizedValue += input[i + ''];
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
sanitizedValue += input[i + ''];
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return sanitizedValue;
|
|
175
|
-
}
|
|
176
|
-
catch (error) {
|
|
177
|
-
return input;
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
139
|
SanitizeHtmlHelper.removeElement = function () {
|
|
181
140
|
// Removes an element's attibute to avoid html tag validation
|
|
182
141
|
var nodes = this.wrapElement.children;
|
package/src/template.js
CHANGED
|
@@ -181,7 +181,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
|
|
|
181
181
|
}
|
|
182
182
|
else {
|
|
183
183
|
// evaluate normal expression
|
|
184
|
-
cnt = cnt !== '' ? '"+' + addNameSpace(cnt.replace(/,/gi, '+' + nameSpace + '.'), (localKeys.indexOf(cnt) === -1), nameSpace, localKeys, ignorePrefix) + '+"' : '
|
|
184
|
+
cnt = cnt !== '' ? '"+' + addNameSpace(cnt.replace(/,/gi, '+' + nameSpace + '.'), (localKeys.indexOf(cnt) === -1), nameSpace, localKeys, ignorePrefix) + '+"' : '${}';
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
return cnt;
|