@jsuites/utils 6.0.2 → 6.0.3

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 (2) hide show
  1. package/dist/index.js +7 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -994,14 +994,8 @@
994
994
  const hiddenCaret = "\u200B";
995
995
  // Locale for date parsing
996
996
  const userLocale = (typeof navigator !== 'undefined' && navigator.language) || 'en-US';
997
- // Labels
998
- const weekDaysFull = Helpers.weekdays;
999
- const weekDays = Helpers.weekdaysShort;
1000
- const monthsFull = Helpers.months;
1001
- const months = Helpers.monthsShort;
1002
997
 
1003
998
  // Helpers
1004
-
1005
999
  const focus = function(el) {
1006
1000
  if (el.textContent.length) {
1007
1001
  // Handle contenteditable elements
@@ -1373,9 +1367,9 @@
1373
1367
  this.values[this.index] = '';
1374
1368
  }
1375
1369
  let value = (this.values[this.index] + v).toLowerCase();
1376
- for (var i = 0; i < monthsFull.length; i++) {
1377
- if (monthsFull[i][0].toLowerCase().indexOf(value) === 0) {
1378
- this.values[this.index] = monthsFull[i][0];
1370
+ for (var i = 0; i < Helpers.months.length; i++) {
1371
+ if (Helpers.months[i][0].toLowerCase().indexOf(value) === 0) {
1372
+ this.values[this.index] = Helpers.months[i][0];
1379
1373
  this.date[1] = i + 1;
1380
1374
  this.index++;
1381
1375
  break;
@@ -1383,13 +1377,13 @@
1383
1377
  }
1384
1378
  },
1385
1379
  'MMMM': function(v) {
1386
- let ret = parseMethods.FIND.call(this, v, monthsFull);
1380
+ let ret = parseMethods.FIND.call(this, v, Helpers.months);
1387
1381
  if (typeof(ret) !== 'undefined') {
1388
1382
  this.date[1] = ret + 1;
1389
1383
  }
1390
1384
  },
1391
1385
  'MMM': function(v) {
1392
- let ret = parseMethods.FIND.call(this, v, months);
1386
+ let ret = parseMethods.FIND.call(this, v, Helpers.monthsShort);
1393
1387
  if (typeof(ret) !== 'undefined') {
1394
1388
  this.date[1] = ret + 1;
1395
1389
  }
@@ -1442,10 +1436,10 @@
1442
1436
  return parseMethods['MMM'].call(this, v);
1443
1437
  },
1444
1438
  'DDDD': function(v) {
1445
- return parseMethods.FIND.call(this, v, weekDaysFull);
1439
+ return parseMethods.FIND.call(this, v, Helpers.weekdays);
1446
1440
  },
1447
1441
  'DDD': function(v) {
1448
- return parseMethods.FIND.call(this, v, weekDays);
1442
+ return parseMethods.FIND.call(this, v, Helpers.weekdaysShort);
1449
1443
  },
1450
1444
  'DD': function(v, single) {
1451
1445
  const commit = () => {
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "javascript utilities"
20
20
  ],
21
21
  "main": "dist/index.js",
22
- "version": "6.0.2",
22
+ "version": "6.0.3",
23
23
  "bugs": "https://github.com/jsuites/jsuites/issues",
24
24
  "homepage": "https://github.com/jsuites/jsuites",
25
25
  "docs": "https://jsuites.net/",