@syncfusion/ej2-base 32.1.19 → 32.1.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-base",
3
- "version": "32.1.19",
3
+ "version": "32.1.22",
4
4
  "description": "A common package of Essential JS 2 base libraries, methods and class definitions",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -3,7 +3,7 @@ import { IntlBase as base, setDateFormat } from './intl-base';
3
3
  import { isUndefined, throwError, getValue, isBlazor } from '../util';
4
4
  import { HijriParser } from '../hijri-parser';
5
5
  import { isNullOrUndefined, extend } from '../util';
6
- var abbreviateRegexGlobal = /\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi;
6
+ var abbreviateRegexGlobal = /\/MMMMM|MMMM|MMM|a|B|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi;
7
7
  var standalone = 'stand-alone';
8
8
  var weekdayKey = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
9
9
  export var basicPatterns = ['short', 'medium', 'long', 'full'];
@@ -27,6 +27,7 @@ export var datePartMatcher = {
27
27
  's': 'second',
28
28
  'L': 'month',
29
29
  'a': 'designator',
30
+ 'B': 'designator',
30
31
  'z': 'timeZone',
31
32
  'Z': 'timeZone',
32
33
  'G': 'era',
@@ -104,6 +105,10 @@ var DateFormat = /** @class */ (function () {
104
105
  formatOptions.designator = isBlazor() ?
105
106
  getValue('dayPeriods', dateObject) : getValue('dayPeriods.format.wide', dateObject);
106
107
  break;
108
+ case 'B':
109
+ formatOptions.designator = isBlazor() ?
110
+ getValue('dayPeriods', dateObject) : getValue('dayPeriods.format.wide', dateObject);
111
+ break;
107
112
  case 'G': {
108
113
  var eText = (len <= 3) ? 'eraAbbr' : (len === 4) ? 'eraNames' : 'eraNarrow';
109
114
  formatOptions.era = isBlazor() ? getValue('eras', dateObject) : getValue('eras.' + eText, dependable.dateObject);
@@ -206,6 +211,11 @@ var DateFormat = /** @class */ (function () {
206
211
  ret += options.designator["" + desig];
207
212
  break;
208
213
  }
214
+ case 'B': {
215
+ var desigs = value.getHours() < 12 ? 'am' : 'pm';
216
+ ret += options.designator["" + desigs];
217
+ break;
218
+ }
209
219
  case 'G': {
210
220
  var dec = value.getFullYear() < 0 ? 0 : 1;
211
221
  var retu = options.era["" + dec];
@@ -48,7 +48,7 @@ export var IntlBase;
48
48
  var fractionRegex = /[0-9]/g;
49
49
  IntlBase.defaultCurrency = '$';
50
50
  var mapper = ['infinity', 'nan', 'group', 'decimal'];
51
- var patternRegex = /G|M|L|H|c|'| a|yy|y|EEEE|E/g;
51
+ var patternRegex = /G|M|L|H|c|'| a|B|yy|y|EEEE|E/g;
52
52
  var patternMatch = {
53
53
  'G': '',
54
54
  'M': 'm',
@@ -57,6 +57,7 @@ export var IntlBase;
57
57
  'c': 'd',
58
58
  '\'': '"',
59
59
  ' a': ' AM/PM',
60
+ 'B': 'AM/PM',
60
61
  'yy': 'yy',
61
62
  'y': 'yyyy',
62
63
  'EEEE': 'dddd',