@progress/kendo-angular-inputs 7.5.0-dev.202110261427 → 7.5.2-dev.202111191702
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 +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/shared/utils.js +23 -0
- package/dist/es/textbox/textbox.component.js +3 -1
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/shared/utils.d.ts +16 -0
- package/dist/es2015/shared/utils.js +23 -0
- package/dist/es2015/textbox/textbox.component.js +3 -1
- package/dist/fesm2015/index.js +22 -3
- package/dist/fesm5/index.js +22 -3
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/shared/utils.js +25 -0
- package/dist/npm/textbox/textbox.component.js +6 -4
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +14 -12
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-inputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1637341178,
|
|
13
13
|
version: '',
|
|
14
14
|
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'
|
|
15
15
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*
|
|
8
|
+
* Returns true if the used browser is Safari.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isSafari: (userAgent: any) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*
|
|
14
|
+
* Checks if input is Japanese IME
|
|
15
|
+
*/
|
|
16
|
+
export declare const isJapanese: (input: any) => boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { detectDesktopBrowser, detectMobileOS } from "@progress/kendo-common";
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*
|
|
9
|
+
* Returns true if the used browser is Safari.
|
|
10
|
+
*/
|
|
11
|
+
export const isSafari = (userAgent) => {
|
|
12
|
+
return detectDesktopBrowser(userAgent).safari ||
|
|
13
|
+
(detectMobileOS(userAgent) && detectMobileOS(userAgent).browser === 'mobilesafari');
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*
|
|
18
|
+
* Checks if input is Japanese IME
|
|
19
|
+
*/
|
|
20
|
+
export const isJapanese = (input) => {
|
|
21
|
+
const japaneseRegex = /[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g;
|
|
22
|
+
return japaneseRegex.test(input);
|
|
23
|
+
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
var TextBoxComponent_1;
|
|
7
|
+
import { isJapanese } from './../shared/utils';
|
|
7
8
|
import { closest } from './../common/dom-utils';
|
|
8
9
|
import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
|
|
9
10
|
import { Component, ElementRef, forwardRef, Input, Output, EventEmitter, HostBinding, ViewChild, NgZone, ChangeDetectorRef, Injector, ContentChild, Renderer2 } from '@angular/core';
|
|
@@ -15,6 +16,7 @@ import { guid, hasObservers, KendoInput, Keys } from '@progress/kendo-angular-co
|
|
|
15
16
|
import { TextBoxSuffixTemplateDirective } from './textbox-suffix.directive';
|
|
16
17
|
import { TextBoxPrefixTemplateDirective } from './textbox-prefix.directive';
|
|
17
18
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
19
|
+
import { isSafari } from '../shared/utils';
|
|
18
20
|
const FOCUSED = 'k-state-focused';
|
|
19
21
|
let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
20
22
|
constructor(localizationService, ngZone, changeDetector, renderer, injector, hostElement) {
|
|
@@ -197,7 +199,7 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
197
199
|
* @hidden
|
|
198
200
|
*/
|
|
199
201
|
this.handleInput = (ev) => {
|
|
200
|
-
let incomingValue = ev.target.value;
|
|
202
|
+
let incomingValue = isSafari(navigator.userAgent) && isJapanese(ev.target.value) ? ev.data : ev.target.value;
|
|
201
203
|
this.updateValue(incomingValue);
|
|
202
204
|
};
|
|
203
205
|
this.ngChange = (_) => { };
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { take, filter, concatMap, startWith, takeUntil, skip, debounceTime, thro
|
|
|
10
10
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages, MessageService } from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
12
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
|
-
import { browser, mobileOS } from '@progress/kendo-common';
|
|
13
|
+
import { browser, mobileOS, detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
|
|
14
14
|
import { IntlService } from '@progress/kendo-angular-intl';
|
|
15
15
|
import { CommonModule } from '@angular/common';
|
|
16
16
|
import { PopupService, PopupModule } from '@progress/kendo-angular-popup';
|
|
@@ -459,7 +459,7 @@ const packageMetadata = {
|
|
|
459
459
|
name: '@progress/kendo-angular-inputs',
|
|
460
460
|
productName: 'Kendo UI for Angular',
|
|
461
461
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
462
|
-
publishDate:
|
|
462
|
+
publishDate: 1637341178,
|
|
463
463
|
version: '',
|
|
464
464
|
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'
|
|
465
465
|
};
|
|
@@ -5576,6 +5576,25 @@ MaskedTextBoxModule = __decorate([
|
|
|
5576
5576
|
})
|
|
5577
5577
|
], MaskedTextBoxModule);
|
|
5578
5578
|
|
|
5579
|
+
/**
|
|
5580
|
+
* @hidden
|
|
5581
|
+
*
|
|
5582
|
+
* Returns true if the used browser is Safari.
|
|
5583
|
+
*/
|
|
5584
|
+
const isSafari = (userAgent) => {
|
|
5585
|
+
return detectDesktopBrowser(userAgent).safari ||
|
|
5586
|
+
(detectMobileOS(userAgent) && detectMobileOS(userAgent).browser === 'mobilesafari');
|
|
5587
|
+
};
|
|
5588
|
+
/**
|
|
5589
|
+
* @hidden
|
|
5590
|
+
*
|
|
5591
|
+
* Checks if input is Japanese IME
|
|
5592
|
+
*/
|
|
5593
|
+
const isJapanese = (input) => {
|
|
5594
|
+
const japaneseRegex = /[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g;
|
|
5595
|
+
return japaneseRegex.test(input);
|
|
5596
|
+
};
|
|
5597
|
+
|
|
5579
5598
|
/**
|
|
5580
5599
|
* Specifies the adornments in the suffix container ([see examples]({% slug adornments_textbox %}#toc-suffixadornments)).
|
|
5581
5600
|
* @example
|
|
@@ -5819,7 +5838,7 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
5819
5838
|
* @hidden
|
|
5820
5839
|
*/
|
|
5821
5840
|
this.handleInput = (ev) => {
|
|
5822
|
-
let incomingValue = ev.target.value;
|
|
5841
|
+
let incomingValue = isSafari(navigator.userAgent) && isJapanese(ev.target.value) ? ev.data : ev.target.value;
|
|
5823
5842
|
this.updateValue(incomingValue);
|
|
5824
5843
|
};
|
|
5825
5844
|
this.ngChange = (_) => { };
|
package/dist/fesm5/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { take, filter, concatMap, startWith, takeUntil, skip, debounceTime, thro
|
|
|
10
10
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages, MessageService } from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
12
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
|
-
import { browser, mobileOS } from '@progress/kendo-common';
|
|
13
|
+
import { browser, mobileOS, detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
|
|
14
14
|
import { IntlService } from '@progress/kendo-angular-intl';
|
|
15
15
|
import { CommonModule } from '@angular/common';
|
|
16
16
|
import { PopupService, PopupModule } from '@progress/kendo-angular-popup';
|
|
@@ -493,7 +493,7 @@ var packageMetadata = {
|
|
|
493
493
|
name: '@progress/kendo-angular-inputs',
|
|
494
494
|
productName: 'Kendo UI for Angular',
|
|
495
495
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
496
|
-
publishDate:
|
|
496
|
+
publishDate: 1637341178,
|
|
497
497
|
version: '',
|
|
498
498
|
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'
|
|
499
499
|
};
|
|
@@ -5736,6 +5736,25 @@ var MaskedTextBoxModule = /** @class */ (function () {
|
|
|
5736
5736
|
return MaskedTextBoxModule;
|
|
5737
5737
|
}());
|
|
5738
5738
|
|
|
5739
|
+
/**
|
|
5740
|
+
* @hidden
|
|
5741
|
+
*
|
|
5742
|
+
* Returns true if the used browser is Safari.
|
|
5743
|
+
*/
|
|
5744
|
+
var isSafari = function (userAgent) {
|
|
5745
|
+
return detectDesktopBrowser(userAgent).safari ||
|
|
5746
|
+
(detectMobileOS(userAgent) && detectMobileOS(userAgent).browser === 'mobilesafari');
|
|
5747
|
+
};
|
|
5748
|
+
/**
|
|
5749
|
+
* @hidden
|
|
5750
|
+
*
|
|
5751
|
+
* Checks if input is Japanese IME
|
|
5752
|
+
*/
|
|
5753
|
+
var isJapanese = function (input) {
|
|
5754
|
+
var japaneseRegex = /[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g;
|
|
5755
|
+
return japaneseRegex.test(input);
|
|
5756
|
+
};
|
|
5757
|
+
|
|
5739
5758
|
/**
|
|
5740
5759
|
* Specifies the adornments in the suffix container ([see examples]({% slug adornments_textbox %}#toc-suffixadornments)).
|
|
5741
5760
|
* @example
|
|
@@ -5981,7 +6000,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
5981
6000
|
* @hidden
|
|
5982
6001
|
*/
|
|
5983
6002
|
this.handleInput = function (ev) {
|
|
5984
|
-
var incomingValue = ev.target.value;
|
|
6003
|
+
var incomingValue = isSafari(navigator.userAgent) && isJapanese(ev.target.value) ? ev.data : ev.target.value;
|
|
5985
6004
|
_this.updateValue(incomingValue);
|
|
5986
6005
|
};
|
|
5987
6006
|
this.ngChange = function (_) { };
|
|
@@ -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: 1637341178,
|
|
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
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var kendo_common_1 = require("@progress/kendo-common");
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*
|
|
11
|
+
* Returns true if the used browser is Safari.
|
|
12
|
+
*/
|
|
13
|
+
exports.isSafari = function (userAgent) {
|
|
14
|
+
return kendo_common_1.detectDesktopBrowser(userAgent).safari ||
|
|
15
|
+
(kendo_common_1.detectMobileOS(userAgent) && kendo_common_1.detectMobileOS(userAgent).browser === 'mobilesafari');
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*
|
|
20
|
+
* Checks if input is Japanese IME
|
|
21
|
+
*/
|
|
22
|
+
exports.isJapanese = function (input) {
|
|
23
|
+
var japaneseRegex = /[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g;
|
|
24
|
+
return japaneseRegex.test(input);
|
|
25
|
+
};
|
|
@@ -5,17 +5,19 @@
|
|
|
5
5
|
"use strict";
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
|
+
var utils_1 = require("./../shared/utils");
|
|
8
9
|
var dom_utils_1 = require("./../common/dom-utils");
|
|
9
10
|
var forms_1 = require("@angular/forms");
|
|
10
11
|
var core_1 = require("@angular/core");
|
|
11
12
|
var kendo_licensing_1 = require("@progress/kendo-licensing");
|
|
12
13
|
var package_metadata_1 = require("../package-metadata");
|
|
13
14
|
var dom_utils_2 = require("../common/dom-utils");
|
|
14
|
-
var
|
|
15
|
+
var utils_2 = require("../common/utils");
|
|
15
16
|
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
16
17
|
var textbox_suffix_directive_1 = require("./textbox-suffix.directive");
|
|
17
18
|
var textbox_prefix_directive_1 = require("./textbox-prefix.directive");
|
|
18
19
|
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
20
|
+
var utils_3 = require("../shared/utils");
|
|
19
21
|
var FOCUSED = 'k-state-focused';
|
|
20
22
|
var TextBoxComponent = /** @class */ (function () {
|
|
21
23
|
function TextBoxComponent(localizationService, ngZone, changeDetector, renderer, injector, hostElement) {
|
|
@@ -188,7 +190,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
188
190
|
*/
|
|
189
191
|
this.handleInputBlur = function () {
|
|
190
192
|
_this.changeDetector.markForCheck();
|
|
191
|
-
if (kendo_angular_common_1.hasObservers(_this.inputBlur) ||
|
|
193
|
+
if (kendo_angular_common_1.hasObservers(_this.inputBlur) || utils_2.requiresZoneOnBlur(_this.control)) {
|
|
192
194
|
_this.ngZone.run(function () {
|
|
193
195
|
_this.ngTouched();
|
|
194
196
|
_this.inputBlur.emit();
|
|
@@ -199,7 +201,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
199
201
|
* @hidden
|
|
200
202
|
*/
|
|
201
203
|
this.handleInput = function (ev) {
|
|
202
|
-
var incomingValue = ev.target.value;
|
|
204
|
+
var incomingValue = utils_3.isSafari(navigator.userAgent) && utils_1.isJapanese(ev.target.value) ? ev.data : ev.target.value;
|
|
203
205
|
_this.updateValue(incomingValue);
|
|
204
206
|
};
|
|
205
207
|
this.ngChange = function (_) { };
|
|
@@ -483,7 +485,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
483
485
|
};
|
|
484
486
|
TextBoxComponent.prototype.updateValue = function (value) {
|
|
485
487
|
var _this = this;
|
|
486
|
-
if (!
|
|
488
|
+
if (!utils_2.areSame(this.value, value)) {
|
|
487
489
|
this.ngZone.run(function () {
|
|
488
490
|
_this.value = value;
|
|
489
491
|
_this.ngChange(value);
|