@syncfusion/ej2-inputs 28.1.37 → 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.
- package/README.md +18 -8
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +23 -11
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +24 -11
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -9
- package/src/common/signature-base.d.ts +6 -4
- package/src/common/signature-base.js +6 -4
- package/src/form-validator/form-validator.d.ts +4 -0
- package/src/form-validator/form-validator.js +5 -4
- package/src/rating/rating-model.d.ts +1 -1
- package/src/rating/rating.js +14 -4
|
@@ -7784,7 +7784,8 @@ let FormValidator = FormValidator_1 = class FormValidator extends Base {
|
|
|
7784
7784
|
const currentRule = this.rules[`${name}`][`${rule}`];
|
|
7785
7785
|
const dateFormat = ((rule === 'min' || rule === 'max') && this.rules['' + name].date &&
|
|
7786
7786
|
typeof (this.rules['' + name].date) === 'string') ? this.rules['' + name].date : null;
|
|
7787
|
-
const args = { value: this.inputElement.value,
|
|
7787
|
+
const args = { value: this.inputElement.value,
|
|
7788
|
+
param: param, element: this.inputElement, formElement: this.element, format: dateFormat, culture: this.locale };
|
|
7788
7789
|
this.trigger('validationBegin', args);
|
|
7789
7790
|
if (!args.param && rule === 'required') {
|
|
7790
7791
|
return true;
|
|
@@ -7966,7 +7967,7 @@ FormValidator.checkValidator = {
|
|
|
7966
7967
|
},
|
|
7967
7968
|
date: (option) => {
|
|
7968
7969
|
if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
|
|
7969
|
-
const globalize = new Internationalization;
|
|
7970
|
+
const globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
|
|
7970
7971
|
const dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
7971
7972
|
const dateValue = globalize.parseDate(option.value, dateOptions);
|
|
7972
7973
|
return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
|
|
@@ -7982,7 +7983,7 @@ FormValidator.checkValidator = {
|
|
|
7982
7983
|
}
|
|
7983
7984
|
// Maximum rule validation for date
|
|
7984
7985
|
if (option.format && option.format !== '') {
|
|
7985
|
-
const globalize = new Internationalization;
|
|
7986
|
+
const globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
|
|
7986
7987
|
const dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
7987
7988
|
const dateValue = globalize.parseDate(option.value, dateOptions);
|
|
7988
7989
|
const maxValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
|
|
@@ -8004,7 +8005,7 @@ FormValidator.checkValidator = {
|
|
|
8004
8005
|
else {
|
|
8005
8006
|
// Minimum rule validation for date
|
|
8006
8007
|
if (option.format && option.format !== '') {
|
|
8007
|
-
const globalize = new Internationalization;
|
|
8008
|
+
const globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
|
|
8008
8009
|
const dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
8009
8010
|
const dateValue = globalize.parseDate(option.value, dateOptions);
|
|
8010
8011
|
const minValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
|
|
@@ -16287,11 +16288,13 @@ class SignatureBase extends Component {
|
|
|
16287
16288
|
return this.getBlob(this.canvasContext.canvas.toDataURL('image/png'));
|
|
16288
16289
|
}
|
|
16289
16290
|
/**
|
|
16290
|
-
*
|
|
16291
|
+
* Gets the signature as a Base 64 string.
|
|
16291
16292
|
*
|
|
16292
|
-
*
|
|
16293
|
-
*
|
|
16294
|
-
* @
|
|
16293
|
+
* This method is used to retrieve the current signature on the canvas as a Base 64-encoded string, in the specified image format.
|
|
16294
|
+
*
|
|
16295
|
+
* @param {SignatureFileType} [type] - Specifies the type of the image format.
|
|
16296
|
+
* Can be one of 'Png', 'Jpeg', or 'Svg'. If not specified, the default is 'Png'.
|
|
16297
|
+
* @returns {string} - Returns the Base 64 string of the signature in the specified format.
|
|
16295
16298
|
*/
|
|
16296
16299
|
getSignature(type) {
|
|
16297
16300
|
if (this.saveWithBackground && this.backgroundColor && !this.backgroundImage) {
|
|
@@ -16673,12 +16676,15 @@ let Rating = class Rating extends Component {
|
|
|
16673
16676
|
};
|
|
16674
16677
|
this.tooltipOpen = false;
|
|
16675
16678
|
this.isTouchSelected = false;
|
|
16679
|
+
if (closest(this.element, 'form') && this.element.getAttribute('value')) {
|
|
16680
|
+
this.setProperties({ value: this.element.getAttribute('value') }, true);
|
|
16681
|
+
}
|
|
16676
16682
|
}
|
|
16677
16683
|
render() {
|
|
16678
16684
|
this.initialize();
|
|
16679
16685
|
this.updateMinValue();
|
|
16680
16686
|
this.updateTemplateFunction();
|
|
16681
|
-
this.triggerChange(null, this.value, false);
|
|
16687
|
+
this.triggerChange(null, this.value, false, true);
|
|
16682
16688
|
this.renderItems();
|
|
16683
16689
|
this.displayLabel();
|
|
16684
16690
|
}
|
|
@@ -17039,7 +17045,8 @@ let Rating = class Rating extends Component {
|
|
|
17039
17045
|
this.updateItemValue();
|
|
17040
17046
|
this.updateLabel();
|
|
17041
17047
|
}
|
|
17042
|
-
triggerChange(e, val, isInteracted = true) {
|
|
17048
|
+
triggerChange(e, val, isInteracted = true, isInitial = false) {
|
|
17049
|
+
const ratingObj = this;
|
|
17043
17050
|
val = this.validateValue(val);
|
|
17044
17051
|
this.currentValue = val;
|
|
17045
17052
|
if (this.currentValue === this.value) {
|
|
@@ -17047,7 +17054,12 @@ let Rating = class Rating extends Component {
|
|
|
17047
17054
|
}
|
|
17048
17055
|
const eventArgs = { event: e, isInteracted: isInteracted, value: val, previousValue: this.value };
|
|
17049
17056
|
this.setProperties({ value: val }, true);
|
|
17050
|
-
this.
|
|
17057
|
+
if (this.isAngular && !isInitial) {
|
|
17058
|
+
ratingObj.localChange({ value: val });
|
|
17059
|
+
}
|
|
17060
|
+
if (!isInitial) {
|
|
17061
|
+
this.trigger('valueChanged', eventArgs);
|
|
17062
|
+
}
|
|
17051
17063
|
}
|
|
17052
17064
|
mouseMoveHandler(index, e) {
|
|
17053
17065
|
if (this.isTouchSelected) {
|