@progress/kendo-angular-inputs 8.0.8 → 8.0.9-dev.202203231216
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/dist/cdn/js/kendo-angular-inputs.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/maskedtextbox/maskedtextbox.component.js +48 -44
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rangeslider/rangeslider.component.js +9 -5
- package/dist/es/shared/utils.js +3 -2
- package/dist/es/textarea/textarea-suffix.component.js +1 -2
- package/dist/es/textbox/textbox-suffix.directive.js +0 -1
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.d.ts +5 -4
- package/dist/es2015/maskedtextbox/maskedtextbox.component.js +45 -41
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/rangeslider/rangeslider.component.js +9 -5
- package/dist/es2015/shared/utils.js +3 -2
- package/dist/es2015/textarea/textarea-suffix.component.d.ts +1 -2
- package/dist/es2015/textarea/textarea-suffix.component.js +2 -4
- package/dist/es2015/textbox/textbox-suffix.directive.d.ts +0 -1
- package/dist/es2015/textbox/textbox-suffix.directive.js +0 -1
- package/dist/fesm2015/index.js +59 -53
- package/dist/fesm5/index.js +61 -54
- package/dist/npm/maskedtextbox/maskedtextbox.component.js +48 -44
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rangeslider/rangeslider.component.js +9 -5
- package/dist/npm/shared/utils.js +3 -2
- package/dist/npm/textarea/textarea-suffix.component.js +1 -2
- package/dist/npm/textbox/textbox-suffix.directive.js +0 -1
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +1 -1
package/dist/fesm5/index.js
CHANGED
|
@@ -514,7 +514,7 @@ var packageMetadata = {
|
|
|
514
514
|
name: '@progress/kendo-angular-inputs',
|
|
515
515
|
productName: 'Kendo UI for Angular',
|
|
516
516
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
517
|
-
publishDate:
|
|
517
|
+
publishDate: 1648037581,
|
|
518
518
|
version: '',
|
|
519
519
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
520
520
|
};
|
|
@@ -1598,9 +1598,13 @@ var RangeSliderComponent = /** @class */ (function (_super) {
|
|
|
1598
1598
|
var lastCoords = this.draggedHandle.getBoundingClientRect();
|
|
1599
1599
|
this.lastHandlePosition = { x: lastCoords.left, y: lastCoords.top };
|
|
1600
1600
|
this.dragging = { value: true, target: target };
|
|
1601
|
-
var
|
|
1602
|
-
|
|
1603
|
-
|
|
1601
|
+
var mousePos = {
|
|
1602
|
+
x: (args.pageX - 0.5) - (lastCoords.width / 2),
|
|
1603
|
+
y: (args.pageY - (lastCoords.width / 2))
|
|
1604
|
+
};
|
|
1605
|
+
var left = mousePos.x < this.lastHandlePosition.x;
|
|
1606
|
+
var right = mousePos.x > this.lastHandlePosition.x;
|
|
1607
|
+
var up = mousePos.y > this.lastHandlePosition.y;
|
|
1604
1608
|
var moveStartHandle = function () { return _this.changeValue([eventValue(args, _this.track.nativeElement, _this.getProps()), _this.value[1]]); };
|
|
1605
1609
|
var moveEndHandle = function () { return _this.changeValue([_this.value[0], eventValue(args, _this.track.nativeElement, _this.getProps())]); };
|
|
1606
1610
|
var moveBothHandles = function () { return _this.changeValue([eventValue(args, _this.track.nativeElement, _this.getProps()), eventValue(args, _this.track.nativeElement, _this.getProps())]); };
|
|
@@ -1608,8 +1612,8 @@ var RangeSliderComponent = /** @class */ (function (_super) {
|
|
|
1608
1612
|
var vertical = this.vertical;
|
|
1609
1613
|
var horizontal = !vertical;
|
|
1610
1614
|
var forward = (vertical && up) || (this.reverse ? horizontal && right : horizontal && left);
|
|
1611
|
-
|
|
1612
|
-
if (this.value[0] === this.value[1]) {
|
|
1615
|
+
var incorrectValueState = this.value[0] > this.value[1];
|
|
1616
|
+
if (this.value[0] === this.value[1] || incorrectValueState) {
|
|
1613
1617
|
if (forward) {
|
|
1614
1618
|
activeStartHandle ? moveStartHandle() : moveBothHandles();
|
|
1615
1619
|
}
|
|
@@ -4514,7 +4518,6 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4514
4518
|
* Determines whether the MaskedTextBox is in its read-only state ([see example]({% slug readonly_maskedtextbox %})).
|
|
4515
4519
|
*/
|
|
4516
4520
|
this.readonly = false;
|
|
4517
|
-
this.hostClasses = true;
|
|
4518
4521
|
/**
|
|
4519
4522
|
* Represents a prompt character for the masked value.
|
|
4520
4523
|
* @default `_`
|
|
@@ -4590,6 +4593,7 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4590
4593
|
* Fires each time the value changes.
|
|
4591
4594
|
*/
|
|
4592
4595
|
this.valueChange = new EventEmitter();
|
|
4596
|
+
this.hostClasses = true;
|
|
4593
4597
|
this.focusClick = false;
|
|
4594
4598
|
this.defaultRules = {
|
|
4595
4599
|
"#": /[\d\s\+\-]/,
|
|
@@ -4720,20 +4724,13 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4720
4724
|
enumerable: true,
|
|
4721
4725
|
configurable: true
|
|
4722
4726
|
});
|
|
4723
|
-
Object.defineProperty(MaskedTextBoxComponent.prototype, "
|
|
4727
|
+
Object.defineProperty(MaskedTextBoxComponent.prototype, "rules", {
|
|
4724
4728
|
get: function () {
|
|
4725
|
-
return this.
|
|
4729
|
+
return this._rules || this.defaultRules;
|
|
4726
4730
|
},
|
|
4727
|
-
enumerable: true,
|
|
4728
|
-
configurable: true
|
|
4729
|
-
});
|
|
4730
|
-
Object.defineProperty(MaskedTextBoxComponent.prototype, "rules", {
|
|
4731
4731
|
/**
|
|
4732
4732
|
* Exposes the RegExp-based mask validation array ([see example]({% slug masks_maskedtextbox %})).
|
|
4733
4733
|
*/
|
|
4734
|
-
get: function () {
|
|
4735
|
-
return this._rules || this.defaultRules;
|
|
4736
|
-
},
|
|
4737
4734
|
set: function (value) {
|
|
4738
4735
|
this._rules = Object.assign({}, this.defaultRules, value);
|
|
4739
4736
|
},
|
|
@@ -4753,6 +4750,13 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4753
4750
|
enumerable: true,
|
|
4754
4751
|
configurable: true
|
|
4755
4752
|
});
|
|
4753
|
+
Object.defineProperty(MaskedTextBoxComponent.prototype, "hostDisabledClass", {
|
|
4754
|
+
get: function () {
|
|
4755
|
+
return this.disabled;
|
|
4756
|
+
},
|
|
4757
|
+
enumerable: true,
|
|
4758
|
+
configurable: true
|
|
4759
|
+
});
|
|
4756
4760
|
MaskedTextBoxComponent.prototype.ngOnInit = function () {
|
|
4757
4761
|
if (this.hostElement) {
|
|
4758
4762
|
this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
|
|
@@ -4830,7 +4834,7 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4830
4834
|
var value = e.target.value;
|
|
4831
4835
|
var _a = this.selection, start = _a[0], end = _a[1];
|
|
4832
4836
|
if (!this.mask) {
|
|
4833
|
-
this.
|
|
4837
|
+
this.updateValueWithEvents(value);
|
|
4834
4838
|
this.isPasted = false;
|
|
4835
4839
|
return;
|
|
4836
4840
|
}
|
|
@@ -4842,10 +4846,10 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4842
4846
|
result = this.service.maskInRange(value.slice(start, to), this.maskedValue, start, end);
|
|
4843
4847
|
}
|
|
4844
4848
|
else {
|
|
4845
|
-
result = this.service.maskInput(value, this.maskedValue, e.target.selectionStart);
|
|
4849
|
+
result = this.service.maskInput(value, this.maskedValue || '', e.target.selectionStart);
|
|
4846
4850
|
}
|
|
4847
4851
|
this.updateInput(result.value, result.selection);
|
|
4848
|
-
this.
|
|
4852
|
+
this.updateValueWithEvents(result.value);
|
|
4849
4853
|
};
|
|
4850
4854
|
/**
|
|
4851
4855
|
* @hidden
|
|
@@ -4861,20 +4865,13 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4861
4865
|
}
|
|
4862
4866
|
var next = this.extractChanges(changes);
|
|
4863
4867
|
this.updateService(next);
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
this.updateInput(maskedValue);
|
|
4868
|
-
}
|
|
4869
|
-
}
|
|
4870
|
-
else if (anyChanged(['promptPlaceholder', 'includeLiterals'], changes)) {
|
|
4868
|
+
var maskedValue = this.service.maskRaw(this.value);
|
|
4869
|
+
this.updateInput(maskedValue, null, true);
|
|
4870
|
+
if (changes.includeLiterals || isChanged('promptPlaceholder', changes)) {
|
|
4871
4871
|
resolvedPromise.then(function () {
|
|
4872
|
-
_this.
|
|
4872
|
+
_this.updateValueWithEvents(_this.maskedValue);
|
|
4873
4873
|
});
|
|
4874
4874
|
}
|
|
4875
|
-
else {
|
|
4876
|
-
this.updateInput(this.service.maskRaw(this.value));
|
|
4877
|
-
}
|
|
4878
4875
|
};
|
|
4879
4876
|
/**
|
|
4880
4877
|
* @hidden
|
|
@@ -4883,6 +4880,9 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4883
4880
|
MaskedTextBoxComponent.prototype.writeValue = function (value) {
|
|
4884
4881
|
this.value = this.normalizeValue(value);
|
|
4885
4882
|
this.updateInput(this.service.maskRaw(this.value));
|
|
4883
|
+
if (this.includeLiterals) {
|
|
4884
|
+
this.updateValue(this.maskedValue);
|
|
4885
|
+
}
|
|
4886
4886
|
};
|
|
4887
4887
|
/**
|
|
4888
4888
|
* @hidden
|
|
@@ -4933,18 +4933,26 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4933
4933
|
/**
|
|
4934
4934
|
* @hidden
|
|
4935
4935
|
*/
|
|
4936
|
-
MaskedTextBoxComponent.prototype.
|
|
4937
|
-
|
|
4936
|
+
MaskedTextBoxComponent.prototype.updateValueWithEvents = function (maskedValue) {
|
|
4937
|
+
this.updateValue(maskedValue);
|
|
4938
|
+
if (hasObservers(this.valueChange)) {
|
|
4939
|
+
this.valueChange.emit(this.value);
|
|
4940
|
+
}
|
|
4941
|
+
};
|
|
4942
|
+
MaskedTextBoxComponent.prototype.updateValue = function (value) {
|
|
4943
|
+
if (this.mask && !this.service.validationValue(value) && !this.includeLiterals) {
|
|
4938
4944
|
this.value = '';
|
|
4939
4945
|
}
|
|
4940
4946
|
else {
|
|
4941
|
-
this.value = this.service.rawValue(
|
|
4947
|
+
this.value = this.service.rawValue(value);
|
|
4942
4948
|
}
|
|
4943
4949
|
this.onChange(this.value);
|
|
4944
|
-
this.valueChange.emit(this.value);
|
|
4945
4950
|
};
|
|
4946
|
-
MaskedTextBoxComponent.prototype.updateInput = function (maskedValue, selection) {
|
|
4951
|
+
MaskedTextBoxComponent.prototype.updateInput = function (maskedValue, selection, isFromOnChanges) {
|
|
4947
4952
|
if (maskedValue === void 0) { maskedValue = ''; }
|
|
4953
|
+
if (isFromOnChanges && maskedValue === this.maskedValue) {
|
|
4954
|
+
return;
|
|
4955
|
+
}
|
|
4948
4956
|
this.maskedValue = maskedValue;
|
|
4949
4957
|
var value = this.maskOnFocus && !this.focused && this.emptyMask ? '' : maskedValue;
|
|
4950
4958
|
this.renderer.setProperty(this.input.nativeElement, "value", value);
|
|
@@ -5062,20 +5070,6 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
5062
5070
|
__metadata("design:type", String),
|
|
5063
5071
|
__metadata("design:paramtypes", [String])
|
|
5064
5072
|
], MaskedTextBoxComponent.prototype, "fillMode", null);
|
|
5065
|
-
__decorate([
|
|
5066
|
-
HostBinding('attr.dir'),
|
|
5067
|
-
__metadata("design:type", String)
|
|
5068
|
-
], MaskedTextBoxComponent.prototype, "direction", void 0);
|
|
5069
|
-
__decorate([
|
|
5070
|
-
HostBinding('class.k-input'),
|
|
5071
|
-
HostBinding('class.k-maskedtextbox'),
|
|
5072
|
-
__metadata("design:type", Boolean)
|
|
5073
|
-
], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
|
|
5074
|
-
__decorate([
|
|
5075
|
-
HostBinding('class.k-disabled'),
|
|
5076
|
-
__metadata("design:type", Boolean),
|
|
5077
|
-
__metadata("design:paramtypes", [])
|
|
5078
|
-
], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
|
|
5079
5073
|
__decorate([
|
|
5080
5074
|
Input(),
|
|
5081
5075
|
__metadata("design:type", String)
|
|
@@ -5130,6 +5124,20 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
5130
5124
|
Output(),
|
|
5131
5125
|
__metadata("design:type", EventEmitter)
|
|
5132
5126
|
], MaskedTextBoxComponent.prototype, "valueChange", void 0);
|
|
5127
|
+
__decorate([
|
|
5128
|
+
HostBinding('attr.dir'),
|
|
5129
|
+
__metadata("design:type", String)
|
|
5130
|
+
], MaskedTextBoxComponent.prototype, "direction", void 0);
|
|
5131
|
+
__decorate([
|
|
5132
|
+
HostBinding('class.k-input'),
|
|
5133
|
+
HostBinding('class.k-maskedtextbox'),
|
|
5134
|
+
__metadata("design:type", Boolean)
|
|
5135
|
+
], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
|
|
5136
|
+
__decorate([
|
|
5137
|
+
HostBinding('class.k-disabled'),
|
|
5138
|
+
__metadata("design:type", Boolean),
|
|
5139
|
+
__metadata("design:paramtypes", [])
|
|
5140
|
+
], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
|
|
5133
5141
|
__decorate([
|
|
5134
5142
|
ViewChild('input', { static: true }),
|
|
5135
5143
|
__metadata("design:type", ElementRef)
|
|
@@ -5836,8 +5844,9 @@ var MaskedTextBoxModule = /** @class */ (function () {
|
|
|
5836
5844
|
* Returns true if the used browser is Safari.
|
|
5837
5845
|
*/
|
|
5838
5846
|
var isSafari = function (userAgent) {
|
|
5839
|
-
|
|
5840
|
-
|
|
5847
|
+
var desktopBrowser = detectDesktopBrowser(userAgent);
|
|
5848
|
+
var mobileOS$$1 = detectMobileOS(userAgent);
|
|
5849
|
+
return (desktopBrowser && desktopBrowser.safari) || (mobileOS$$1 && mobileOS$$1.browser === 'mobilesafari');
|
|
5841
5850
|
};
|
|
5842
5851
|
/**
|
|
5843
5852
|
* @hidden
|
|
@@ -5851,7 +5860,6 @@ var isJapanese = function (input) {
|
|
|
5851
5860
|
|
|
5852
5861
|
/**
|
|
5853
5862
|
* Specifies the adornments in the suffix container ([see examples]({% slug adornments_textbox %}#toc-suffixadornments)).
|
|
5854
|
-
* @example
|
|
5855
5863
|
* ```ts-no-run
|
|
5856
5864
|
* _@Component({
|
|
5857
5865
|
* selector: 'my-app',
|
|
@@ -7569,8 +7577,7 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7569
7577
|
}(TextFieldsBase));
|
|
7570
7578
|
|
|
7571
7579
|
/**
|
|
7572
|
-
* Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %}).
|
|
7573
|
-
* @example
|
|
7580
|
+
* Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %})).
|
|
7574
7581
|
* ```ts-no-run
|
|
7575
7582
|
* _@Component({
|
|
7576
7583
|
* selector: 'my-app',
|
|
@@ -7,11 +7,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
9
|
var forms_1 = require("@angular/forms");
|
|
10
|
+
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
10
11
|
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
11
12
|
var kendo_licensing_1 = require("@progress/kendo-licensing");
|
|
12
13
|
var package_metadata_1 = require("../package-metadata");
|
|
13
14
|
var masking_service_1 = require("./masking.service");
|
|
14
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
15
15
|
var dom_utils_1 = require("../common/dom-utils");
|
|
16
16
|
var utils_1 = require("../common/utils");
|
|
17
17
|
var resolvedPromise = Promise.resolve(null);
|
|
@@ -59,7 +59,6 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
59
59
|
* Determines whether the MaskedTextBox is in its read-only state ([see example]({% slug readonly_maskedtextbox %})).
|
|
60
60
|
*/
|
|
61
61
|
this.readonly = false;
|
|
62
|
-
this.hostClasses = true;
|
|
63
62
|
/**
|
|
64
63
|
* Represents a prompt character for the masked value.
|
|
65
64
|
* @default `_`
|
|
@@ -135,6 +134,7 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
135
134
|
* Fires each time the value changes.
|
|
136
135
|
*/
|
|
137
136
|
this.valueChange = new core_1.EventEmitter();
|
|
137
|
+
this.hostClasses = true;
|
|
138
138
|
this.focusClick = false;
|
|
139
139
|
this.defaultRules = {
|
|
140
140
|
"#": /[\d\s\+\-]/,
|
|
@@ -265,20 +265,13 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
265
265
|
enumerable: true,
|
|
266
266
|
configurable: true
|
|
267
267
|
});
|
|
268
|
-
Object.defineProperty(MaskedTextBoxComponent.prototype, "
|
|
268
|
+
Object.defineProperty(MaskedTextBoxComponent.prototype, "rules", {
|
|
269
269
|
get: function () {
|
|
270
|
-
return this.
|
|
270
|
+
return this._rules || this.defaultRules;
|
|
271
271
|
},
|
|
272
|
-
enumerable: true,
|
|
273
|
-
configurable: true
|
|
274
|
-
});
|
|
275
|
-
Object.defineProperty(MaskedTextBoxComponent.prototype, "rules", {
|
|
276
272
|
/**
|
|
277
273
|
* Exposes the RegExp-based mask validation array ([see example]({% slug masks_maskedtextbox %})).
|
|
278
274
|
*/
|
|
279
|
-
get: function () {
|
|
280
|
-
return this._rules || this.defaultRules;
|
|
281
|
-
},
|
|
282
275
|
set: function (value) {
|
|
283
276
|
this._rules = Object.assign({}, this.defaultRules, value);
|
|
284
277
|
},
|
|
@@ -298,6 +291,13 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
298
291
|
enumerable: true,
|
|
299
292
|
configurable: true
|
|
300
293
|
});
|
|
294
|
+
Object.defineProperty(MaskedTextBoxComponent.prototype, "hostDisabledClass", {
|
|
295
|
+
get: function () {
|
|
296
|
+
return this.disabled;
|
|
297
|
+
},
|
|
298
|
+
enumerable: true,
|
|
299
|
+
configurable: true
|
|
300
|
+
});
|
|
301
301
|
MaskedTextBoxComponent.prototype.ngOnInit = function () {
|
|
302
302
|
if (this.hostElement) {
|
|
303
303
|
this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
|
|
@@ -375,7 +375,7 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
375
375
|
var value = e.target.value;
|
|
376
376
|
var _a = this.selection, start = _a[0], end = _a[1];
|
|
377
377
|
if (!this.mask) {
|
|
378
|
-
this.
|
|
378
|
+
this.updateValueWithEvents(value);
|
|
379
379
|
this.isPasted = false;
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
@@ -387,10 +387,10 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
387
387
|
result = this.service.maskInRange(value.slice(start, to), this.maskedValue, start, end);
|
|
388
388
|
}
|
|
389
389
|
else {
|
|
390
|
-
result = this.service.maskInput(value, this.maskedValue, e.target.selectionStart);
|
|
390
|
+
result = this.service.maskInput(value, this.maskedValue || '', e.target.selectionStart);
|
|
391
391
|
}
|
|
392
392
|
this.updateInput(result.value, result.selection);
|
|
393
|
-
this.
|
|
393
|
+
this.updateValueWithEvents(result.value);
|
|
394
394
|
};
|
|
395
395
|
/**
|
|
396
396
|
* @hidden
|
|
@@ -406,20 +406,13 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
406
406
|
}
|
|
407
407
|
var next = this.extractChanges(changes);
|
|
408
408
|
this.updateService(next);
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
this.updateInput(maskedValue);
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
else if (kendo_angular_common_1.anyChanged(['promptPlaceholder', 'includeLiterals'], changes)) {
|
|
409
|
+
var maskedValue = this.service.maskRaw(this.value);
|
|
410
|
+
this.updateInput(maskedValue, null, true);
|
|
411
|
+
if (changes.includeLiterals || kendo_angular_common_1.isChanged('promptPlaceholder', changes)) {
|
|
416
412
|
resolvedPromise.then(function () {
|
|
417
|
-
_this.
|
|
413
|
+
_this.updateValueWithEvents(_this.maskedValue);
|
|
418
414
|
});
|
|
419
415
|
}
|
|
420
|
-
else {
|
|
421
|
-
this.updateInput(this.service.maskRaw(this.value));
|
|
422
|
-
}
|
|
423
416
|
};
|
|
424
417
|
/**
|
|
425
418
|
* @hidden
|
|
@@ -428,6 +421,9 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
428
421
|
MaskedTextBoxComponent.prototype.writeValue = function (value) {
|
|
429
422
|
this.value = this.normalizeValue(value);
|
|
430
423
|
this.updateInput(this.service.maskRaw(this.value));
|
|
424
|
+
if (this.includeLiterals) {
|
|
425
|
+
this.updateValue(this.maskedValue);
|
|
426
|
+
}
|
|
431
427
|
};
|
|
432
428
|
/**
|
|
433
429
|
* @hidden
|
|
@@ -478,18 +474,26 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
478
474
|
/**
|
|
479
475
|
* @hidden
|
|
480
476
|
*/
|
|
481
|
-
MaskedTextBoxComponent.prototype.
|
|
482
|
-
|
|
477
|
+
MaskedTextBoxComponent.prototype.updateValueWithEvents = function (maskedValue) {
|
|
478
|
+
this.updateValue(maskedValue);
|
|
479
|
+
if (kendo_angular_common_1.hasObservers(this.valueChange)) {
|
|
480
|
+
this.valueChange.emit(this.value);
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
MaskedTextBoxComponent.prototype.updateValue = function (value) {
|
|
484
|
+
if (this.mask && !this.service.validationValue(value) && !this.includeLiterals) {
|
|
483
485
|
this.value = '';
|
|
484
486
|
}
|
|
485
487
|
else {
|
|
486
|
-
this.value = this.service.rawValue(
|
|
488
|
+
this.value = this.service.rawValue(value);
|
|
487
489
|
}
|
|
488
490
|
this.onChange(this.value);
|
|
489
|
-
this.valueChange.emit(this.value);
|
|
490
491
|
};
|
|
491
|
-
MaskedTextBoxComponent.prototype.updateInput = function (maskedValue, selection) {
|
|
492
|
+
MaskedTextBoxComponent.prototype.updateInput = function (maskedValue, selection, isFromOnChanges) {
|
|
492
493
|
if (maskedValue === void 0) { maskedValue = ''; }
|
|
494
|
+
if (isFromOnChanges && maskedValue === this.maskedValue) {
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
493
497
|
this.maskedValue = maskedValue;
|
|
494
498
|
var value = this.maskOnFocus && !this.focused && this.emptyMask ? '' : maskedValue;
|
|
495
499
|
this.renderer.setProperty(this.input.nativeElement, "value", value);
|
|
@@ -607,20 +611,6 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
607
611
|
tslib_1.__metadata("design:type", String),
|
|
608
612
|
tslib_1.__metadata("design:paramtypes", [String])
|
|
609
613
|
], MaskedTextBoxComponent.prototype, "fillMode", null);
|
|
610
|
-
tslib_1.__decorate([
|
|
611
|
-
core_1.HostBinding('attr.dir'),
|
|
612
|
-
tslib_1.__metadata("design:type", String)
|
|
613
|
-
], MaskedTextBoxComponent.prototype, "direction", void 0);
|
|
614
|
-
tslib_1.__decorate([
|
|
615
|
-
core_1.HostBinding('class.k-input'),
|
|
616
|
-
core_1.HostBinding('class.k-maskedtextbox'),
|
|
617
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
618
|
-
], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
|
|
619
|
-
tslib_1.__decorate([
|
|
620
|
-
core_1.HostBinding('class.k-disabled'),
|
|
621
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
622
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
623
|
-
], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
|
|
624
614
|
tslib_1.__decorate([
|
|
625
615
|
core_1.Input(),
|
|
626
616
|
tslib_1.__metadata("design:type", String)
|
|
@@ -675,6 +665,20 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
675
665
|
core_1.Output(),
|
|
676
666
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
677
667
|
], MaskedTextBoxComponent.prototype, "valueChange", void 0);
|
|
668
|
+
tslib_1.__decorate([
|
|
669
|
+
core_1.HostBinding('attr.dir'),
|
|
670
|
+
tslib_1.__metadata("design:type", String)
|
|
671
|
+
], MaskedTextBoxComponent.prototype, "direction", void 0);
|
|
672
|
+
tslib_1.__decorate([
|
|
673
|
+
core_1.HostBinding('class.k-input'),
|
|
674
|
+
core_1.HostBinding('class.k-maskedtextbox'),
|
|
675
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
676
|
+
], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
|
|
677
|
+
tslib_1.__decorate([
|
|
678
|
+
core_1.HostBinding('class.k-disabled'),
|
|
679
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
680
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
681
|
+
], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
|
|
678
682
|
tslib_1.__decorate([
|
|
679
683
|
core_1.ViewChild('input', { static: true }),
|
|
680
684
|
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-inputs',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1648037581,
|
|
15
15
|
version: '',
|
|
16
16
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
17
17
|
};
|
|
@@ -228,9 +228,13 @@ var RangeSliderComponent = /** @class */ (function (_super) {
|
|
|
228
228
|
var lastCoords = this.draggedHandle.getBoundingClientRect();
|
|
229
229
|
this.lastHandlePosition = { x: lastCoords.left, y: lastCoords.top };
|
|
230
230
|
this.dragging = { value: true, target: target };
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
var mousePos = {
|
|
232
|
+
x: (args.pageX - 0.5) - (lastCoords.width / 2),
|
|
233
|
+
y: (args.pageY - (lastCoords.width / 2))
|
|
234
|
+
};
|
|
235
|
+
var left = mousePos.x < this.lastHandlePosition.x;
|
|
236
|
+
var right = mousePos.x > this.lastHandlePosition.x;
|
|
237
|
+
var up = mousePos.y > this.lastHandlePosition.y;
|
|
234
238
|
var moveStartHandle = function () { return _this.changeValue([sliders_util_2.eventValue(args, _this.track.nativeElement, _this.getProps()), _this.value[1]]); };
|
|
235
239
|
var moveEndHandle = function () { return _this.changeValue([_this.value[0], sliders_util_2.eventValue(args, _this.track.nativeElement, _this.getProps())]); };
|
|
236
240
|
var moveBothHandles = function () { return _this.changeValue([sliders_util_2.eventValue(args, _this.track.nativeElement, _this.getProps()), sliders_util_2.eventValue(args, _this.track.nativeElement, _this.getProps())]); };
|
|
@@ -238,8 +242,8 @@ var RangeSliderComponent = /** @class */ (function (_super) {
|
|
|
238
242
|
var vertical = this.vertical;
|
|
239
243
|
var horizontal = !vertical;
|
|
240
244
|
var forward = (vertical && up) || (this.reverse ? horizontal && right : horizontal && left);
|
|
241
|
-
|
|
242
|
-
if (this.value[0] === this.value[1]) {
|
|
245
|
+
var incorrectValueState = this.value[0] > this.value[1];
|
|
246
|
+
if (this.value[0] === this.value[1] || incorrectValueState) {
|
|
243
247
|
if (forward) {
|
|
244
248
|
activeStartHandle ? moveStartHandle() : moveBothHandles();
|
|
245
249
|
}
|
package/dist/npm/shared/utils.js
CHANGED
|
@@ -11,8 +11,9 @@ var kendo_common_1 = require("@progress/kendo-common");
|
|
|
11
11
|
* Returns true if the used browser is Safari.
|
|
12
12
|
*/
|
|
13
13
|
exports.isSafari = function (userAgent) {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
var desktopBrowser = kendo_common_1.detectDesktopBrowser(userAgent);
|
|
15
|
+
var mobileOS = kendo_common_1.detectMobileOS(userAgent);
|
|
16
|
+
return (desktopBrowser && desktopBrowser.safari) || (mobileOS && mobileOS.browser === 'mobilesafari');
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
18
19
|
* @hidden
|
|
@@ -7,8 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
9
|
/**
|
|
10
|
-
* Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %}).
|
|
11
|
-
* @example
|
|
10
|
+
* Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %})).
|
|
12
11
|
* ```ts-no-run
|
|
13
12
|
* _@Component({
|
|
14
13
|
* selector: 'my-app',
|
|
@@ -8,7 +8,6 @@ var tslib_1 = require("tslib");
|
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
9
|
/**
|
|
10
10
|
* Specifies the adornments in the suffix container ([see examples]({% slug adornments_textbox %}#toc-suffixadornments)).
|
|
11
|
-
* @example
|
|
12
11
|
* ```ts-no-run
|
|
13
12
|
* _@Component({
|
|
14
13
|
* selector: 'my-app',
|