@syncfusion/ej2-inputs 31.1.21 → 31.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.
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 31.1.21
4
- * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
3
+ * version : 31.1.22
4
+ * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-inputs",
3
- "version": "31.1.21",
3
+ "version": "31.1.22",
4
4
  "description": "A package of Essential JS 2 input components such as Textbox, Color-picker, Masked-textbox, Numeric-textbox, Slider, Upload, and Form-validator that is used to get input from the users.",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,7 +8,7 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-inputs.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~31.1.20",
11
+ "@syncfusion/ej2-base": "~31.1.22",
12
12
  "@syncfusion/ej2-buttons": "~31.1.21",
13
13
  "@syncfusion/ej2-popups": "~31.1.20",
14
14
  "@syncfusion/ej2-splitbuttons": "~31.1.17"
@@ -1302,14 +1302,32 @@ var ColorPicker = /** @class */ (function (_super) {
1302
1302
  switch (!e.altKey && e.keyCode) {
1303
1303
  case 39:
1304
1304
  e.preventDefault();
1305
- selectedEle = prevSelectedEle ? tiles[this.tilePosition(tiles, prevSelectedEle, this.enableRtl ? -1 : 1)]
1306
- : tiles[this.enableRtl ? tiles.length - 1 : 0];
1305
+ if (prevSelectedEle && ((!this.enableRtl && tiles.indexOf(prevSelectedEle) === tiles.length - 1)
1306
+ || (this.enableRtl && tiles.indexOf(prevSelectedEle) === 0))) {
1307
+ idx = this.enableRtl ? tiles.length - 1 : 0;
1308
+ }
1309
+ else {
1310
+ idx = prevSelectedEle ? this.tilePosition(tiles, prevSelectedEle, this.enableRtl ? -1 : 1)
1311
+ : (this.enableRtl ? tiles.length - 1 : 0);
1312
+ }
1313
+ if (tiles[idx]) {
1314
+ selectedEle = tiles[idx];
1315
+ }
1307
1316
  this.keySelectionChanges(selectedEle);
1308
1317
  break;
1309
1318
  case 37:
1310
1319
  e.preventDefault();
1311
- selectedEle = prevSelectedEle ? tiles[this.tilePosition(tiles, prevSelectedEle, this.enableRtl ? 1 : -1)]
1312
- : tiles[this.enableRtl ? 0 : tiles.length - 1];
1320
+ if (prevSelectedEle && ((!this.enableRtl && tiles.indexOf(prevSelectedEle) === 0)
1321
+ || (this.enableRtl && tiles.indexOf(prevSelectedEle) === tiles.length - 1))) {
1322
+ idx = this.enableRtl ? 0 : tiles.length - 1;
1323
+ }
1324
+ else {
1325
+ idx = prevSelectedEle ? this.tilePosition(tiles, prevSelectedEle, this.enableRtl ? 1 : -1)
1326
+ : (this.enableRtl ? 0 : tiles.length - 1);
1327
+ }
1328
+ if (tiles[idx]) {
1329
+ selectedEle = tiles[idx];
1330
+ }
1313
1331
  this.keySelectionChanges(selectedEle);
1314
1332
  break;
1315
1333
  case 38:
@@ -562,6 +562,7 @@ export declare class Slider extends Component<HTMLElement> implements INotifyPro
562
562
  private setCSSClass;
563
563
  private setEnabled;
564
564
  private getTheme;
565
+ private secureRandom;
565
566
  /**
566
567
  * Initialize the rendering
567
568
  *
@@ -357,6 +357,11 @@ var Slider = /** @class */ (function (_super) {
357
357
  var theme = window.getComputedStyle(container, ':after').getPropertyValue('content');
358
358
  return theme.replace(/['"]+/g, '');
359
359
  };
360
+ Slider.prototype.secureRandom = function () {
361
+ var array = new Uint32Array(1);
362
+ window.crypto.getRandomValues(array);
363
+ return array[0] / (0xFFFFFFFF + 1);
364
+ };
360
365
  /**
361
366
  * Initialize the rendering
362
367
  *
@@ -382,7 +387,7 @@ var Slider = /** @class */ (function (_super) {
382
387
  attrs: {
383
388
  type: 'hidden', value: (isNullOrUndefined(this.value) ? (isNullOrUndefined(this.min) ? '0' : this.min.toString()) : this.value.toString()),
384
389
  name: this.element.getAttribute('name') || this.element.getAttribute('id') ||
385
- '_' + (Math.random() * 1000).toFixed(0) + 'slider', class: classNames.sliderHiddenInput
390
+ '_' + (this.secureRandom() * 1000).toFixed(0) + 'slider', class: classNames.sliderHiddenInput
386
391
  }
387
392
  }));
388
393
  this.hiddenInput.tabIndex = -1;