@syncfusion/ej2-inputs 28.1.41 → 28.2.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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 28.1.41
3
+ * version : 28.2.3
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-inputs@*",
3
- "_id": "@syncfusion/ej2-inputs@28.1.37",
3
+ "_id": "@syncfusion/ej2-inputs@28.1.41",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-xq5ftk/1AS5NTv7Ahsu7g3lvfo+V7VO9Hj+sXwYGAdsBPTBZTUtNU3/Ra2mD6Kz/9u1cG6s/y2Yk9KafBqaCWw==",
5
+ "_integrity": "sha512-4k74kUvq3YKXX7DLthlC5VsIEEiKav4CLorKdyy3sbMkbGfy3kSt6UjPmDZfEsMJliSNI1YDjjKKF9/cWzxpvw==",
6
6
  "_location": "/@syncfusion/ej2-inputs",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -40,8 +40,8 @@
40
40
  "/@syncfusion/ej2-schedule",
41
41
  "/@syncfusion/ej2-vue-inputs"
42
42
  ],
43
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-inputs/-/ej2-inputs-28.1.37.tgz",
44
- "_shasum": "b5b652d54d2e1807a935a0b68977262115e98232",
43
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-inputs/-/ej2-inputs-28.1.41.tgz",
44
+ "_shasum": "0dd1806a0796c2c9519bf0c33f011c6d18e95a8e",
45
45
  "_spec": "@syncfusion/ej2-inputs@*",
46
46
  "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
47
47
  "author": {
@@ -49,10 +49,10 @@
49
49
  },
50
50
  "bundleDependencies": false,
51
51
  "dependencies": {
52
- "@syncfusion/ej2-base": "~28.1.33",
53
- "@syncfusion/ej2-buttons": "~28.1.39",
54
- "@syncfusion/ej2-popups": "~28.1.39",
55
- "@syncfusion/ej2-splitbuttons": "~28.1.41"
52
+ "@syncfusion/ej2-base": "~28.2.3",
53
+ "@syncfusion/ej2-buttons": "~28.2.3",
54
+ "@syncfusion/ej2-popups": "~28.2.3",
55
+ "@syncfusion/ej2-splitbuttons": "~28.2.3"
56
56
  },
57
57
  "deprecated": false,
58
58
  "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.",
@@ -120,7 +120,7 @@
120
120
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/inputs"
121
121
  },
122
122
  "typings": "index.d.ts",
123
- "version": "28.1.41",
123
+ "version": "28.2.3",
124
124
  "sideEffects": false,
125
125
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
126
126
  }
@@ -283,6 +283,10 @@ export interface ValidArgs {
283
283
  * Returns the date format mapped for the input.
284
284
  */
285
285
  format?: string;
286
+ /**
287
+ * Returns the culture for the input.
288
+ */
289
+ culture?: string;
286
290
  }
