@progress/kendo-angular-inputs 7.5.0 → 7.5.2
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 var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-inputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1637576485,
|
|
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,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 var isSafari = function (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 var isJapanese = function (input) {
|
|
21
|
+
var japaneseRegex = /[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g;
|
|
22
|
+
return japaneseRegex.test(input);
|
|
23
|
+
};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
+
import { isJapanese } from './../shared/utils';
|
|
6
7
|
import { closest } from './../common/dom-utils';
|
|
7
8
|
import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
|
|
8
9
|
import { Component, ElementRef, forwardRef, Input, Output, EventEmitter, HostBinding, ViewChild, NgZone, ChangeDetectorRef, Injector, ContentChild, Renderer2 } from '@angular/core';
|
|
@@ -14,6 +15,7 @@ import { guid, hasObservers, KendoInput, Keys } from '@progress/kendo-angular-co
|
|
|
14
15
|
import { TextBoxSuffixTemplateDirective } from './textbox-suffix.directive';
|
|
15
16
|
import { TextBoxPrefixTemplateDirective } from './textbox-prefix.directive';
|
|
16
17
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
18
|
+
import { isSafari } from '../shared/utils';
|
|
17
19
|
var FOCUSED = 'k-state-focused';
|
|
18
20
|
var TextBoxComponent = /** @class */ (function () {
|
|
19
21
|
function TextBoxComponent(localizationService, ngZone, changeDetector, renderer, injector, hostElement) {
|
|
@@ -197,7 +199,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
197
199
|
* @hidden
|
|
198
200
|
*/
|
|
199
201
|
this.handleInput = function (ev) {
|
|
200
|
-
var incomingValue = ev.target.value;
|
|
202
|
+
var incomingValue = isSafari(navigator.userAgent) && isJapanese(ev.target.value) ? ev.data : ev.target.value;
|
|
201
203
|
_this.updateValue(incomingValue);
|
|
202
204
|
};
|
|
203
205
|
this.ngChange = function (_) { };
|