@syncfusion/ej2-base 19.2.55 → 19.3.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +1 -1
- package/CHANGELOG.md +1 -89
- package/README.md +1 -1
- package/dist/ej2-base.umd.min.js +2 -2
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +2650 -2401
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +3186 -2948
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +2 -2
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/e2e/crypto.js +1 -1
- package/e2e/index.d.ts +0 -3
- package/e2e/m.protractor.config.js +1 -1
- package/e2e/protractor.config.js +1 -1
- package/helpers/e2e/base.js +3 -3
- package/package.json +7 -64
- package/src/ajax.d.ts +24 -10
- package/src/ajax.js +14 -6
- package/src/animation-model.d.ts +12 -4
- package/src/animation.d.ts +37 -12
- package/src/animation.js +48 -22
- package/src/base.d.ts +31 -11
- package/src/base.js +34 -16
- package/src/browser.d.ts +63 -25
- package/src/browser.js +60 -15
- package/src/child-property.d.ts +21 -10
- package/src/child-property.js +23 -13
- package/src/component-model.d.ts +4 -1
- package/src/component.d.ts +42 -5
- package/src/component.js +52 -35
- package/src/dom.d.ts +76 -25
- package/src/dom.js +128 -124
- package/src/draggable-model.d.ts +5 -0
- package/src/draggable.d.ts +4 -1
- package/src/draggable.js +8 -2
- package/src/droppable-model.d.ts +7 -4
- package/src/droppable.d.ts +7 -3
- package/src/droppable.js +1 -0
- package/src/event-handler.d.ts +10 -6
- package/src/event-handler.js +11 -7
- package/src/hijri-parser.d.ts +12 -0
- package/src/hijri-parser.js +111 -90
- package/src/internationalization.d.ts +54 -21
- package/src/internationalization.js +55 -18
- package/src/intl/date-formatter.d.ts +19 -8
- package/src/intl/date-formatter.js +36 -13
- package/src/intl/date-parser.d.ts +30 -23
- package/src/intl/date-parser.js +61 -42
- package/src/intl/intl-base.d.ts +123 -46
- package/src/intl/intl-base.js +451 -377
- package/src/intl/number-formatter.d.ts +45 -34
- package/src/intl/number-formatter.js +47 -35
- package/src/intl/number-parser.d.ts +11 -8
- package/src/intl/number-parser.js +14 -11
- package/src/intl/parser-base.d.ts +38 -13
- package/src/intl/parser-base.js +45 -16
- package/src/keyboard-model.d.ts +5 -2
- package/src/keyboard.d.ts +26 -8
- package/src/keyboard.js +24 -9
- package/src/l10n.d.ts +16 -7
- package/src/l10n.js +16 -7
- package/src/module-loader.d.ts +13 -8
- package/src/module-loader.js +13 -9
- package/src/notify-property-change.d.ts +19 -7
- package/src/notify-property-change.js +140 -24
- package/src/observer.d.ts +17 -5
- package/src/observer.js +19 -7
- package/src/sanitize-helper.d.ts +1 -0
- package/src/sanitize-helper.js +1 -1
- package/src/template-engine.d.ts +30 -4
- package/src/template-engine.js +37 -12
- package/src/template.d.ts +8 -3
- package/src/template.js +67 -19
- package/src/touch-model.d.ts +11 -4
- package/src/touch.d.ts +51 -9
- package/src/touch.js +45 -13
- package/src/util.d.ts +67 -37
- package/src/util.js +99 -49
- package/styles/_bootstrap-definition.scss +0 -1
- package/styles/_bootstrap5-dark-definition.scss +10 -0
- package/styles/_bootstrap5-definition.scss +9 -0
- package/styles/_fabric-dark-definition.scss +0 -1
- package/styles/_highcontrast-light-definition.scss +1 -0
- package/styles/_material-definition.scss +1 -0
- package/styles/bootstrap-dark.css +2613 -32
- package/styles/bootstrap.css +2613 -32
- package/styles/bootstrap4.css +2149 -32
- package/styles/bootstrap5-dark.css +2157 -0
- package/styles/bootstrap5-dark.scss +3 -0
- package/styles/bootstrap5.css +2157 -0
- package/styles/bootstrap5.scss +3 -0
- package/styles/common/_core.scss +28 -63
- package/styles/definition/_bootstrap-dark.scss +3 -3
- package/styles/definition/_bootstrap.scss +1 -1
- package/styles/definition/_bootstrap5-dark.scss +357 -0
- package/styles/definition/_bootstrap5.scss +356 -0
- package/styles/definition/_material-dark.scss +1 -1
- package/styles/definition/_tailwind-dark.scss +18 -1
- package/styles/definition/_tailwind.scss +17 -0
- package/styles/fabric-dark.css +2589 -32
- package/styles/fabric.css +2589 -32
- package/styles/highcontrast-light.css +2573 -32
- package/styles/highcontrast.css +2573 -32
- package/styles/material-dark.css +2549 -32
- package/styles/material.css +2549 -32
- package/styles/tailwind-dark.css +2221 -32
- package/styles/tailwind.css +2221 -32
- package/src/virtual-dom.d.ts +0 -32
- package/src/virtual-dom.js +0 -449
package/src/intl/intl-base.js
CHANGED
|
@@ -28,6 +28,7 @@ export var blazorCultureFormats = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Date base common constants and function for date parser and formatter.
|
|
30
30
|
*/
|
|
31
|
+
// eslint-disable-next-line
|
|
31
32
|
export var IntlBase;
|
|
32
33
|
(function (IntlBase) {
|
|
33
34
|
// tslint:disable-next-line:max-line-length
|
|
@@ -126,51 +127,51 @@ export var IntlBase;
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
130
|
+
'days': {
|
|
131
|
+
'stand-alone': {
|
|
132
|
+
'abbreviated': {
|
|
133
|
+
'sun': 'Sun',
|
|
134
|
+
'mon': 'Mon',
|
|
135
|
+
'tue': 'Tue',
|
|
136
|
+
'wed': 'Wed',
|
|
137
|
+
'thu': 'Thu',
|
|
138
|
+
'fri': 'Fri',
|
|
139
|
+
'sat': 'Sat'
|
|
139
140
|
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
'narrow': {
|
|
142
|
+
'sun': 'S',
|
|
143
|
+
'mon': 'M',
|
|
144
|
+
'tue': 'T',
|
|
145
|
+
'wed': 'W',
|
|
146
|
+
'thu': 'T',
|
|
147
|
+
'fri': 'F',
|
|
148
|
+
'sat': 'S'
|
|
148
149
|
},
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
150
|
+
'short': {
|
|
151
|
+
'sun': 'Su',
|
|
152
|
+
'mon': 'Mo',
|
|
153
|
+
'tue': 'Tu',
|
|
154
|
+
'wed': 'We',
|
|
155
|
+
'thu': 'Th',
|
|
156
|
+
'fri': 'Fr',
|
|
157
|
+
'sat': 'Sa'
|
|
157
158
|
},
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
'wide': {
|
|
160
|
+
'sun': 'Sunday',
|
|
161
|
+
'mon': 'Monday',
|
|
162
|
+
'tue': 'Tuesday',
|
|
163
|
+
'wed': 'Wednesday',
|
|
164
|
+
'thu': 'Thursday',
|
|
165
|
+
'fri': 'Friday',
|
|
166
|
+
'sat': 'Saturday'
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
'dayPeriods': {
|
|
171
|
+
'format': {
|
|
172
|
+
'wide': {
|
|
173
|
+
'am': 'AM',
|
|
174
|
+
'pm': 'PM'
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
177
|
},
|
|
@@ -179,7 +180,7 @@ export var IntlBase;
|
|
|
179
180
|
'0': 'Before Christ',
|
|
180
181
|
'0-alt-variant': 'Before Common Era',
|
|
181
182
|
'1': 'Anno Domini',
|
|
182
|
-
|
|
183
|
+
'1-alt-variant': 'Common Era'
|
|
183
184
|
},
|
|
184
185
|
'eraAbbr': {
|
|
185
186
|
'0': 'BC',
|
|
@@ -207,8 +208,8 @@ export var IntlBase;
|
|
|
207
208
|
'short': 'h:mm a'
|
|
208
209
|
},
|
|
209
210
|
'dateTimeFormats': {
|
|
210
|
-
'full':
|
|
211
|
-
'long':
|
|
211
|
+
'full': '{1} \'at\' {0}',
|
|
212
|
+
'long': '{1} \'at\' {0}',
|
|
212
213
|
'medium': '{1}, {0}',
|
|
213
214
|
'short': '{1}, {0}',
|
|
214
215
|
'availableFormats': {
|
|
@@ -248,178 +249,178 @@ export var IntlBase;
|
|
|
248
249
|
'yMMM': 'MMM y',
|
|
249
250
|
'yMMMd': 'MMM d, y',
|
|
250
251
|
'yMMMEd': 'E, MMM d, y',
|
|
251
|
-
'yMMMM': 'MMMM y'
|
|
252
|
-
}
|
|
252
|
+
'yMMMM': 'MMMM y'
|
|
253
|
+
}
|
|
253
254
|
}
|
|
254
255
|
},
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
256
|
+
'islamic': {
|
|
257
|
+
'months': {
|
|
258
|
+
'stand-alone': {
|
|
259
|
+
'abbreviated': {
|
|
260
|
+
'1': 'Muh.',
|
|
261
|
+
'2': 'Saf.',
|
|
262
|
+
'3': 'Rab. I',
|
|
263
|
+
'4': 'Rab. II',
|
|
264
|
+
'5': 'Jum. I',
|
|
265
|
+
'6': 'Jum. II',
|
|
266
|
+
'7': 'Raj.',
|
|
267
|
+
'8': 'Sha.',
|
|
268
|
+
'9': 'Ram.',
|
|
269
|
+
'10': 'Shaw.',
|
|
270
|
+
'11': 'Dhuʻl-Q.',
|
|
271
|
+
'12': 'Dhuʻl-H.'
|
|
271
272
|
},
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
273
|
+
'narrow': {
|
|
274
|
+
'1': '1',
|
|
275
|
+
'2': '2',
|
|
276
|
+
'3': '3',
|
|
277
|
+
'4': '4',
|
|
278
|
+
'5': '5',
|
|
279
|
+
'6': '6',
|
|
280
|
+
'7': '7',
|
|
281
|
+
'8': '8',
|
|
282
|
+
'9': '9',
|
|
283
|
+
'10': '10',
|
|
284
|
+
'11': '11',
|
|
285
|
+
'12': '12'
|
|
285
286
|
},
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
287
|
+
'wide': {
|
|
288
|
+
'1': 'Muharram',
|
|
289
|
+
'2': 'Safar',
|
|
290
|
+
'3': 'Rabiʻ I',
|
|
291
|
+
'4': 'Rabiʻ II',
|
|
292
|
+
'5': 'Jumada I',
|
|
293
|
+
'6': 'Jumada II',
|
|
294
|
+
'7': 'Rajab',
|
|
295
|
+
'8': 'Shaʻban',
|
|
296
|
+
'9': 'Ramadan',
|
|
297
|
+
'10': 'Shawwal',
|
|
298
|
+
'11': 'Dhuʻl-Qiʻdah',
|
|
299
|
+
'12': 'Dhuʻl-Hijjah'
|
|
299
300
|
}
|
|
300
301
|
}
|
|
301
302
|
},
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
303
|
+
'days': {
|
|
304
|
+
'stand-alone': {
|
|
305
|
+
'abbreviated': {
|
|
306
|
+
'sun': 'Sun',
|
|
307
|
+
'mon': 'Mon',
|
|
308
|
+
'tue': 'Tue',
|
|
309
|
+
'wed': 'Wed',
|
|
310
|
+
'thu': 'Thu',
|
|
311
|
+
'fri': 'Fri',
|
|
312
|
+
'sat': 'Sat'
|
|
312
313
|
},
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
314
|
+
'narrow': {
|
|
315
|
+
'sun': 'S',
|
|
316
|
+
'mon': 'M',
|
|
317
|
+
'tue': 'T',
|
|
318
|
+
'wed': 'W',
|
|
319
|
+
'thu': 'T',
|
|
320
|
+
'fri': 'F',
|
|
321
|
+
'sat': 'S'
|
|
321
322
|
},
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
323
|
+
'short': {
|
|
324
|
+
'sun': 'Su',
|
|
325
|
+
'mon': 'Mo',
|
|
326
|
+
'tue': 'Tu',
|
|
327
|
+
'wed': 'We',
|
|
328
|
+
'thu': 'Th',
|
|
329
|
+
'fri': 'Fr',
|
|
330
|
+
'sat': 'Sa'
|
|
330
331
|
},
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
332
|
+
'wide': {
|
|
333
|
+
'sun': 'Sunday',
|
|
334
|
+
'mon': 'Monday',
|
|
335
|
+
'tue': 'Tuesday',
|
|
336
|
+
'wed': 'Wednesday',
|
|
337
|
+
'thu': 'Thursday',
|
|
338
|
+
'fri': 'Friday',
|
|
339
|
+
'sat': 'Saturday'
|
|
339
340
|
}
|
|
340
341
|
}
|
|
341
342
|
},
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
343
|
+
'dayPeriods': {
|
|
344
|
+
'format': {
|
|
345
|
+
'wide': {
|
|
346
|
+
'am': 'AM',
|
|
347
|
+
'pm': 'PM'
|
|
347
348
|
}
|
|
348
349
|
}
|
|
349
350
|
},
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
'eras': {
|
|
352
|
+
'eraNames': {
|
|
353
|
+
'0': 'AH'
|
|
353
354
|
},
|
|
354
|
-
|
|
355
|
-
|
|
355
|
+
'eraAbbr': {
|
|
356
|
+
'0': 'AH'
|
|
356
357
|
},
|
|
357
|
-
|
|
358
|
-
|
|
358
|
+
'eraNarrow': {
|
|
359
|
+
'0': 'AH'
|
|
359
360
|
}
|
|
360
361
|
},
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
362
|
+
'dateFormats': {
|
|
363
|
+
'full': 'EEEE, MMMM d, y G',
|
|
364
|
+
'long': 'MMMM d, y G',
|
|
365
|
+
'medium': 'MMM d, y G',
|
|
366
|
+
'short': 'M/d/y GGGGG'
|
|
366
367
|
},
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
368
|
+
'timeFormats': {
|
|
369
|
+
'full': 'h:mm:ss a zzzz',
|
|
370
|
+
'long': 'h:mm:ss a z',
|
|
371
|
+
'medium': 'h:mm:ss a',
|
|
372
|
+
'short': 'h:mm a'
|
|
372
373
|
},
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
374
|
+
'dateTimeFormats': {
|
|
375
|
+
'full': '{1} \'at\' {0}',
|
|
376
|
+
'long': '{1} \'at\' {0}',
|
|
377
|
+
'medium': '{1}, {0}',
|
|
378
|
+
'short': '{1}, {0}',
|
|
379
|
+
'availableFormats': {
|
|
380
|
+
'd': 'd',
|
|
381
|
+
'E': 'ccc',
|
|
382
|
+
'Ed': 'd E',
|
|
383
|
+
'Ehm': 'E h:mm a',
|
|
384
|
+
'EHm': 'E HH:mm',
|
|
385
|
+
'Ehms': 'E h:mm:ss a',
|
|
386
|
+
'EHms': 'E HH:mm:ss',
|
|
387
|
+
'Gy': 'y G',
|
|
388
|
+
'GyMMM': 'MMM y G',
|
|
389
|
+
'GyMMMd': 'MMM d, y G',
|
|
390
|
+
'GyMMMEd': 'E, MMM d, y G',
|
|
391
|
+
'h': 'h a',
|
|
392
|
+
'H': 'HH',
|
|
393
|
+
'hm': 'h:mm a',
|
|
394
|
+
'Hm': 'HH:mm',
|
|
395
|
+
'hms': 'h:mm:ss a',
|
|
396
|
+
'Hms': 'HH:mm:ss',
|
|
397
|
+
'M': 'L',
|
|
398
|
+
'Md': 'M/d',
|
|
399
|
+
'MEd': 'E, M/d',
|
|
400
|
+
'MMM': 'LLL',
|
|
401
|
+
'MMMd': 'MMM d',
|
|
402
|
+
'MMMEd': 'E, MMM d',
|
|
403
|
+
'MMMMd': 'MMMM d',
|
|
404
|
+
'ms': 'mm:ss',
|
|
405
|
+
'y': 'y G',
|
|
406
|
+
'yyyy': 'y G',
|
|
407
|
+
'yyyyM': 'M/y GGGGG',
|
|
408
|
+
'yyyyMd': 'M/d/y GGGGG',
|
|
409
|
+
'yyyyMEd': 'E, M/d/y GGGGG',
|
|
410
|
+
'yyyyMMM': 'MMM y G',
|
|
411
|
+
'yyyyMMMd': 'MMM d, y G',
|
|
412
|
+
'yyyyMMMEd': 'E, MMM d, y G',
|
|
413
|
+
'yyyyMMMM': 'MMMM y G',
|
|
414
|
+
'yyyyQQQ': 'QQQ y G',
|
|
415
|
+
'yyyyQQQQ': 'QQQQ y G'
|
|
415
416
|
}
|
|
416
417
|
}
|
|
417
418
|
}
|
|
418
419
|
},
|
|
419
420
|
'timeZoneNames': {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
'hourFormat': '+HH:mm;-HH:mm',
|
|
422
|
+
'gmtFormat': 'GMT{0}',
|
|
423
|
+
'gmtZeroFormat': 'GMT'
|
|
423
424
|
}
|
|
424
425
|
},
|
|
425
426
|
'numbers': {
|
|
@@ -437,7 +438,7 @@ export var IntlBase;
|
|
|
437
438
|
'GBP': {
|
|
438
439
|
'displayName': 'British Pound',
|
|
439
440
|
'symbol-alt-narrow': '£'
|
|
440
|
-
}
|
|
441
|
+
}
|
|
441
442
|
},
|
|
442
443
|
'defaultNumberingSystem': 'latn',
|
|
443
444
|
'minimumGroupingDigits': '1',
|
|
@@ -456,7 +457,7 @@ export var IntlBase;
|
|
|
456
457
|
'timeSeparator': ':'
|
|
457
458
|
},
|
|
458
459
|
'decimalFormats-numberSystem-latn': {
|
|
459
|
-
'standard': '#,##0.###'
|
|
460
|
+
'standard': '#,##0.###'
|
|
460
461
|
},
|
|
461
462
|
'percentFormats-numberSystem-latn': {
|
|
462
463
|
'standard': '#,##0%'
|
|
@@ -471,158 +472,158 @@ export var IntlBase;
|
|
|
471
472
|
}
|
|
472
473
|
};
|
|
473
474
|
IntlBase.blazorDefaultObject = {
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
475
|
+
'numbers': {
|
|
476
|
+
'mapper': {
|
|
477
|
+
'0': '0',
|
|
478
|
+
'1': '1',
|
|
479
|
+
'2': '2',
|
|
480
|
+
'3': '3',
|
|
481
|
+
'4': '4',
|
|
482
|
+
'5': '5',
|
|
483
|
+
'6': '6',
|
|
484
|
+
'7': '7',
|
|
485
|
+
'8': '8',
|
|
486
|
+
'9': '9'
|
|
486
487
|
},
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
488
|
+
'mapperDigits': '0123456789',
|
|
489
|
+
'numberSymbols': {
|
|
490
|
+
'decimal': '.',
|
|
491
|
+
'group': ',',
|
|
492
|
+
'plusSign': '+',
|
|
493
|
+
'minusSign': '-',
|
|
494
|
+
'percentSign': '%',
|
|
495
|
+
'nan': 'NaN',
|
|
496
|
+
'timeSeparator': ':',
|
|
497
|
+
'infinity': '∞'
|
|
497
498
|
},
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
499
|
+
'timeSeparator': ':',
|
|
500
|
+
'currencySymbol': '$',
|
|
501
|
+
'currencypData': {
|
|
502
|
+
'nlead': '$',
|
|
503
|
+
'nend': '',
|
|
504
|
+
'groupSeparator': ',',
|
|
505
|
+
'groupData': {
|
|
506
|
+
'primary': 3
|
|
506
507
|
},
|
|
507
|
-
|
|
508
|
-
|
|
508
|
+
'maximumFraction': 2,
|
|
509
|
+
'minimumFraction': 2
|
|
509
510
|
},
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
511
|
+
'percentpData': {
|
|
512
|
+
'nlead': '',
|
|
513
|
+
'nend': '%',
|
|
514
|
+
'groupSeparator': ',',
|
|
515
|
+
'groupData': {
|
|
516
|
+
'primary': 3
|
|
516
517
|
},
|
|
517
|
-
|
|
518
|
-
|
|
518
|
+
'maximumFraction': 2,
|
|
519
|
+
'minimumFraction': 2
|
|
519
520
|
},
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
521
|
+
'percentnData': {
|
|
522
|
+
'nlead': '-',
|
|
523
|
+
'nend': '%',
|
|
524
|
+
'groupSeparator': ',',
|
|
525
|
+
'groupData': {
|
|
526
|
+
'primary': 3
|
|
526
527
|
},
|
|
527
|
-
|
|
528
|
-
|
|
528
|
+
'maximumFraction': 2,
|
|
529
|
+
'minimumFraction': 2
|
|
529
530
|
},
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
531
|
+
'currencynData': {
|
|
532
|
+
'nlead': '($',
|
|
533
|
+
'nend': ')',
|
|
534
|
+
'groupSeparator': ',',
|
|
535
|
+
'groupData': {
|
|
536
|
+
'primary': 3
|
|
536
537
|
},
|
|
537
|
-
|
|
538
|
-
|
|
538
|
+
'maximumFraction': 2,
|
|
539
|
+
'minimumFraction': 2
|
|
539
540
|
},
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
541
|
+
'decimalnData': {
|
|
542
|
+
'nlead': '-',
|
|
543
|
+
'nend': '',
|
|
544
|
+
'groupData': {
|
|
545
|
+
'primary': 3
|
|
545
546
|
},
|
|
546
|
-
|
|
547
|
-
|
|
547
|
+
'maximumFraction': 2,
|
|
548
|
+
'minimumFraction': 2
|
|
548
549
|
},
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
550
|
+
'decimalpData': {
|
|
551
|
+
'nlead': '',
|
|
552
|
+
'nend': '',
|
|
553
|
+
'groupData': {
|
|
554
|
+
'primary': 3
|
|
554
555
|
},
|
|
555
|
-
|
|
556
|
-
|
|
556
|
+
'maximumFraction': 2,
|
|
557
|
+
'minimumFraction': 2
|
|
557
558
|
}
|
|
558
559
|
},
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
560
|
+
'dates': {
|
|
561
|
+
'dayPeriods': {
|
|
562
|
+
'am': 'AM',
|
|
563
|
+
'pm': 'PM'
|
|
563
564
|
},
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
565
|
+
'dateSeperator': '/',
|
|
566
|
+
'days': {
|
|
567
|
+
'abbreviated': {
|
|
568
|
+
'sun': 'Sun',
|
|
569
|
+
'mon': 'Mon',
|
|
570
|
+
'tue': 'Tue',
|
|
571
|
+
'wed': 'Wed',
|
|
572
|
+
'thu': 'Thu',
|
|
573
|
+
'fri': 'Fri',
|
|
574
|
+
'sat': 'Sat'
|
|
574
575
|
},
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
576
|
+
'short': {
|
|
577
|
+
'sun': 'Su',
|
|
578
|
+
'mon': 'Mo',
|
|
579
|
+
'tue': 'Tu',
|
|
580
|
+
'wed': 'We',
|
|
581
|
+
'thu': 'Th',
|
|
582
|
+
'fri': 'Fr',
|
|
583
|
+
'sat': 'Sa'
|
|
583
584
|
},
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
585
|
+
'wide': {
|
|
586
|
+
'sun': 'Sunday',
|
|
587
|
+
'mon': 'Monday',
|
|
588
|
+
'tue': 'Tuesday',
|
|
589
|
+
'wed': 'Wednesday',
|
|
590
|
+
'thu': 'Thursday',
|
|
591
|
+
'fri': 'Friday',
|
|
592
|
+
'sat': 'Saturday'
|
|
592
593
|
}
|
|
593
594
|
},
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
595
|
+
'months': {
|
|
596
|
+
'abbreviated': {
|
|
597
|
+
'1': 'Jan',
|
|
598
|
+
'2': 'Feb',
|
|
599
|
+
'3': 'Mar',
|
|
600
|
+
'4': 'Apr',
|
|
601
|
+
'5': 'May',
|
|
602
|
+
'6': 'Jun',
|
|
603
|
+
'7': 'Jul',
|
|
604
|
+
'8': 'Aug',
|
|
605
|
+
'9': 'Sep',
|
|
606
|
+
'10': 'Oct',
|
|
607
|
+
'11': 'Nov',
|
|
608
|
+
'12': 'Dec'
|
|
608
609
|
},
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
610
|
+
'wide': {
|
|
611
|
+
'1': 'January',
|
|
612
|
+
'2': 'February',
|
|
613
|
+
'3': 'March',
|
|
614
|
+
'4': 'April',
|
|
615
|
+
'5': 'May',
|
|
616
|
+
'6': 'June',
|
|
617
|
+
'7': 'July',
|
|
618
|
+
'8': 'August',
|
|
619
|
+
'9': 'September',
|
|
620
|
+
'10': 'October',
|
|
621
|
+
'11': 'November',
|
|
622
|
+
'12': 'December'
|
|
622
623
|
}
|
|
623
624
|
},
|
|
624
|
-
|
|
625
|
-
|
|
625
|
+
'eras': {
|
|
626
|
+
'1': 'AD'
|
|
626
627
|
}
|
|
627
628
|
}
|
|
628
629
|
};
|
|
@@ -650,11 +651,14 @@ export var IntlBase;
|
|
|
650
651
|
};
|
|
651
652
|
/**
|
|
652
653
|
* Returns the resultant pattern based on the skeleton, dateObject and the type provided
|
|
654
|
+
*
|
|
653
655
|
* @private
|
|
654
|
-
* @param {string} skeleton
|
|
655
|
-
* @param {Object} dateObject
|
|
656
|
-
* @param {string} type
|
|
657
|
-
* @
|
|
656
|
+
* @param {string} skeleton ?
|
|
657
|
+
* @param {Object} dateObject ?
|
|
658
|
+
* @param {string} type ?
|
|
659
|
+
* @param {boolean} isIslamic ?
|
|
660
|
+
* @param {string} blazorCulture ?
|
|
661
|
+
* @returns {string} ?
|
|
658
662
|
*/
|
|
659
663
|
function getResultantPattern(skeleton, dateObject, type, isIslamic, blazorCulture) {
|
|
660
664
|
var resPattern;
|
|
@@ -684,11 +688,13 @@ export var IntlBase;
|
|
|
684
688
|
IntlBase.getResultantPattern = getResultantPattern;
|
|
685
689
|
/**
|
|
686
690
|
* Returns the dependable object for provided cldr data and culture
|
|
691
|
+
*
|
|
687
692
|
* @private
|
|
688
|
-
* @param {Object} cldr
|
|
689
|
-
* @param {string} culture
|
|
690
|
-
* @param {
|
|
691
|
-
* @
|
|
693
|
+
* @param {Object} cldr ?
|
|
694
|
+
* @param {string} culture ?
|
|
695
|
+
* @param {string} mode ?
|
|
696
|
+
* @param {boolean} isNumber ?
|
|
697
|
+
* @returns {any} ?
|
|
692
698
|
*/
|
|
693
699
|
function getDependables(cldr, culture, mode, isNumber) {
|
|
694
700
|
var ret = {};
|
|
@@ -706,12 +712,13 @@ export var IntlBase;
|
|
|
706
712
|
IntlBase.getDependables = getDependables;
|
|
707
713
|
/**
|
|
708
714
|
* Returns the symbol pattern for provided parameters
|
|
715
|
+
*
|
|
709
716
|
* @private
|
|
710
|
-
* @param {string} type
|
|
711
|
-
* @param {string} numSystem
|
|
712
|
-
* @param {Object} obj
|
|
713
|
-
* @param {boolean} isAccount
|
|
714
|
-
* @returns {string}
|
|
717
|
+
* @param {string} type ?
|
|
718
|
+
* @param {string} numSystem ?
|
|
719
|
+
* @param {Object} obj ?
|
|
720
|
+
* @param {boolean} isAccount ?
|
|
721
|
+
* @returns {string} ?
|
|
715
722
|
*/
|
|
716
723
|
function getSymbolPattern(type, numSystem, obj, isAccount) {
|
|
717
724
|
return getValue(type + 'Formats-numberSystem-' +
|
|
@@ -719,6 +726,11 @@ export var IntlBase;
|
|
|
719
726
|
numSystem + '.standard', obj) : '');
|
|
720
727
|
}
|
|
721
728
|
IntlBase.getSymbolPattern = getSymbolPattern;
|
|
729
|
+
/**
|
|
730
|
+
*
|
|
731
|
+
* @param {string} format ?
|
|
732
|
+
* @returns {string} ?
|
|
733
|
+
*/
|
|
722
734
|
function ConvertDateToWeekFormat(format) {
|
|
723
735
|
var convertMapper = format.match(IntlBase.dateConverterMapper);
|
|
724
736
|
if (convertMapper && isBlazor()) {
|
|
@@ -728,6 +740,12 @@ export var IntlBase;
|
|
|
728
740
|
return format;
|
|
729
741
|
}
|
|
730
742
|
IntlBase.ConvertDateToWeekFormat = ConvertDateToWeekFormat;
|
|
743
|
+
/**
|
|
744
|
+
*
|
|
745
|
+
* @param {DateFormatOptions} formatOptions ?
|
|
746
|
+
* @param {string} culture ?
|
|
747
|
+
* @returns {DateFormatOptions} ?
|
|
748
|
+
*/
|
|
731
749
|
function compareBlazorDateFormats(formatOptions, culture) {
|
|
732
750
|
var format = formatOptions.format || formatOptions.skeleton;
|
|
733
751
|
var curFormatMapper = getValue((culture || 'en-US') + '.' + format, blazorCultureFormats);
|
|
@@ -743,16 +761,17 @@ export var IntlBase;
|
|
|
743
761
|
IntlBase.compareBlazorDateFormats = compareBlazorDateFormats;
|
|
744
762
|
/**
|
|
745
763
|
* Returns proper numeric skeleton
|
|
764
|
+
*
|
|
746
765
|
* @private
|
|
747
|
-
* @param {string} skeleton
|
|
748
|
-
* @returns {
|
|
766
|
+
* @param {string} skeleton ?
|
|
767
|
+
* @returns {any} ?
|
|
749
768
|
*/
|
|
750
769
|
function getProperNumericSkeleton(skeleton) {
|
|
751
770
|
var matches = skeleton.match(IntlBase.formatRegex);
|
|
752
771
|
var ret = {};
|
|
753
772
|
var pattern = matches[1].toUpperCase();
|
|
754
773
|
ret.isAccount = (pattern === 'A');
|
|
755
|
-
|
|
774
|
+
// eslint-disable-next-line
|
|
756
775
|
ret.type = IntlBase.patternMatcher[pattern];
|
|
757
776
|
if (skeleton.length > 1) {
|
|
758
777
|
ret.fractionDigits = parseInt(matches[2], 10);
|
|
@@ -762,12 +781,13 @@ export var IntlBase;
|
|
|
762
781
|
IntlBase.getProperNumericSkeleton = getProperNumericSkeleton;
|
|
763
782
|
/**
|
|
764
783
|
* Returns format data for number formatting like minimum fraction, maximum fraction, etc..,
|
|
784
|
+
*
|
|
765
785
|
* @private
|
|
766
|
-
* @param {string} pattern
|
|
767
|
-
* @param {boolean} needFraction
|
|
768
|
-
* @param {string} cSymbol
|
|
769
|
-
* @param {boolean} fractionOnly
|
|
770
|
-
* @returns {
|
|
786
|
+
* @param {string} pattern ?
|
|
787
|
+
* @param {boolean} needFraction ?
|
|
788
|
+
* @param {string} cSymbol ?
|
|
789
|
+
* @param {boolean} fractionOnly ?
|
|
790
|
+
* @returns {any} ?
|
|
771
791
|
*/
|
|
772
792
|
function getFormatData(pattern, needFraction, cSymbol, fractionOnly) {
|
|
773
793
|
var nData = fractionOnly ? {} : { nlead: '', nend: '' };
|
|
@@ -795,10 +815,11 @@ export var IntlBase;
|
|
|
795
815
|
IntlBase.getFormatData = getFormatData;
|
|
796
816
|
/**
|
|
797
817
|
* Changes currency symbol
|
|
818
|
+
*
|
|
798
819
|
* @private
|
|
799
|
-
* @param {string} val
|
|
800
|
-
* @param {string} sym
|
|
801
|
-
* @returns {string}
|
|
820
|
+
* @param {string} val ?
|
|
821
|
+
* @param {string} sym ?
|
|
822
|
+
* @returns {string} ?
|
|
802
823
|
*/
|
|
803
824
|
function changeCurrencySymbol(val, sym) {
|
|
804
825
|
if (val) {
|
|
@@ -806,12 +827,15 @@ export var IntlBase;
|
|
|
806
827
|
}
|
|
807
828
|
return '';
|
|
808
829
|
}
|
|
830
|
+
IntlBase.changeCurrencySymbol = changeCurrencySymbol;
|
|
809
831
|
/**
|
|
810
|
-
* Returns currency symbol based on currency code
|
|
832
|
+
* Returns currency symbol based on currency code ?
|
|
833
|
+
*
|
|
811
834
|
* @private
|
|
812
|
-
* @param {Object} numericObject
|
|
813
|
-
* @param {string} currencyCode
|
|
814
|
-
* @
|
|
835
|
+
* @param {Object} numericObject ?
|
|
836
|
+
* @param {string} currencyCode ?
|
|
837
|
+
* @param {string} altSymbol ?
|
|
838
|
+
* @returns {string} ?
|
|
815
839
|
*/
|
|
816
840
|
function getCurrencySymbol(numericObject, currencyCode, altSymbol) {
|
|
817
841
|
var symbol = altSymbol ? ('.' + altSymbol) : '.symbol';
|
|
@@ -822,17 +846,19 @@ export var IntlBase;
|
|
|
822
846
|
IntlBase.getCurrencySymbol = getCurrencySymbol;
|
|
823
847
|
/**
|
|
824
848
|
* Returns formatting options for custom number format
|
|
849
|
+
*
|
|
825
850
|
* @private
|
|
826
|
-
* @param {string} format
|
|
827
|
-
* @param {CommonOptions} dOptions
|
|
828
|
-
* @param {
|
|
829
|
-
* @returns {
|
|
851
|
+
* @param {string} format ?
|
|
852
|
+
* @param {CommonOptions} dOptions ?
|
|
853
|
+
* @param {any} obj ?
|
|
854
|
+
* @returns {any} ?
|
|
830
855
|
*/
|
|
831
856
|
function customFormat(format, dOptions, obj) {
|
|
832
857
|
var options = {};
|
|
833
858
|
var formatSplit = format.split(';');
|
|
834
859
|
var data = ['pData', 'nData', 'zeroData'];
|
|
835
860
|
for (var i = 0; i < formatSplit.length; i++) {
|
|
861
|
+
// eslint-disable-next-line
|
|
836
862
|
options[data[i]] = customNumberFormat(formatSplit[i], dOptions, obj);
|
|
837
863
|
}
|
|
838
864
|
if (isNullOrUndefined(options.nData)) {
|
|
@@ -844,11 +870,12 @@ export var IntlBase;
|
|
|
844
870
|
IntlBase.customFormat = customFormat;
|
|
845
871
|
/**
|
|
846
872
|
* Returns custom formatting options
|
|
873
|
+
*
|
|
847
874
|
* @private
|
|
848
|
-
* @param {string} format
|
|
849
|
-
* @param {CommonOptions} dOptions
|
|
850
|
-
* @param {Object} numObject
|
|
851
|
-
* @returns {
|
|
875
|
+
* @param {string} format ?
|
|
876
|
+
* @param {CommonOptions} dOptions ?
|
|
877
|
+
* @param {Object} numObject ?
|
|
878
|
+
* @returns {any} ?
|
|
852
879
|
*/
|
|
853
880
|
function customNumberFormat(format, dOptions, numObject) {
|
|
854
881
|
var cOptions = { type: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 0 };
|
|
@@ -888,21 +915,24 @@ export var IntlBase;
|
|
|
888
915
|
if (!isNullOrUndefined(numObject)) {
|
|
889
916
|
var symbolPattern = getSymbolPattern(cOptions.type, dOptions.numberMapper.numberSystem, numObject, false);
|
|
890
917
|
if (cOptions.useGrouping) {
|
|
918
|
+
// eslint-disable-next-line
|
|
891
919
|
cOptions.groupSeparator = dOptions.numberMapper.numberSymbols[mapper[2]];
|
|
892
920
|
cOptions.groupData = NumberFormat.getGroupingDetails(symbolPattern.split(';')[0]);
|
|
893
921
|
}
|
|
894
|
-
cOptions.nlead = cOptions.nlead.replace(
|
|
895
|
-
cOptions.nend = cOptions.nend.replace(
|
|
922
|
+
cOptions.nlead = cOptions.nlead.replace(/'/g, '');
|
|
923
|
+
cOptions.nend = cOptions.nend.replace(/'/g, '');
|
|
896
924
|
}
|
|
897
925
|
return cOptions;
|
|
898
926
|
}
|
|
927
|
+
IntlBase.customNumberFormat = customNumberFormat;
|
|
899
928
|
/**
|
|
900
929
|
* Returns formatting options for currency or percent type
|
|
930
|
+
*
|
|
901
931
|
* @private
|
|
902
|
-
* @param {string[]} parts
|
|
903
|
-
* @param {string} actual
|
|
904
|
-
* @param {string} symbol
|
|
905
|
-
* @returns {
|
|
932
|
+
* @param {string[]} parts ?
|
|
933
|
+
* @param {string} actual ?
|
|
934
|
+
* @param {string} symbol ?
|
|
935
|
+
* @returns {any} ?
|
|
906
936
|
*/
|
|
907
937
|
function isCurrencyPercent(parts, actual, symbol) {
|
|
908
938
|
var options = { nlead: parts[0], nend: parts[1] };
|
|
@@ -910,7 +940,9 @@ export var IntlBase;
|
|
|
910
940
|
var part = parts[i];
|
|
911
941
|
var loc = part.indexOf(actual);
|
|
912
942
|
if ((loc !== -1) && ((loc < part.indexOf('\'')) || (loc > part.lastIndexOf('\'')))) {
|
|
943
|
+
// eslint-disable-next-line
|
|
913
944
|
options[typeMapper[i]] = part.substr(0, loc) + symbol + part.substr(loc + 1);
|
|
945
|
+
// eslint-disable-next-line
|
|
914
946
|
options[typeMapper[actual]] = true;
|
|
915
947
|
options.type = options.isCurrency ? 'currency' : 'percent';
|
|
916
948
|
break;
|
|
@@ -921,9 +953,10 @@ export var IntlBase;
|
|
|
921
953
|
IntlBase.isCurrencyPercent = isCurrencyPercent;
|
|
922
954
|
/**
|
|
923
955
|
* Returns culture based date separator
|
|
956
|
+
*
|
|
924
957
|
* @private
|
|
925
|
-
* @param {Object} dateObj
|
|
926
|
-
* @returns {string}
|
|
958
|
+
* @param {Object} dateObj ?
|
|
959
|
+
* @returns {string} ?
|
|
927
960
|
*/
|
|
928
961
|
function getDateSeparator(dateObj) {
|
|
929
962
|
var value = (getValue('dateFormats.short', dateObj) || '').match(/[dM]([^dM])[dM]/i);
|
|
@@ -932,11 +965,13 @@ export var IntlBase;
|
|
|
932
965
|
IntlBase.getDateSeparator = getDateSeparator;
|
|
933
966
|
/**
|
|
934
967
|
* Returns Native Date Time pattern
|
|
968
|
+
*
|
|
935
969
|
* @private
|
|
936
|
-
* @param {string} culture
|
|
937
|
-
* @param {DateFormatOptions} options
|
|
938
|
-
* @param {Object} cldr
|
|
939
|
-
* @
|
|
970
|
+
* @param {string} culture ?
|
|
971
|
+
* @param {DateFormatOptions} options ?
|
|
972
|
+
* @param {Object} cldr ?
|
|
973
|
+
* @param {boolean} isExcelFormat ?
|
|
974
|
+
* @returns {string} ?
|
|
940
975
|
*/
|
|
941
976
|
function getActualDateTimeFormat(culture, options, cldr, isExcelFormat) {
|
|
942
977
|
var dependable = getDependables(cldr, culture, options.calendar);
|
|
@@ -946,6 +981,7 @@ export var IntlBase;
|
|
|
946
981
|
var actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);
|
|
947
982
|
if (isExcelFormat) {
|
|
948
983
|
actualPattern = actualPattern.replace(patternRegex, function (pattern) {
|
|
984
|
+
// eslint-disable-next-line
|
|
949
985
|
return patternMatch[pattern];
|
|
950
986
|
});
|
|
951
987
|
if (actualPattern.indexOf('z') !== -1) {
|
|
@@ -972,10 +1008,16 @@ export var IntlBase;
|
|
|
972
1008
|
return actualPattern;
|
|
973
1009
|
}
|
|
974
1010
|
IntlBase.getActualDateTimeFormat = getActualDateTimeFormat;
|
|
975
|
-
|
|
1011
|
+
/**
|
|
1012
|
+
*
|
|
1013
|
+
* @param {string} actual ?
|
|
1014
|
+
* @param {any} option ?
|
|
1015
|
+
* @returns {any} ?
|
|
1016
|
+
*/
|
|
1017
|
+
// eslint-disable-next-line
|
|
976
1018
|
function processSymbol(actual, option) {
|
|
977
1019
|
if (actual.indexOf(',') !== -1) {
|
|
978
|
-
//
|
|
1020
|
+
// eslint-disable-next-line
|
|
979
1021
|
var split = actual.split(',');
|
|
980
1022
|
actual = (split[0] + getValue('numberMapper.numberSymbols.group', option) +
|
|
981
1023
|
split[1].replace('.', getValue('numberMapper.numberSymbols.decimal', option)));
|
|
@@ -987,11 +1029,13 @@ export var IntlBase;
|
|
|
987
1029
|
}
|
|
988
1030
|
/**
|
|
989
1031
|
* Returns Native Number pattern
|
|
1032
|
+
*
|
|
990
1033
|
* @private
|
|
991
|
-
* @param {string} culture
|
|
992
|
-
* @param {NumberFormatOptions} options
|
|
993
|
-
* @param {Object} cldr
|
|
994
|
-
* @
|
|
1034
|
+
* @param {string} culture ?
|
|
1035
|
+
* @param {NumberFormatOptions} options ?
|
|
1036
|
+
* @param {Object} cldr ?
|
|
1037
|
+
* @param {boolean} isExcel ?
|
|
1038
|
+
* @returns {string} ?
|
|
995
1039
|
*/
|
|
996
1040
|
function getActualNumberFormat(culture, options, cldr, isExcel) {
|
|
997
1041
|
var dependable = getDependables(cldr, culture, '', true);
|
|
@@ -1055,7 +1099,7 @@ export var IntlBase;
|
|
|
1055
1099
|
}
|
|
1056
1100
|
}
|
|
1057
1101
|
else {
|
|
1058
|
-
actualPattern = options.format.replace(
|
|
1102
|
+
actualPattern = options.format.replace(/'/g, '"');
|
|
1059
1103
|
}
|
|
1060
1104
|
if (Object.keys(dOptions).length > 0) {
|
|
1061
1105
|
actualPattern = !isExcel ? processSymbol(actualPattern, dOptions) : actualPattern;
|
|
@@ -1063,6 +1107,13 @@ export var IntlBase;
|
|
|
1063
1107
|
return actualPattern;
|
|
1064
1108
|
}
|
|
1065
1109
|
IntlBase.getActualNumberFormat = getActualNumberFormat;
|
|
1110
|
+
/**
|
|
1111
|
+
*
|
|
1112
|
+
* @param {string} pattern ?
|
|
1113
|
+
* @param {number} minDigits ?
|
|
1114
|
+
* @param {number} maxDigits ?
|
|
1115
|
+
* @returns {string} ?
|
|
1116
|
+
*/
|
|
1066
1117
|
function fractionDigitsPattern(pattern, minDigits, maxDigits) {
|
|
1067
1118
|
pattern += '.';
|
|
1068
1119
|
for (var a = 0; a < minDigits; a++) {
|
|
@@ -1076,6 +1127,13 @@ export var IntlBase;
|
|
|
1076
1127
|
}
|
|
1077
1128
|
return pattern;
|
|
1078
1129
|
}
|
|
1130
|
+
IntlBase.fractionDigitsPattern = fractionDigitsPattern;
|
|
1131
|
+
/**
|
|
1132
|
+
*
|
|
1133
|
+
* @param {string} pattern ?
|
|
1134
|
+
* @param {number} digits ?
|
|
1135
|
+
* @returns {string} ?
|
|
1136
|
+
*/
|
|
1079
1137
|
function minimumIntegerPattern(pattern, digits) {
|
|
1080
1138
|
var temp = pattern.split('.');
|
|
1081
1139
|
var integer = '';
|
|
@@ -1084,6 +1142,12 @@ export var IntlBase;
|
|
|
1084
1142
|
}
|
|
1085
1143
|
return temp[1] ? (integer + '.' + temp[1]) : integer;
|
|
1086
1144
|
}
|
|
1145
|
+
IntlBase.minimumIntegerPattern = minimumIntegerPattern;
|
|
1146
|
+
/**
|
|
1147
|
+
*
|
|
1148
|
+
* @param {string} pattern ?
|
|
1149
|
+
* @returns {string} ?
|
|
1150
|
+
*/
|
|
1087
1151
|
function groupingPattern(pattern) {
|
|
1088
1152
|
var temp = pattern.split('.');
|
|
1089
1153
|
var integer = temp[0];
|
|
@@ -1097,6 +1161,13 @@ export var IntlBase;
|
|
|
1097
1161
|
pattern = pattern.slice(1);
|
|
1098
1162
|
return temp[1] ? (pattern + '.' + temp[1]) : pattern;
|
|
1099
1163
|
}
|
|
1164
|
+
IntlBase.groupingPattern = groupingPattern;
|
|
1165
|
+
/**
|
|
1166
|
+
*
|
|
1167
|
+
* @param {string} culture ?
|
|
1168
|
+
* @param {Object} cldr ?
|
|
1169
|
+
* @returns {number} ?
|
|
1170
|
+
*/
|
|
1100
1171
|
function getWeekData(culture, cldr) {
|
|
1101
1172
|
var firstDay = defaultFirstDay;
|
|
1102
1173
|
var mapper = getValue('supplemental.weekData.firstDay', cldr);
|
|
@@ -1113,9 +1184,10 @@ export var IntlBase;
|
|
|
1113
1184
|
IntlBase.getWeekData = getWeekData;
|
|
1114
1185
|
/**
|
|
1115
1186
|
* @private
|
|
1116
|
-
* @param pData
|
|
1117
|
-
* @param aCurrency
|
|
1118
|
-
* @param rCurrency
|
|
1187
|
+
* @param {any} pData ?
|
|
1188
|
+
* @param {string} aCurrency ?
|
|
1189
|
+
* @param {string} rCurrency ?
|
|
1190
|
+
* @returns {void} ?
|
|
1119
1191
|
*/
|
|
1120
1192
|
function replaceBlazorCurrency(pData, aCurrency, rCurrency) {
|
|
1121
1193
|
var iCurrency = getBlazorCurrencySymbol(rCurrency);
|
|
@@ -1130,6 +1202,8 @@ export var IntlBase;
|
|
|
1130
1202
|
IntlBase.replaceBlazorCurrency = replaceBlazorCurrency;
|
|
1131
1203
|
/**
|
|
1132
1204
|
* @private
|
|
1205
|
+
* @param {Date} date ?
|
|
1206
|
+
* @returns {number} ?
|
|
1133
1207
|
*/
|
|
1134
1208
|
function getWeekOfYear(date) {
|
|
1135
1209
|
var newYear = new Date(date.getFullYear(), 0, 1);
|
|
@@ -1141,7 +1215,7 @@ export var IntlBase;
|
|
|
1141
1215
|
if (day < 4) {
|
|
1142
1216
|
weeknum = Math.floor((daynum + day - 1) / 7) + 1;
|
|
1143
1217
|
if (weeknum > 52) {
|
|
1144
|
-
var nYear = new Date(
|
|
1218
|
+
var nYear = new Date(this.getFullYear() + 1, 0, 1);
|
|
1145
1219
|
var nday = nYear.getDay();
|
|
1146
1220
|
nday = nday >= 0 ? nday : nday + 7;
|
|
1147
1221
|
weeknum = nday < 4 ? 1 : 53;
|