@syncfusion/ej2-base 24.2.7 → 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.
Files changed (163) hide show
  1. package/.eslintrc.json +2 -1
  2. package/CHANGELOG.md +641 -677
  3. package/{README.md → ReadMe.md} +100 -100
  4. package/dist/ej2-base.umd.min.js +1 -10
  5. package/dist/ej2-base.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-base.es2015.js +178 -1025
  7. package/dist/es6/ej2-base.es2015.js.map +1 -1
  8. package/dist/es6/ej2-base.es5.js +226 -934
  9. package/dist/es6/ej2-base.es5.js.map +1 -1
  10. package/dist/global/ej2-base.min.js +1 -10
  11. package/dist/global/ej2-base.min.js.map +1 -1
  12. package/dist/global/index.d.ts +0 -9
  13. package/dist/ts/ajax.ts +236 -0
  14. package/dist/ts/animation.ts +544 -0
  15. package/dist/ts/base.ts +357 -0
  16. package/dist/ts/browser.ts +387 -0
  17. package/dist/ts/child-property.ts +192 -0
  18. package/dist/ts/component.ts +519 -0
  19. package/dist/ts/dom.ts +488 -0
  20. package/dist/ts/draggable.ts +1155 -0
  21. package/dist/ts/droppable.ts +172 -0
  22. package/dist/ts/event-handler.ts +169 -0
  23. package/dist/ts/internationalization.ts +369 -0
  24. package/dist/ts/intl/date-formatter.ts +317 -0
  25. package/dist/ts/intl/date-parser.ts +426 -0
  26. package/dist/ts/intl/intl-base.ts +1104 -0
  27. package/dist/ts/intl/number-formatter.ts +411 -0
  28. package/dist/ts/intl/number-parser.ts +158 -0
  29. package/dist/ts/intl/parser-base.ts +394 -0
  30. package/dist/ts/keyboard.ts +238 -0
  31. package/dist/ts/l10n.ts +94 -0
  32. package/dist/ts/module-loader.ts +149 -0
  33. package/dist/ts/notify-property-change.ts +726 -0
  34. package/dist/ts/observer.ts +236 -0
  35. package/dist/ts/sanitize-helper.ts +224 -0
  36. package/dist/ts/template-engine.ts +191 -0
  37. package/dist/ts/template.ts +329 -0
  38. package/dist/ts/touch.ts +544 -0
  39. package/dist/ts/util.ts +523 -0
  40. package/dist/ts/validate-lic.ts +0 -0
  41. package/e2e/crypto.js +16 -16
  42. package/e2e/m.protractor.config.js +286 -286
  43. package/e2e/modified-protractor/protractor.config.js +316 -316
  44. package/e2e/protractor.config.js +389 -332
  45. package/helpers/e2e/index.js +3 -3
  46. package/license +10 -10
  47. package/package.json +225 -174
  48. package/src/ajax.d.ts +1 -1
  49. package/src/ajax.js +3 -8
  50. package/src/animation-model.d.ts +41 -41
  51. package/src/animation.d.ts +6 -6
  52. package/src/animation.js +25 -25
  53. package/src/base.d.ts +2 -1
  54. package/src/base.js +9 -7
  55. package/src/component-model.d.ts +16 -16
  56. package/src/component.d.ts +9 -3
  57. package/src/component.js +50 -38
  58. package/src/draggable-model.d.ts +113 -113
  59. package/src/draggable.d.ts +2 -0
  60. package/src/draggable.js +45 -29
  61. package/src/droppable-model.d.ts +23 -23
  62. package/src/droppable.js +19 -19
  63. package/src/event-handler.js +2 -1
  64. package/src/index.d.ts +0 -3
  65. package/src/index.js +0 -3
  66. package/src/intl/date-formatter.js +2 -6
  67. package/src/intl/date-parser.js +1 -20
  68. package/src/intl/intl-base.js +1 -164
  69. package/src/intl/number-formatter.d.ts +3 -0
  70. package/src/intl/number-formatter.js +7 -7
  71. package/src/intl/number-parser.js +1 -0
  72. package/src/keyboard-model.d.ts +16 -16
  73. package/src/keyboard.js +19 -19
  74. package/src/module-loader.d.ts +12 -0
  75. package/src/module-loader.js +11 -0
  76. package/src/notify-property-change.js +3 -2
  77. package/src/observer.js +2 -0
  78. package/src/sanitize-helper.js +5 -0
  79. package/src/template-engine.js +1 -0
  80. package/src/template.js +3 -2
  81. package/src/touch-model.d.ts +39 -39
  82. package/src/touch.js +19 -19
  83. package/src/validate-lic.d.ts +0 -11
  84. package/src/validate-lic.js +1 -259
  85. package/styles/_all.scss +2 -2
  86. package/styles/_bds-dark-definition.scss +15 -0
  87. package/styles/_bds-definition.scss +15 -0
  88. package/styles/_bootstrap-dark-definition.scss +42 -42
  89. package/styles/_bootstrap-definition.scss +42 -42
  90. package/styles/_bootstrap4-definition.scss +11 -11
  91. package/styles/_bootstrap5-dark-definition.scss +9 -9
  92. package/styles/_bootstrap5-definition.scss +8 -8
  93. package/styles/_fabric-dark-definition.scss +42 -42
  94. package/styles/_fabric-definition.scss +42 -42
  95. package/styles/_fluent-dark-definition.scss +9 -9
  96. package/styles/_fluent-definition.scss +9 -9
  97. package/styles/_fluent2-definition.scss +9 -0
  98. package/styles/_fusionnew-dark-definition.scss +8 -8
  99. package/styles/_fusionnew-definition.scss +8 -8
  100. package/styles/_highcontrast-definition.scss +42 -42
  101. package/styles/_highcontrast-light-definition.scss +42 -42
  102. package/styles/_material-dark-definition.scss +48 -48
  103. package/styles/_material-definition.scss +49 -49
  104. package/styles/_material3-dark-definition.scss +14 -14
  105. package/styles/_material3-definition.scss +15 -15
  106. package/styles/_tailwind-dark-definition.scss +15 -15
  107. package/styles/_tailwind-definition.scss +15 -15
  108. package/styles/animation/_all.scss +560 -560
  109. package/styles/bootstrap-dark.css +10 -1
  110. package/styles/bootstrap.css +10 -1
  111. package/styles/bootstrap4.css +10 -1
  112. package/styles/bootstrap5-dark.css +10 -1
  113. package/styles/bootstrap5.css +10 -1
  114. package/styles/common/_all.scss +2 -2
  115. package/styles/common/_core.scss +117 -117
  116. package/styles/common/_mixin.scss +9 -9
  117. package/styles/definition/_bds-dark.scss +1179 -0
  118. package/styles/definition/_bds.scss +1474 -0
  119. package/styles/definition/_bootstrap-dark.scss +219 -219
  120. package/styles/definition/_bootstrap.scss +215 -215
  121. package/styles/definition/_bootstrap4.scss +167 -167
  122. package/styles/definition/_bootstrap5-dark.scss +493 -493
  123. package/styles/definition/_bootstrap5.scss +494 -494
  124. package/styles/definition/_fabric-dark.scss +200 -200
  125. package/styles/definition/_fabric.scss +198 -198
  126. package/styles/definition/_fluent-dark.scss +557 -557
  127. package/styles/definition/_fluent.scss +558 -558
  128. package/styles/definition/_fluent2.scss +2198 -0
  129. package/styles/definition/_fusionnew-dark.scss +362 -362
  130. package/styles/definition/_fusionnew.scss +363 -363
  131. package/styles/definition/_highcontrast-light.scss +193 -193
  132. package/styles/definition/_highcontrast.scss +195 -195
  133. package/styles/definition/_material-dark.scss +198 -198
  134. package/styles/definition/_material.scss +192 -192
  135. package/styles/definition/_material3-dark.scss +710 -710
  136. package/styles/definition/_material3.scss +792 -792
  137. package/styles/definition/_tailwind-dark.scss +488 -488
  138. package/styles/definition/_tailwind.scss +485 -485
  139. package/styles/fabric-dark.css +10 -1
  140. package/styles/fabric.css +10 -1
  141. package/styles/fluent-dark.css +10 -1
  142. package/styles/fluent.css +10 -1
  143. package/styles/highcontrast-light.css +10 -1
  144. package/styles/highcontrast.css +10 -1
  145. package/styles/material-dark.css +10 -1
  146. package/styles/material.css +10 -1
  147. package/styles/material3-dark.css +10 -1
  148. package/styles/material3.css +10 -1
  149. package/styles/offline-theme/material-dark.css +10 -1
  150. package/styles/offline-theme/material.css +10 -1
  151. package/styles/offline-theme/tailwind-dark.css +10 -1
  152. package/styles/offline-theme/tailwind.css +10 -1
  153. package/styles/tailwind-dark.css +10 -1
  154. package/styles/tailwind.css +10 -1
  155. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -60
  156. package/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -42
  157. package/bin/syncfusion-license.js +0 -2
  158. package/dist/ej2-base.min.js +0 -10
  159. package/e2e/index.d.ts +0 -27
  160. package/src/fetch.d.ts +0 -114
  161. package/src/fetch.js +0 -116
  162. package/src/hijri-parser.d.ts +0 -19
  163. package/src/hijri-parser.js +0 -204
