@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
|
@@ -7923,7 +7923,8 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
7923
7923
|
var currentRule = this.rules["" + name]["" + rule];
|
|
7924
7924
|
var dateFormat = ((rule === 'min' || rule === 'max') && this.rules['' + name].date &&
|
|
7925
7925
|
typeof (this.rules['' + name].date) === 'string') ? this.rules['' + name].date : null;
|
|
7926
|
-
var args = { value: this.inputElement.value,
|
|
7926
|
+
var args = { value: this.inputElement.value,
|
|
7927
|
+
param: param, element: this.inputElement, formElement: this.element, format: dateFormat, culture: this.locale };
|
|
7927
7928
|
this.trigger('validationBegin', args);
|
|
7928
7929
|
if (!args.param && rule === 'required') {
|
|
7929
7930
|
return true;
|
|
@@ -8105,7 +8106,7 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8105
8106
|
},
|
|
8106
8107
|
date: function (option) {
|
|
8107
8108
|
if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
|
|
8108
|
-
var globalize = new Internationalization;
|
|
8109
|
+
var globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
|
|
8109
8110
|
var dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
8110
8111
|
var dateValue = globalize.parseDate(option.value, dateOptions);
|
|
8111
8112
|
return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
|
|
@@ -8121,7 +8122,7 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8121
8122
|
}
|
|
8122
8123
|
// Maximum rule validation for date
|
|
8123
8124
|
if (option.format && option.format !== '') {
|
|
8124
|
-
var globalize = new Internationalization;
|
|
8125
|
+
var globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
|
|
8125
8126
|
var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
8126
8127
|
var dateValue = globalize.parseDate(option.value, dateOptions);
|
|
8127
8128
|
var maxValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
|
|
@@ -8143,7 +8144,7 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8143
8144
|
else {
|
|
8144
8145
|
// Minimum rule validation for date
|
|
8145
8146
|
if (option.format && option.format !== '') {
|
|
8146
|
-
var globalize = new Internationalization;
|
|
8147
|
+
var globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
|
|
8147
8148
|
var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
8148
8149
|
var dateValue = globalize.parseDate(option.value, dateOptions);
|
|
8149
8150
|
var minValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
|
|
@@ -16692,11 +16693,13 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
16692
16693
|
return this.getBlob(this.canvasContext.canvas.toDataURL('image/png'));
|
|
16693
16694
|
};
|
|
16694
16695
|
/**
|
|
16695
|
-
*
|
|
16696
|
+
* Gets the signature as a Base 64 string.
|
|
16696
16697
|
*
|
|
16697
|
-
*
|
|
16698
|
-
*
|
|
16699
|
-
* @
|
|
16698
|
+
* This method is used to retrieve the current signature on the canvas as a Base 64-encoded string, in the specified image format.
|
|
16699
|
+
*
|
|
16700
|
+
* @param {SignatureFileType} [type] - Specifies the type of the image format.
|
|
16701
|
+
* Can be one of 'Png', 'Jpeg', or 'Svg'. If not specified, the default is 'Png'.
|
|
16702
|
+
* @returns {string} - Returns the Base 64 string of the signature in the specified format.
|
|
16700
16703
|
*/
|
|
16701
16704
|
SignatureBase.prototype.getSignature = function (type) {
|
|
16702
16705
|
if (this.saveWithBackground && this.backgroundColor && !this.backgroundImage) {
|
|
@@ -17110,12 +17113,15 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
17110
17113
|
};
|
|
17111
17114
|
this.tooltipOpen = false;
|
|
17112
17115
|
this.isTouchSelected = false;
|
|
17116
|
+
if (closest(this.element, 'form') && this.element.getAttribute('value')) {
|
|
17117
|
+
this.setProperties({ value: this.element.getAttribute('value') }, true);
|
|
17118
|
+
}
|
|
17113
17119
|
};
|
|
17114
17120
|
Rating.prototype.render = function () {
|
|
17115
17121
|
this.initialize();
|
|
17116
17122
|
this.updateMinValue();
|
|
17117
17123
|
this.updateTemplateFunction();
|
|
17118
|
-
this.triggerChange(null, this.value, false);
|
|
17124
|
+
this.triggerChange(null, this.value, false, true);
|
|
17119
17125
|
this.renderItems();
|
|
17120
17126
|
this.displayLabel();
|
|
17121
17127
|
};
|
|
@@ -17482,8 +17488,10 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
17482
17488
|
this.updateItemValue();
|
|
17483
17489
|
this.updateLabel();
|
|
17484
17490
|
};
|
|
17485
|
-
Rating.prototype.triggerChange = function (e, val, isInteracted) {
|
|
17491
|
+
Rating.prototype.triggerChange = function (e, val, isInteracted, isInitial) {
|
|
17486
17492
|
if (isInteracted === void 0) { isInteracted = true; }
|
|
17493
|
+
if (isInitial === void 0) { isInitial = false; }
|
|
17494
|
+
var ratingObj = this;
|
|
17487
17495
|
val = this.validateValue(val);
|
|
17488
17496
|
this.currentValue = val;
|
|
17489
17497
|
if (this.currentValue === this.value) {
|
|
@@ -17491,7 +17499,12 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
17491
17499
|
}
|
|
17492
17500
|
var eventArgs = { event: e, isInteracted: isInteracted, value: val, previousValue: this.value };
|
|
17493
17501
|
this.setProperties({ value: val }, true);
|
|
17494
|
-
this.
|
|
17502
|
+
if (this.isAngular && !isInitial) {
|
|
17503
|
+
ratingObj.localChange({ value: val });
|
|
17504
|
+
}
|
|
17505
|
+
if (!isInitial) {
|
|
17506
|
+
this.trigger('valueChanged', eventArgs);
|
|
17507
|
+
}
|
|
17495
17508
|
};
|
|
17496
17509
|
Rating.prototype.mouseMoveHandler = function (index, e) {
|
|
17497
17510
|
if (this.isTouchSelected) {
|