@progress/kendo-angular-inputs 8.0.8-dev.202203101143 → 8.0.9-dev.202203220940
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 -42
- 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 -39
- 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 -52
- package/dist/fesm5/index.js +61 -53
- package/dist/npm/maskedtextbox/maskedtextbox.component.js +48 -42
- 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
|
@@ -8,7 +8,7 @@ import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, RadioControlValueAccessor
|
|
|
8
8
|
import { Subscription, fromEvent, interval, merge, BehaviorSubject, Subject } from 'rxjs';
|
|
9
9
|
import { take, filter, concatMap, startWith, takeUntil, skip, debounceTime, throttleTime } from 'rxjs/operators';
|
|
10
10
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages, MessageService } from '@progress/kendo-angular-l10n';
|
|
11
|
-
import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput,
|
|
11
|
+
import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent, isChanged, closest } from '@progress/kendo-angular-common';
|
|
12
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
13
|
import { browser, mobileOS, detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
|
|
14
14
|
import { IntlService } from '@progress/kendo-angular-intl';
|
|
@@ -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: 1647941853,
|
|
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
|
}
|
|
@@ -4469,7 +4473,6 @@ var MaskingService = /** @class */ (function () {
|
|
|
4469
4473
|
return MaskingService;
|
|
4470
4474
|
}());
|
|
4471
4475
|
|
|
4472
|
-
var resolvedPromise = Promise.resolve(null);
|
|
4473
4476
|
var FOCUSED$2 = 'k-focus';
|
|
4474
4477
|
/**
|
|
4475
4478
|
* Represents the [Kendo UI MaskedTextBox component for Angular]({% slug overview_maskedtextbox %}).
|
|
@@ -4514,7 +4517,6 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4514
4517
|
* Determines whether the MaskedTextBox is in its read-only state ([see example]({% slug readonly_maskedtextbox %})).
|
|
4515
4518
|
*/
|
|
4516
4519
|
this.readonly = false;
|
|
4517
|
-
this.hostClasses = true;
|
|
4518
4520
|
/**
|
|
4519
4521
|
* Represents a prompt character for the masked value.
|
|
4520
4522
|
* @default `_`
|
|
@@ -4590,6 +4592,7 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4590
4592
|
* Fires each time the value changes.
|
|
4591
4593
|
*/
|
|
4592
4594
|
this.valueChange = new EventEmitter();
|
|
4595
|
+
this.hostClasses = true;
|
|
4593
4596
|
this.focusClick = false;
|
|
4594
4597
|
this.defaultRules = {
|
|
4595
4598
|
"#": /[\d\s\+\-]/,
|
|
@@ -4720,20 +4723,13 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4720
4723
|
enumerable: true,
|
|
4721
4724
|
configurable: true
|
|
4722
4725
|
});
|
|
4723
|
-
Object.defineProperty(MaskedTextBoxComponent.prototype, "
|
|
4726
|
+
Object.defineProperty(MaskedTextBoxComponent.prototype, "rules", {
|
|
4724
4727
|
get: function () {
|
|
4725
|
-
return this.
|
|
4728
|
+
return this._rules || this.defaultRules;
|
|
4726
4729
|
},
|
|
4727
|
-
enumerable: true,
|
|
4728
|
-
configurable: true
|
|
4729
|
-
});
|
|
4730
|
-
Object.defineProperty(MaskedTextBoxComponent.prototype, "rules", {
|
|
4731
4730
|
/**
|
|
4732
4731
|
* Exposes the RegExp-based mask validation array ([see example]({% slug masks_maskedtextbox %})).
|
|
4733
4732
|
*/
|
|
4734
|
-
get: function () {
|
|
4735
|
-
return this._rules || this.defaultRules;
|
|
4736
|
-
},
|
|
4737
4733
|
set: function (value) {
|
|
4738
4734
|
this._rules = Object.assign({}, this.defaultRules, value);
|
|
4739
4735
|
},
|
|
@@ -4753,6 +4749,13 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4753
4749
|
enumerable: true,
|
|
4754
4750
|
configurable: true
|
|
4755
4751
|
});
|
|
4752
|
+
Object.defineProperty(MaskedTextBoxComponent.prototype, "hostDisabledClass", {
|
|
4753
|
+
get: function () {
|
|
4754
|
+
return this.disabled;
|
|
4755
|
+
},
|
|
4756
|
+
enumerable: true,
|
|
4757
|
+
configurable: true
|
|
4758
|
+
});
|
|
4756
4759
|
MaskedTextBoxComponent.prototype.ngOnInit = function () {
|
|
4757
4760
|
if (this.hostElement) {
|
|
4758
4761
|
this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
|
|
@@ -4830,7 +4833,7 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4830
4833
|
var value = e.target.value;
|
|
4831
4834
|
var _a = this.selection, start = _a[0], end = _a[1];
|
|
4832
4835
|
if (!this.mask) {
|
|
4833
|
-
this.
|
|
4836
|
+
this.updateValueWithEvents(value);
|
|
4834
4837
|
this.isPasted = false;
|
|
4835
4838
|
return;
|
|
4836
4839
|
}
|
|
@@ -4845,36 +4848,39 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4845
4848
|
result = this.service.maskInput(value, this.maskedValue, e.target.selectionStart);
|
|
4846
4849
|
}
|
|
4847
4850
|
this.updateInput(result.value, result.selection);
|
|
4848
|
-
this.
|
|
4851
|
+
this.updateValueWithEvents(result.value);
|
|
4849
4852
|
};
|
|
4850
4853
|
/**
|
|
4851
4854
|
* @hidden
|
|
4852
4855
|
*/
|
|
4853
4856
|
MaskedTextBoxComponent.prototype.ngOnChanges = function (changes) {
|
|
4854
4857
|
var _this = this;
|
|
4855
|
-
if (changes.value) {
|
|
4856
|
-
this.value = this.normalizeValue();
|
|
4857
|
-
}
|
|
4858
4858
|
if (!this.mask) {
|
|
4859
|
+
if (changes.value) {
|
|
4860
|
+
this.value = this.normalizeValue();
|
|
4861
|
+
}
|
|
4859
4862
|
this.updateInput(this.value);
|
|
4860
4863
|
return;
|
|
4861
4864
|
}
|
|
4862
4865
|
var next = this.extractChanges(changes);
|
|
4863
4866
|
this.updateService(next);
|
|
4864
|
-
if (
|
|
4867
|
+
if (changes.value) {
|
|
4868
|
+
this.value = this.normalizeValue();
|
|
4865
4869
|
var maskedValue = this.service.maskRaw(this.value);
|
|
4866
4870
|
if (maskedValue !== this.maskedValue) {
|
|
4867
4871
|
this.updateInput(maskedValue);
|
|
4868
4872
|
}
|
|
4873
|
+
if (this.includeLiterals) {
|
|
4874
|
+
this.updateValue(this.maskedValue);
|
|
4875
|
+
}
|
|
4869
4876
|
}
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
_this.
|
|
4877
|
+
if (anyChanged(['promptPlaceholder', 'includeLiterals'], changes)) {
|
|
4878
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(function () {
|
|
4879
|
+
_this.updateValueWithEvents(_this.maskedValue);
|
|
4873
4880
|
});
|
|
4881
|
+
return;
|
|
4874
4882
|
}
|
|
4875
|
-
|
|
4876
|
-
this.updateInput(this.service.maskRaw(this.value));
|
|
4877
|
-
}
|
|
4883
|
+
this.updateInput(this.service.maskRaw(this.value));
|
|
4878
4884
|
};
|
|
4879
4885
|
/**
|
|
4880
4886
|
* @hidden
|
|
@@ -4933,15 +4939,18 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4933
4939
|
/**
|
|
4934
4940
|
* @hidden
|
|
4935
4941
|
*/
|
|
4936
|
-
MaskedTextBoxComponent.prototype.
|
|
4937
|
-
|
|
4942
|
+
MaskedTextBoxComponent.prototype.updateValueWithEvents = function (maskedValue) {
|
|
4943
|
+
this.updateValue(maskedValue);
|
|
4944
|
+
this.valueChange.emit(this.value);
|
|
4945
|
+
};
|
|
4946
|
+
MaskedTextBoxComponent.prototype.updateValue = function (value) {
|
|
4947
|
+
if (this.mask && !this.service.validationValue(value)) {
|
|
4938
4948
|
this.value = '';
|
|
4939
4949
|
}
|
|
4940
4950
|
else {
|
|
4941
|
-
this.value = this.service.rawValue(
|
|
4951
|
+
this.value = this.service.rawValue(value);
|
|
4942
4952
|
}
|
|
4943
4953
|
this.onChange(this.value);
|
|
4944
|
-
this.valueChange.emit(this.value);
|
|
4945
4954
|
};
|
|
4946
4955
|
MaskedTextBoxComponent.prototype.updateInput = function (maskedValue, selection) {
|
|
4947
4956
|
if (maskedValue === void 0) { maskedValue = ''; }
|
|
@@ -5062,20 +5071,6 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
5062
5071
|
__metadata("design:type", String),
|
|
5063
5072
|
__metadata("design:paramtypes", [String])
|
|
5064
5073
|
], 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
5074
|
__decorate([
|
|
5080
5075
|
Input(),
|
|
5081
5076
|
__metadata("design:type", String)
|
|
@@ -5130,6 +5125,20 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
5130
5125
|
Output(),
|
|
5131
5126
|
__metadata("design:type", EventEmitter)
|
|
5132
5127
|
], MaskedTextBoxComponent.prototype, "valueChange", void 0);
|
|
5128
|
+
__decorate([
|
|
5129
|
+
HostBinding('attr.dir'),
|
|
5130
|
+
__metadata("design:type", String)
|
|
5131
|
+
], MaskedTextBoxComponent.prototype, "direction", void 0);
|
|
5132
|
+
__decorate([
|
|
5133
|
+
HostBinding('class.k-input'),
|
|
5134
|
+
HostBinding('class.k-maskedtextbox'),
|
|
5135
|
+
__metadata("design:type", Boolean)
|
|
5136
|
+
], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
|
|
5137
|
+
__decorate([
|
|
5138
|
+
HostBinding('class.k-disabled'),
|
|
5139
|
+
__metadata("design:type", Boolean),
|
|
5140
|
+
__metadata("design:paramtypes", [])
|
|
5141
|
+
], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
|
|
5133
5142
|
__decorate([
|
|
5134
5143
|
ViewChild('input', { static: true }),
|
|
5135
5144
|
__metadata("design:type", ElementRef)
|
|
@@ -5836,8 +5845,9 @@ var MaskedTextBoxModule = /** @class */ (function () {
|
|
|
5836
5845
|
* Returns true if the used browser is Safari.
|
|
5837
5846
|
*/
|
|
5838
5847
|
var isSafari = function (userAgent) {
|
|
5839
|
-
|
|
5840
|
-
|
|
5848
|
+
var desktopBrowser = detectDesktopBrowser(userAgent);
|
|
5849
|
+
var mobileOS$$1 = detectMobileOS(userAgent);
|
|
5850
|
+
return (desktopBrowser && desktopBrowser.safari) || (mobileOS$$1 && mobileOS$$1.browser === 'mobilesafari');
|
|
5841
5851
|
};
|
|
5842
5852
|
/**
|
|
5843
5853
|
* @hidden
|
|
@@ -5851,7 +5861,6 @@ var isJapanese = function (input) {
|
|
|
5851
5861
|
|
|
5852
5862
|
/**
|
|
5853
5863
|
* Specifies the adornments in the suffix container ([see examples]({% slug adornments_textbox %}#toc-suffixadornments)).
|
|
5854
|
-
* @example
|
|
5855
5864
|
* ```ts-no-run
|
|
5856
5865
|
* _@Component({
|
|
5857
5866
|
* selector: 'my-app',
|
|
@@ -7569,8 +7578,7 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7569
7578
|
}(TextFieldsBase));
|
|
7570
7579
|
|
|
7571
7580
|
/**
|
|
7572
|
-
* Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %}).
|
|
7573
|
-
* @example
|
|
7581
|
+
* Specifies the adornments in the suffix container ([see example]({% slug textarea_adornments %})).
|
|
7574
7582
|
* ```ts-no-run
|
|
7575
7583
|
* _@Component({
|
|
7576
7584
|
* selector: 'my-app',
|
|
@@ -7,14 +7,14 @@ 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 operators_1 = require("rxjs/operators");
|
|
11
|
+
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
10
12
|
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
11
13
|
var kendo_licensing_1 = require("@progress/kendo-licensing");
|
|
12
14
|
var package_metadata_1 = require("../package-metadata");
|
|
13
15
|
var masking_service_1 = require("./masking.service");
|
|
14
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
15
16
|
var dom_utils_1 = require("../common/dom-utils");
|
|
16
17
|
var utils_1 = require("../common/utils");
|
|
17
|
-
var resolvedPromise = Promise.resolve(null);
|
|
18
18
|
var FOCUSED = 'k-focus';
|
|
19
19
|
/**
|
|
20
20
|
* Represents the [Kendo UI MaskedTextBox component for Angular]({% slug overview_maskedtextbox %}).
|
|
@@ -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
|
}
|
|
@@ -390,36 +390,39 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
390
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
|
|
397
397
|
*/
|
|
398
398
|
MaskedTextBoxComponent.prototype.ngOnChanges = function (changes) {
|
|
399
399
|
var _this = this;
|
|
400
|
-
if (changes.value) {
|
|
401
|
-
this.value = this.normalizeValue();
|
|
402
|
-
}
|
|
403
400
|
if (!this.mask) {
|
|
401
|
+
if (changes.value) {
|
|
402
|
+
this.value = this.normalizeValue();
|
|
403
|
+
}
|
|
404
404
|
this.updateInput(this.value);
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
407
|
var next = this.extractChanges(changes);
|
|
408
408
|
this.updateService(next);
|
|
409
|
-
if (
|
|
409
|
+
if (changes.value) {
|
|
410
|
+
this.value = this.normalizeValue();
|
|
410
411
|
var maskedValue = this.service.maskRaw(this.value);
|
|
411
412
|
if (maskedValue !== this.maskedValue) {
|
|
412
413
|
this.updateInput(maskedValue);
|
|
413
414
|
}
|
|
415
|
+
if (this.includeLiterals) {
|
|
416
|
+
this.updateValue(this.maskedValue);
|
|
417
|
+
}
|
|
414
418
|
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
_this.
|
|
419
|
+
if (kendo_angular_common_1.anyChanged(['promptPlaceholder', 'includeLiterals'], changes)) {
|
|
420
|
+
this.ngZone.onStable.pipe(operators_1.take(1)).subscribe(function () {
|
|
421
|
+
_this.updateValueWithEvents(_this.maskedValue);
|
|
418
422
|
});
|
|
423
|
+
return;
|
|
419
424
|
}
|
|
420
|
-
|
|
421
|
-
this.updateInput(this.service.maskRaw(this.value));
|
|
422
|
-
}
|
|
425
|
+
this.updateInput(this.service.maskRaw(this.value));
|
|
423
426
|
};
|
|
424
427
|
/**
|
|
425
428
|
* @hidden
|
|
@@ -478,15 +481,18 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
478
481
|
/**
|
|
479
482
|
* @hidden
|
|
480
483
|
*/
|
|
481
|
-
MaskedTextBoxComponent.prototype.
|
|
482
|
-
|
|
484
|
+
MaskedTextBoxComponent.prototype.updateValueWithEvents = function (maskedValue) {
|
|
485
|
+
this.updateValue(maskedValue);
|
|
486
|
+
this.valueChange.emit(this.value);
|
|
487
|
+
};
|
|
488
|
+
MaskedTextBoxComponent.prototype.updateValue = function (value) {
|
|
489
|
+
if (this.mask && !this.service.validationValue(value)) {
|
|
483
490
|
this.value = '';
|
|
484
491
|
}
|
|
485
492
|
else {
|
|
486
|
-
this.value = this.service.rawValue(
|
|
493
|
+
this.value = this.service.rawValue(value);
|
|
487
494
|
}
|
|
488
495
|
this.onChange(this.value);
|
|
489
|
-
this.valueChange.emit(this.value);
|
|
490
496
|
};
|
|
491
497
|
MaskedTextBoxComponent.prototype.updateInput = function (maskedValue, selection) {
|
|
492
498
|
if (maskedValue === void 0) { maskedValue = ''; }
|
|
@@ -607,20 +613,6 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
607
613
|
tslib_1.__metadata("design:type", String),
|
|
608
614
|
tslib_1.__metadata("design:paramtypes", [String])
|
|
609
615
|
], 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
616
|
tslib_1.__decorate([
|
|
625
617
|
core_1.Input(),
|
|
626
618
|
tslib_1.__metadata("design:type", String)
|
|
@@ -675,6 +667,20 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
675
667
|
core_1.Output(),
|
|
676
668
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
677
669
|
], MaskedTextBoxComponent.prototype, "valueChange", void 0);
|
|
670
|
+
tslib_1.__decorate([
|
|
671
|
+
core_1.HostBinding('attr.dir'),
|
|
672
|
+
tslib_1.__metadata("design:type", String)
|
|
673
|
+
], MaskedTextBoxComponent.prototype, "direction", void 0);
|
|
674
|
+
tslib_1.__decorate([
|
|
675
|
+
core_1.HostBinding('class.k-input'),
|
|
676
|
+
core_1.HostBinding('class.k-maskedtextbox'),
|
|
677
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
678
|
+
], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
|
|
679
|
+
tslib_1.__decorate([
|
|
680
|
+
core_1.HostBinding('class.k-disabled'),
|
|
681
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
682
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
683
|
+
], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
|
|
678
684
|
tslib_1.__decorate([
|
|
679
685
|
core_1.ViewChild('input', { static: true }),
|
|
680
686
|
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: 1647941853,
|
|
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',
|