@@ -0,0 +1,329 @@
1
+ /**
2
+ * Template Engine
3
+ */
4
+
5
+ const LINES: RegExp = new RegExp('\\n|\\r|\\s\\s+', 'g');
6
+ const QUOTES: RegExp = new RegExp(/'|"/g);
7
+ const IF_STMT: RegExp = new RegExp('if ?\\(');
8
+ const ELSEIF_STMT: RegExp = new RegExp('else if ?\\(');
9
+ const ELSE_STMT: RegExp = new RegExp('else');
10
+ const FOR_STMT: RegExp = new RegExp('for ?\\(');
11
+ const IF_OR_FOR: RegExp = new RegExp('(/if|/for)');
12
+ const CALL_FUNCTION: RegExp = new RegExp('\\((.*)\\)', '');
13
+ const NOT_NUMBER: RegExp = new RegExp('^[0-9]+$', 'g');
14
+ const WORD: RegExp = new RegExp('[\\w"\'.\\s+]+', 'g');
15
+ const DBL_QUOTED_STR: RegExp = new RegExp('"(.*?)"', 'g');
16
+ const WORDIF: RegExp = new RegExp('[\\w"\'@#$.\\s-+]+', 'g');
17
+ let exp: RegExp = new RegExp('\\${([^}]*)}', 'g');
18
+ // let cachedTemplate: Object = {};
19
+ const ARR_OBJ: RegExp = /^\..*/gm;
20
+ const SINGLE_SLASH: RegExp = /\\/gi;
21
+ const DOUBLE_SLASH: RegExp = /\\\\/gi;
22
+ const WORDFUNC: RegExp = new RegExp('[\\w"\'@#$.\\s+]+', 'g');
23
+ const WINDOWFUNC: RegExp = /\window\./gm;
24
+
25
+ /**
26
+ * The function to set regular expression for template expression string.
27
+ *
28
+ * @param {RegExp} value - Value expression.
29
+ * @returns {RegExp} ?
30
+ * @private
31
+ */
32
+ export function expression(value?: RegExp): RegExp {
33
+ if (value) { exp = value; }
34
+ return exp;
35
+ }
36
+
37
+
38
+ // /**
39
+ // * To render the template string from the given data.
40
+ // * @param {string} template - String Template.
41
+ // * @param {Object[]|JSON} data - DataSource for the template.
42
+ // * @param {Object} helper? - custom helper object.
43
+ // */
44
+ // export function template(template: string, data: JSON, helper?: Object): string {
45
+ // let hash: string = hashCode(template);
46
+ // let tmpl: Function;
47
+ // if (!cachedTemplate[hash]) {
48
+ // tmpl = cachedTemplate[hash] = compile(template, helper);
49
+ // } else {
50
+ // tmpl = cachedTemplate[hash];
51
+ // }
52
+ // return tmpl(data);
53
+ // }
54
+
55
+ /**
56
+ * Compile the template string into template function.
57
+ *
58
+ * @param {string | Function} template - The template string which is going to convert.
59
+ * @param {Object} helper - Helper functions as an object.
60
+ * @param {boolean} ignorePrefix ?
61
+ * @returns {string} ?
62
+ * @private
63
+ */
64
+ export function compile(template: string | Function, helper?: Object, ignorePrefix?: boolean): () => string {
65
+ if (typeof template === 'function') {
66
+ return template as () => string;
67
+ } else {
68
+ const argName: string = 'data';
69
+ const evalExpResult: string = evalExp(template, argName, helper, ignorePrefix);
70
+ /* eslint-disable */
71
+ const condtion = `var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);
72
+ var hrefRegex = (/(?:href)([\\s='"./]+)([\\w-./?=&\\\\#"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);
73
+ if(str.match(valueRegEx)){
74
+ var check = str.match(valueRegEx);
75
+ var str1 = str;
76
+ for (var i=0; i < check.length; i++) {
77
+ var check1 = str.match(valueRegEx)[i].split('value=')[1];
78
+ var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
79
+ change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
80
+ str1 = str1.replace(check1, change);
81
+ }
82
+ str = str.replace(str, str1);
83
+ }
84
+ else if (str.match(/(?:href='')/) === null) {
85
+ if(str.match(hrefRegex)) {
86
+ var check = str.match(hrefRegex);
87
+ var str1 = str;
88
+ for (var i=0; i < check.length; i++) {
89
+ var check1 = str.match(hrefRegex)[i].split('href=')[1];
90
+ if (check1) {
91
+ var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
92
+ change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
93
+ str1 = str1.replace(check1, change);
94
+ }
95
+ }
96
+ str = str.replace(str, str1);
97
+ }
98
+ }
99
+ `;
100
+ const fnCode: string = 'var str=\"' + evalExpResult + '\";' + condtion + ' return str;';
101
+ /* eslint-enable */
102
+ const fn: Function = new Function(argName, fnCode);
103
+ return fn.bind(helper);
104
+ }
105
+ }
106
+
107
+ /** function used to evaluate the function expression
108
+ *
109
+ * @param {string} str ?
110
+ * @param {string} nameSpace ?
111
+ * @param {Object} helper ?
112
+ * @param {boolean} ignorePrefix ?
113
+ * @returns {string} ?
114
+ */
115
+ function evalExp(str: string, nameSpace: string, helper?: Object, ignorePrefix?: boolean): string {
116
+ let varCOunt: number = 0;
117
+ /**
118
+ * Variable containing Local Keys
119
+ */
120
+ const localKeys: string[] = [];
121
+ const isClass: string[] = str.match(/class="([^"]+|)\s{2}/g);
122
+ let singleSpace: string = '';
123
+ if (isClass) {
124
+ isClass.forEach((value: string) => {
125
+ singleSpace = value.replace(/\s\s+/g, ' ');
126
+ str = str.replace(value, singleSpace);
127
+ });
128
+ }
129
+ if (exp.test(str)) {
130
+ let insideBraces: boolean = false;
131
+ let outputString: string = '';
132
+ for (let i: number = 0; i < str.length; i++) {
133
+ if (str[i + ''] === '$' && str[i + 1] === '{') {
134
+ insideBraces = true;
135
+ } else if (str[i + ''] === '}') {
136
+ insideBraces = false;
137
+ }
138
+ outputString += (str[i + ''] === '"' && !insideBraces) ? '\\"' : str[i + ''];
139
+ }
140
+ str = outputString;
141
+ } else {
142
+ str = str.replace(/\\?"/g, '\\"');
143
+ }
144
+ return str.replace(LINES, '').replace(DBL_QUOTED_STR, '\'$1\'').replace(
145
+
146
+ exp,
147
+ // eslint-disable-next-line
148
+ (match: string, cnt: string, offset: number, matchStr: string): string => {
149
+
150
+ const SPECIAL_CHAR: RegExp = /@|#|\$/gm;
151
+ const matches: string[] = cnt.match(CALL_FUNCTION);
152
+
153
+ // matches to detect any function calls
154
+ if (matches) {
155
+ const rlStr: string = matches[1];
156
+ if (ELSEIF_STMT.test(cnt)) {
157
+ //handling else-if condition
158
+ cnt = '";} ' + cnt.replace(matches[1], rlStr.replace(WORD, (str: string): string => {
159
+ str = str.trim();
160
+ return addNameSpace(str, !(QUOTES.test(str)) && (localKeys.indexOf(str) === -1),
161
+ nameSpace, localKeys, ignorePrefix);
162
+ })) + '{ \n str = str + "';
163
+ } else if (IF_STMT.test(cnt)) {
164
+ //handling if condition
165
+ cnt = '"; ' + cnt.replace(matches[1], rlStr.replace(WORDIF, (strs: string): string => {
166
+ return HandleSpecialCharArrObj(strs, nameSpace, localKeys, ignorePrefix);
167
+ })) + '{ \n str = str + "';
168
+ } else if (FOR_STMT.test(cnt)) {
169
+
170
+ //handling for condition
171
+ const rlStr: string[] = matches[1].split(' of ');
172
+
173
+ // replace for each into actual JavaScript
174
+ // eslint-disable-next-line
175
+ cnt = '"; ' + cnt.replace(matches[1], (mtc: string): string => {
176
+ localKeys.push(rlStr[0]);
177
+ localKeys.push(rlStr[0] + 'Index');
178
+ varCOunt = varCOunt + 1;
179
+ // tslint:disable-next-line
180
+ return 'var i' + varCOunt + '=0; i' + varCOunt + ' < ' + addNameSpace(rlStr[1], true, nameSpace, localKeys, ignorePrefix) + '.length; i' + varCOunt + '++';
181
+ }) + '{ \n ' + rlStr[0] + '= ' + addNameSpace(rlStr[1], true, nameSpace, localKeys, ignorePrefix)
182
+ + '[i' + varCOunt + ']; \n var ' + rlStr[0] + 'Index=i' + varCOunt + '; \n str = str + "';
183
+
184
+ } else {
185
+ //helper function handling
186
+ const fnStr: string[] = cnt.split('(');
187
+ // eslint-disable-next-line
188
+ let fNameSpace: string = (helper && helper.hasOwnProperty(fnStr[0]) ? 'this.' : 'global');
189
+ fNameSpace = (/\./.test(fnStr[0]) ? '' : fNameSpace);
190
+ const ftArray: string[] = matches[1].split(',');
191
+ if (matches[1].length !== 0 && !(/data/).test(ftArray[0]) && !(/window./).test(ftArray[0])) {
192
+ matches[1] = (fNameSpace === 'global' ? nameSpace + '.' + matches[1] : matches[1]);
193
+ }
194
+ const splRegexp: RegExp = /@|\$|#/gm;
195
+ const arrObj: RegExp = /\]\./gm;
196
+ if (WINDOWFUNC.test(cnt) && arrObj.test(cnt) || splRegexp.test(cnt)) {
197
+ const splArrRegexp: RegExp = /@|\$|#|\]\./gm;
198
+ if (splArrRegexp.test(cnt)) {
199
+ // tslint:disable-next-line
200
+ cnt = '"+ ' + (fNameSpace === 'global' ? '' : fNameSpace) + cnt.replace(matches[1], rlStr.replace(WORDFUNC, (strs: string): string => {
201
+ return HandleSpecialCharArrObj(strs, nameSpace, localKeys, ignorePrefix);
202
+ })) + '+ "';
203
+ }
204
+ } else {
205
+ cnt = '" + ' + (fNameSpace === 'global' ? '' : fNameSpace) +
206
+ cnt.replace(
207
+ rlStr,
208
+ addNameSpace(
209
+ matches[1].replace(/,( |)data.|,/gi, ',' + nameSpace + '.').replace(/,( |)data.window/gi, ',window'),
210
+ (fNameSpace === 'global' ? false : true),
211
+ nameSpace,
212
+ localKeys,
213
+ ignorePrefix
214
+ )
215
+ ) +
216
+ '+"';
217
+ }
218
+ }
219
+ } else if (ELSE_STMT.test(cnt)) {
220
+ // handling else condition
221
+ cnt = '"; ' + cnt.replace(ELSE_STMT, '} else { \n str = str + "');
222
+ // eslint-disable-next-line
223
+ } else if (!!cnt.match(IF_OR_FOR)) {
224
+ // close condition
225
+ cnt = cnt.replace(IF_OR_FOR, '"; \n } \n str = str + "');
226
+ } else if (SPECIAL_CHAR.test(cnt)) {
227
+ // template string with double slash with special character
228
+ if (cnt.match(SINGLE_SLASH)) {
229
+ cnt = SlashReplace(cnt);
230
+ }
231
+ cnt = '"+' + NameSpaceForspecialChar(cnt, (localKeys.indexOf(cnt) === -1), nameSpace, localKeys) + '"]+"';
232
+ } else {
233
+ // template string with double slash
234
+ if (cnt.match(SINGLE_SLASH)) {
235
+ cnt = SlashReplace(cnt);
236
+ cnt = '"+' + NameSpaceForspecialChar(cnt, (localKeys.indexOf(cnt) === -1), nameSpace, localKeys) + '"]+"';
237
+ } else {
238
+ // evaluate normal expression
239
+ cnt = cnt !== '' ? '"+' + addNameSpace(
240
+ cnt.replace(/,/gi, '+' + nameSpace + '.'),
241
+ (localKeys.indexOf(cnt) === -1), nameSpace, localKeys, ignorePrefix) + '+"' : '${}';
242
+ }
243
+ }
244
+ return cnt;
245
+ });
246
+ }
247
+
248
+ /**
249
+ *
250
+ * @param {string} str ?
251
+ * @param {boolean} addNS ?
252
+ * @param {string} nameSpace ?
253
+ * @param {string[]} ignoreList ?
254
+ * @param {boolean} ignorePrefix ?
255
+ * @returns {string} ?
256
+ */
257
+ function addNameSpace(str: string, addNS: boolean, nameSpace: string, ignoreList: string[], ignorePrefix: boolean): string {
258
+ return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1 && !ignorePrefix && str !== 'true' && str !== 'false') ? nameSpace + '.' + str : str);
259
+ }
260
+
261
+ /**
262
+ *
263
+ * @param {string} str ?
264
+ * @param {boolean} addNS ?
265
+ * @param {string} nameSpace ?
266
+ * @param {string[]} ignoreList ?
267
+ * @returns {string} ?
268
+ */
269
+ function NameSpaceArrObj(str: string, addNS: boolean, nameSpace: string, ignoreList: string[]): string {
270
+ const arrObjReg: RegExp = /^\..*/gm;
271
+ return ((addNS && !(NOT_NUMBER.test(str)) &&
272
+ ignoreList.indexOf(str.split('.')[0]) === -1 && !(arrObjReg.test(str))) ? nameSpace + '.' + str : str);
273
+ }
274
+
275
+ // // Create hashCode for template string to storeCached function
276
+ // function hashCode(str: string): string {
277
+ // return str.split('').reduce((a: number, b: string) => { a = ((a << 5) - a) + b.charCodeAt(0); return a & a; }, 0).toString();
278
+ // }
279
+
280
+ /**
281
+ *
282
+ * @param {string} str ?
283
+ * @param {boolean} addNS ?
284
+ * @param {string} nameSpace ?
285
+ * @param {string[]} ignoreList ?
286
+ * @returns {string} ?
287
+ */
288
+ function NameSpaceForspecialChar(str: string, addNS: boolean, nameSpace: string, ignoreList: string[]): string {
289
+ return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1) ? nameSpace + '["' + str : str);
290
+ }
291
+
292
+ // eslint-disable-next-line
293
+ function SlashReplace(tempStr: string): any {
294
+ const double: string = '\\\\';
295
+ if (tempStr.match(DOUBLE_SLASH)) {
296
+ // eslint-disable-next-line
297
+ tempStr = tempStr;
298
+ } else {
299
+ tempStr = tempStr.replace(SINGLE_SLASH, double as string);
300
+ }
301
+ return tempStr;
302
+ }
303
+
304
+ /**
305
+ *
306
+ * @param {string} str ?
307
+ * @param {string} nameSpaceNew ?
308
+ * @param {string[]} keys ?
309
+ * @param {boolean} ignorePrefix ?
310
+ * @returns {string} ?
311
+ */
312
+ function HandleSpecialCharArrObj(str: string, nameSpaceNew: string, keys: string[], ignorePrefix: boolean): string {
313
+ str = str.trim();
314
+ const windowFunc: RegExp = /\window\./gm;
315
+ if (!windowFunc.test(str)) {
316
+ const quotes: RegExp = /'|"/gm;
317
+ const splRegexp: RegExp = /@|\$|#/gm;
318
+ if (splRegexp.test(str)) {
319
+ str = NameSpaceForspecialChar(str, (keys.indexOf(str) === -1), nameSpaceNew, keys) + '"]';
320
+ }
321
+ if (ARR_OBJ.test(str)) {
322
+ return NameSpaceArrObj(str, !(quotes.test(str)) && (keys.indexOf(str) === -1), nameSpaceNew, keys);
323
+ } else {
324
+ return addNameSpace(str, !(quotes.test(str)) && (keys.indexOf(str) === -1), nameSpaceNew, keys, ignorePrefix);
325
+ }
326
+ } else {
327
+ return str;
328
+ }
329
+ }