287
291
  export interface FormEventArgs {
288
292
  /**
@@ -651,7 +651,8 @@ var FormValidator = /** @class */ (function (_super) {
651
651
  var currentRule = this.rules["" + name]["" + rule];
652
652
  var dateFormat = ((rule === 'min' || rule === 'max') && this.rules['' + name].date &&
653
653
  typeof (this.rules['' + name].date) === 'string') ? this.rules['' + name].date : null;
654
- var args = { value: this.inputElement.value, param: param, element: this.inputElement, formElement: this.element, format: dateFormat };
654
+ var args = { value: this.inputElement.value,
655
+ param: param, element: this.inputElement, formElement: this.element, format: dateFormat, culture: this.locale };
655
656
  this.trigger('validationBegin', args);
656
657
  if (!args.param && rule === 'required') {
657
658
  return true;
@@ -833,7 +834,7 @@ var FormValidator = /** @class */ (function (_super) {
833
834
  },
834
835
  date: function (option) {
835
836
  if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
836
- var globalize = new Internationalization;
837
+ var globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
837
838
  var dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
838
839
  var dateValue = globalize.parseDate(option.value, dateOptions);
839
840
  return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
@@ -849,7 +850,7 @@ var FormValidator = /** @class */ (function (_super) {
849
850
  }
850
851
  // Maximum rule validation for date
851
852
  if (option.format && option.format !== '') {
852
- var globalize = new Internationalization;
853
+ var globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
853
854
  var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
854
855
  var dateValue = globalize.parseDate(option.value, dateOptions);
855
856
  var maxValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
@@ -871,7 +872,7 @@ var FormValidator = /** @class */ (function (_super) {
871
872
  else {
872
873
  // Minimum rule validation for date
873
874
  if (option.format && option.format !== '') {
874
- var globalize = new Internationalization;
875
+ var globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
875
876
  var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
876
877
  var dateValue = globalize.parseDate(option.value, dateOptions);
877
878
  var minValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
@@ -1,4 +1,4 @@
1
- import { addClass, Event, attributes, BaseEventArgs, compile, Component, EmitType, EventHandler, getUniqueID, INotifyPropertyChanged, select, Browser, append } from '@syncfusion/ej2-base';import { isNullOrUndefined, KeyboardEventArgs, KeyboardEvents, MouseEventArgs, NotifyPropertyChanges, Property, remove, removeClass, initializeCSPTemplate } from '@syncfusion/ej2-base';import { Tooltip } from '@syncfusion/ej2-popups';
1
+ import { addClass, Event, attributes, BaseEventArgs, compile, Component, EmitType, EventHandler, getUniqueID, INotifyPropertyChanged, select, Browser, append } from '@syncfusion/ej2-base';import { isNullOrUndefined, KeyboardEventArgs, KeyboardEvents, MouseEventArgs, NotifyPropertyChanges, Property, remove, removeClass, initializeCSPTemplate, closest } from '@syncfusion/ej2-base';import { Tooltip } from '@syncfusion/ej2-popups';
2
2
  import {LabelPosition,PrecisionType,RatingItemEventArgs,RatingHoverEventArgs,RatingChangedEventArgs} from "./rating";
3
3
  import {ComponentModel} from '@syncfusion/ej2-base';
4
4
 
@@ -18,7 +18,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
18
18
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19
19
  };
20
20
  import { addClass, Event, attributes, compile, Component, EventHandler, getUniqueID, select, Browser, append } from '@syncfusion/ej2-base';
21
- import { isNullOrUndefined, KeyboardEvents, NotifyPropertyChanges, Property, remove, removeClass, initializeCSPTemplate } from '@syncfusion/ej2-base';
21
+ import { isNullOrUndefined, KeyboardEvents, NotifyPropertyChanges, Property, remove, removeClass, initializeCSPTemplate, closest } from '@syncfusion/ej2-base';
22
22
  import { Tooltip } from '@syncfusion/ej2-popups';
23
23
  var ICONCSS = 'e-rating-icon e-icons e-star-filled';
24
24
  var ITEMLIST = 'e-rating-item-list';
@@ -121,12 +121,15 @@ var Rating = /** @class */ (function (_super) {
121
121
  };
122
122
  this.tooltipOpen = false;
123
123
  this.isTouchSelected = false;
124
+ if (closest(this.element, 'form') && this.element.getAttribute('value')) {
125
+ this.setProperties({ value: this.element.getAttribute('value') }, true);
126
+ }
124
127
  };
125
128
  Rating.prototype.render = function () {
126
129
  this.initialize();
127
130
  this.updateMinValue();
128
131
  this.updateTemplateFunction();
129
- this.triggerChange(null, this.value, false);
132
+ this.triggerChange(null, this.value, false, true);
130
133
  this.renderItems();
131
134
  this.displayLabel();
132
135
  };
@@ -493,8 +496,10 @@ var Rating = /** @class */ (function (_super) {
493
496
  this.updateItemValue();
494
497
  this.updateLabel();
495
498
  };
496
- Rating.prototype.triggerChange = function (e, val, isInteracted) {
499
+ Rating.prototype.triggerChange = function (e, val, isInteracted, isInitial) {
497
500
  if (isInteracted === void 0) { isInteracted = true; }
501
+ if (isInitial === void 0) { isInitial = false; }
502
+ var ratingObj = null || this;
498
503
  val = this.validateValue(val);
499
504
  this.currentValue = val;
500
505
  if (this.currentValue === this.value) {
@@ -502,7 +507,12 @@ var Rating = /** @class */ (function (_super) {
502
507
  }
503
508
  var eventArgs = { event: e, isInteracted: isInteracted, value: val, previousValue: this.value };
504
509
  this.setProperties({ value: val }, true);
505
- this.trigger('valueChanged', eventArgs);
510
+ if (this.isAngular && !isInitial) {
511
+ ratingObj.localChange({ value: val });
512
+ }
513
+ if (!isInitial) {
514
+ this.trigger('valueChanged', eventArgs);
515
+ }
506
516
  };
507
517
  Rating.prototype.mouseMoveHandler = function (index, e) {
508
518
  if (this.isTouchSelected) {