jsuites 5.7.2 → 5.8.0

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 CHANGED
@@ -1,3 +1,8 @@
1
+ # 5.8.0
2
+
3
+ - Added a strict argument for mask rendering (default: true).
4
+ - Enabled list validation for ranges.
5
+
1
6
  # 5.6.5
2
7
 
3
8
  - Translate calendar strings;
package/dist/jsuites.js CHANGED
@@ -2827,7 +2827,7 @@ function Mask() {
2827
2827
  /**
2828
2828
  * Render
2829
2829
  */
2830
- obj.render = function(value, options, fullMask) {
2830
+ obj.render = function(value, options, fullMask, strict) {
2831
2831
  if (isBlank(value)) {
2832
2832
  return value;
2833
2833
  }
@@ -2989,6 +2989,10 @@ function Mask() {
2989
2989
  }
2990
2990
  }
2991
2991
 
2992
+ if (type === 'numeric' && strict === false && typeof(value) === 'string') {
2993
+ return value;
2994
+ }
2995
+
2992
2996
  value = obj(value, options);
2993
2997
 
2994
2998
  // Numeric mask, number of zeros
@@ -3381,7 +3385,9 @@ function Calendar() {
3381
3385
  calendarControlsUpdateButton.innerHTML = obj.options.textUpdate;
3382
3386
 
3383
3387
  // Define mask
3384
- el.setAttribute('data-mask', obj.options.format.toLowerCase());
3388
+ if (obj.options.format) {
3389
+ el.setAttribute('data-mask', obj.options.format.toLowerCase());
3390
+ }
3385
3391
 
3386
3392
  // Value
3387
3393
  if (!obj.options.value && obj.options.today) {
@@ -10066,7 +10072,11 @@ function Validations() {
10066
10072
  }
10067
10073
  let list;
10068
10074
  if (typeof(options.value[0]) === 'string') {
10069
- list = options.value[0].split(',');
10075
+ if (options.source) {
10076
+ list = options.source;
10077
+ } else {
10078
+ list = options.value[0].split(',');
10079
+ }
10070
10080
  } else {
10071
10081
  list = options.value[0];
10072
10082
  }
@@ -12851,7 +12861,7 @@ var jsuites_jSuites = {
12851
12861
  ...dictionary,
12852
12862
  ...helpers,
12853
12863
  /** Current version */
12854
- version: '5.7.1',
12864
+ version: '5.8.0',
12855
12865
  /** Bind new extensions to Jsuites */
12856
12866
  setExtensions: function(o) {
12857
12867
  if (typeof(o) == 'object') {
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "main": "dist/jsuites.js",
28
28
  "types": "dist/jsuites.d.ts",
29
- "version": "5.7.2",
29
+ "version": "5.8.0",
30
30
  "bugs": "https://github.com/jsuites/jsuites/issues",
31
31
  "homepage": "https://github.com/jsuites/jsuites",
32
32
  "docs": "https://jsuites.net",