@syncfusion/ej2-inputs 19.2.60 → 19.3.48
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/.eslintrc.json +1 -1
- package/CHANGELOG.md +15 -0
- 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 +359 -610
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +371 -627
- 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/helpers/e2e/colorpickerHelper.d.ts +23 -0
- package/helpers/e2e/colorpickerHelper.js +53 -0
- package/package.json +9 -9
- package/src/color-picker/color-picker-model.d.ts +7 -0
- package/src/color-picker/color-picker.d.ts +6 -0
- package/src/color-picker/color-picker.js +10 -1
- package/src/maskedtextbox/base/mask-base.js +1 -1
- package/src/maskedtextbox/maskedtextbox/maskedtextbox-model.d.ts +1 -4
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +0 -3
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +2 -11
- package/src/numerictextbox/numerictextbox-model.d.ts +1 -10
- package/src/numerictextbox/numerictextbox.d.ts +0 -9
- package/src/numerictextbox/numerictextbox.js +52 -96
- package/src/slider/slider.d.ts +1 -0
- package/src/slider/slider.js +10 -1
- package/src/textbox/textbox-model.d.ts +1 -4
- package/src/textbox/textbox.d.ts +0 -3
- package/src/textbox/textbox.js +91 -113
- package/src/uploader/uploader-model.d.ts +1 -26
- package/src/uploader/uploader.d.ts +0 -40
- package/src/uploader/uploader.js +210 -407
- package/styles/bootstrap-dark.css +14 -6
- package/styles/bootstrap.css +14 -6
- package/styles/bootstrap4.css +22 -12
- package/styles/bootstrap5-dark.css +7548 -0
- package/styles/bootstrap5-dark.scss +7 -0
- package/styles/bootstrap5.css +7548 -0
- package/styles/bootstrap5.scss +7 -0
- package/styles/color-picker/_bootstrap5-dark-definition.scss +1 -0
- package/styles/color-picker/_bootstrap5-definition.scss +134 -0
- package/styles/color-picker/_layout.scss +26 -3
- package/styles/color-picker/_tailwind-dark-definition.scss +1 -132
- package/styles/color-picker/_tailwind-definition.scss +25 -24
- package/styles/color-picker/_theme.scss +33 -0
- package/styles/color-picker/bootstrap5-dark.css +964 -0
- package/styles/color-picker/bootstrap5-dark.scss +11 -0
- package/styles/color-picker/bootstrap5.css +964 -0
- package/styles/color-picker/bootstrap5.scss +11 -0
- package/styles/color-picker/icons/_bootstrap5-dark.scss +1 -0
- package/styles/color-picker/icons/_bootstrap5.scss +10 -0
- package/styles/fabric-dark.css +15 -7
- package/styles/fabric.css +15 -7
- package/styles/highcontrast-light.css +15 -7
- package/styles/highcontrast.css +16 -8
- package/styles/input/_bootstrap5-dark-definition.scss +1 -0
- package/styles/input/_bootstrap5-definition.scss +320 -0
- package/styles/input/_definition.scss +217 -0
- package/styles/input/_fabric-definition.scss +1 -1
- package/styles/input/_highcontrast-definition.scss +1 -1
- package/styles/input/_layout.scss +196 -157
- package/styles/input/_material-dark-definition.scss +133 -120
- package/styles/input/_material-definition.scss +1 -0
- package/styles/input/_tailwind-dark-definition.scss +1 -315
- package/styles/input/_tailwind-definition.scss +50 -47
- package/styles/input/_theme.scss +92 -59
- package/styles/input/bootstrap-dark.css +12 -3
- package/styles/input/bootstrap.css +12 -3
- package/styles/input/bootstrap4.css +15 -3
- package/styles/input/bootstrap5-dark.css +4670 -0
- package/styles/input/bootstrap5-dark.scss +4 -0
- package/styles/input/bootstrap5.css +4670 -0
- package/styles/input/bootstrap5.scss +4 -0
- package/styles/input/fabric-dark.css +12 -3
- package/styles/input/fabric.css +13 -4
- package/styles/input/highcontrast-light.css +12 -3
- package/styles/input/highcontrast.css +13 -4
- package/styles/input/icons/_bootstrap5-dark.scss +1 -0
- package/styles/input/icons/_bootstrap5.scss +17 -0
- package/styles/input/icons/_material-dark.scss +32 -0
- package/styles/input/icons/_tailwind-dark.scss +1 -17
- package/styles/input/material-dark.css +2320 -201
- package/styles/input/material.css +12 -3
- package/styles/input/tailwind-dark.css +14 -5
- package/styles/input/tailwind.css +14 -5
- package/styles/maskedtextbox/_bootstrap5-dark-definition.scss +1 -0
- package/styles/maskedtextbox/_bootstrap5-definition.scss +7 -0
- package/styles/maskedtextbox/_tailwind-dark-definition.scss +1 -6
- package/styles/maskedtextbox/_tailwind-definition.scss +4 -1
- package/styles/maskedtextbox/bootstrap5-dark.css +33 -0
- package/styles/maskedtextbox/bootstrap5-dark.scss +4 -0
- package/styles/maskedtextbox/bootstrap5.css +33 -0
- package/styles/maskedtextbox/bootstrap5.scss +4 -0
- package/styles/material-dark.css +2337 -218
- package/styles/material.css +14 -5
- package/styles/numerictextbox/_bootstrap5-dark-definition.scss +1 -0
- package/styles/numerictextbox/_bootstrap5-definition.scss +3 -0
- package/styles/numerictextbox/_tailwind-dark-definition.scss +1 -5
- package/styles/numerictextbox/_tailwind-definition.scss +1 -1
- package/styles/numerictextbox/bootstrap5-dark.css +48 -0
- package/styles/numerictextbox/bootstrap5-dark.scss +5 -0
- package/styles/numerictextbox/bootstrap5.css +48 -0
- package/styles/numerictextbox/bootstrap5.scss +5 -0
- package/styles/numerictextbox/icons/_bootstrap5-dark.scss +1 -0
- package/styles/numerictextbox/icons/_bootstrap5.scss +12 -0
- package/styles/numerictextbox/icons/_tailwind-dark.scss +1 -12
- package/styles/slider/_bootstrap5-dark-definition.scss +1 -0
- package/styles/slider/_bootstrap5-definition.scss +90 -0
- package/styles/slider/_fabric-dark-definition.scss +2 -2
- package/styles/slider/_layout.scss +294 -69
- package/styles/slider/_material-dark-definition.scss +1 -1
- package/styles/slider/_tailwind-dark-definition.scss +1 -80
- package/styles/slider/_tailwind-definition.scss +32 -27
- package/styles/slider/_theme.scss +14 -6
- package/styles/slider/bootstrap-dark.css +2 -3
- package/styles/slider/bootstrap.css +2 -3
- package/styles/slider/bootstrap4.css +7 -9
- package/styles/slider/bootstrap5-dark.css +749 -0
- package/styles/slider/bootstrap5-dark.scss +5 -0
- package/styles/slider/bootstrap5.css +749 -0
- package/styles/slider/bootstrap5.scss +5 -0
- package/styles/slider/fabric-dark.css +3 -4
- package/styles/slider/fabric.css +2 -3
- package/styles/slider/highcontrast-light.css +3 -4
- package/styles/slider/highcontrast.css +3 -4
- package/styles/slider/material-dark.css +16 -16
- package/styles/slider/material.css +2 -2
- package/styles/slider/tailwind-dark.css +9 -8
- package/styles/slider/tailwind.css +7 -3
- package/styles/tailwind-dark.css +23 -13
- package/styles/tailwind.css +21 -8
- package/styles/textbox/_bootstrap5-dark-definition.scss +1 -0
- package/styles/textbox/_bootstrap5-definition.scss +0 -0
- package/styles/textbox/_tailwind-dark-definition.scss +1 -0
- package/styles/textbox/bootstrap5-dark.css +0 -0
- package/styles/textbox/bootstrap5-dark.scss +4 -0
- package/styles/textbox/bootstrap5.css +0 -0
- package/styles/textbox/bootstrap5.scss +4 -0
- package/styles/uploader/_bootstrap5-dark-definition.scss +1 -0
- package/styles/uploader/_bootstrap5-definition.scss +216 -0
- package/styles/uploader/_definition.scss +142 -0
- package/styles/uploader/_tailwind-dark-definition.scss +1 -216
- package/styles/uploader/_tailwind-definition.scss +21 -21
- package/styles/uploader/_theme.scss +2 -2
- package/styles/uploader/bootstrap5-dark.css +1079 -0
- package/styles/uploader/bootstrap5-dark.scss +6 -0
- package/styles/uploader/bootstrap5.css +1079 -0
- package/styles/uploader/bootstrap5.scss +6 -0
- package/styles/uploader/icons/_bootstrap5-dark.scss +1 -0
- package/styles/uploader/icons/_bootstrap5.scss +34 -0
- package/styles/uploader/icons/_tailwind-dark.scss +1 -35
- package/styles/uploader/material-dark.css +1 -1
- package/styles/color-picker/_icons.scss +0 -10
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 19.
|
|
3
|
+
* version : 19.3.48
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TestHelper } from '@syncfusion/ej2-base/helpers/e2e';
|
|
2
|
+
/**
|
|
3
|
+
* E2E test helpers for Colorpicker to easily interact and the test the component
|
|
4
|
+
*/
|
|
5
|
+
export declare class ColorpickerHelper extends TestHelper {
|
|
6
|
+
id: string;
|
|
7
|
+
wrapperFn: Function;
|
|
8
|
+
/**
|
|
9
|
+
* Initialize the Colorpicker E2E helpers
|
|
10
|
+
* @param id Element id of the Colorpicker element
|
|
11
|
+
* @param wrapperFn Pass the wrapper function
|
|
12
|
+
*/
|
|
13
|
+
constructor(id: string, wrapperFn: Function);
|
|
14
|
+
/**
|
|
15
|
+
* Used to get root element of the Colorpicker component
|
|
16
|
+
*/
|
|
17
|
+
getElement(): any;
|
|
18
|
+
getSplitButtonElement(): any;
|
|
19
|
+
getSplitButtonPopupElement(): any;
|
|
20
|
+
setModel(property: any, value: any): any;
|
|
21
|
+
getModel(property: any): any;
|
|
22
|
+
invoke(fName: any, args?: any): any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const e2e_1 = require("@syncfusion/ej2-base/helpers/e2e");
|
|
4
|
+
/**
|
|
5
|
+
* E2E test helpers for Colorpicker to easily interact and the test the component
|
|
6
|
+
*/
|
|
7
|
+
class ColorpickerHelper extends e2e_1.TestHelper {
|
|
8
|
+
/**
|
|
9
|
+
* Initialize the Colorpicker E2E helpers
|
|
10
|
+
* @param id Element id of the Colorpicker element
|
|
11
|
+
* @param wrapperFn Pass the wrapper function
|
|
12
|
+
*/
|
|
13
|
+
constructor(id, wrapperFn) {
|
|
14
|
+
super();
|
|
15
|
+
this.id = id;
|
|
16
|
+
if (wrapperFn !== undefined) {
|
|
17
|
+
this.wrapperFn = wrapperFn;
|
|
18
|
+
}
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Used to get root element of the Colorpicker component
|
|
23
|
+
*/
|
|
24
|
+
getElement() {
|
|
25
|
+
return this.selector('#' + this.id);
|
|
26
|
+
}
|
|
27
|
+
getSplitButtonElement() {
|
|
28
|
+
return this.selector('#' + this.id + '_dropdownbtn');
|
|
29
|
+
}
|
|
30
|
+
getSplitButtonPopupElement() {
|
|
31
|
+
return this.selector('#' + this.id + '_dropdownbtn_popup');
|
|
32
|
+
}
|
|
33
|
+
setModel(property, value) {
|
|
34
|
+
let cy;
|
|
35
|
+
return cy.get('#' + this.id).then((ele) => {
|
|
36
|
+
return ele[0].ej2_instances[0][property] = value;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
getModel(property) {
|
|
40
|
+
let cy;
|
|
41
|
+
return cy.get('#' + this.id).then((ele) => {
|
|
42
|
+
return ele[0].ej2_instances[0][property];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
invoke(fName, args = []) {
|
|
46
|
+
let cy;
|
|
47
|
+
return cy.get('#' + this.id).then((ele) => {
|
|
48
|
+
var inst = ele[0].ej2_instances[0];
|
|
49
|
+
return inst[fName].apply(inst, args);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.ColorpickerHelper = ColorpickerHelper;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-inputs@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-inputs@19.
|
|
3
|
+
"_id": "@syncfusion/ej2-inputs@19.3.47",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-BUXgFj1vRssJASTKICmjSiFogsKI8UryrRI+GhyvlJcHU/KdRLokVdlPa1SrEdcjDdNn06sB7vQEMOFA2msSPQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-inputs",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"/@syncfusion/ej2-schedule",
|
|
39
39
|
"/@syncfusion/ej2-vue-inputs"
|
|
40
40
|
],
|
|
41
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-inputs/-/ej2-inputs-19.
|
|
42
|
-
"_shasum": "
|
|
41
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-inputs/-/ej2-inputs-19.3.47.tgz",
|
|
42
|
+
"_shasum": "4af02f0dd9c7704862297cf9c8865c6a9a5e07b1",
|
|
43
43
|
"_spec": "@syncfusion/ej2-inputs@*",
|
|
44
44
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
45
45
|
"author": {
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
},
|
|
48
48
|
"bundleDependencies": false,
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@syncfusion/ej2-base": "~19.
|
|
51
|
-
"@syncfusion/ej2-buttons": "~19.
|
|
52
|
-
"@syncfusion/ej2-popups": "~19.
|
|
53
|
-
"@syncfusion/ej2-splitbuttons": "~19.
|
|
50
|
+
"@syncfusion/ej2-base": "~19.3.47",
|
|
51
|
+
"@syncfusion/ej2-buttons": "~19.3.44",
|
|
52
|
+
"@syncfusion/ej2-popups": "~19.3.47",
|
|
53
|
+
"@syncfusion/ej2-splitbuttons": "~19.3.48"
|
|
54
54
|
},
|
|
55
55
|
"deprecated": false,
|
|
56
56
|
"description": "A package of Essential JS 2 input components such as Textbox, Color-picker, Masked-textbox, Numeric-textbox, Slider, Upload, and Form-validator that is used to get input from the users.",
|
|
@@ -118,6 +118,6 @@
|
|
|
118
118
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/inputs"
|
|
119
119
|
},
|
|
120
120
|
"typings": "index.d.ts",
|
|
121
|
-
"version": "19.
|
|
121
|
+
"version": "19.3.48",
|
|
122
122
|
"sideEffects": false
|
|
123
123
|
}
|
|
@@ -92,6 +92,13 @@ export interface ColorPickerModel extends ComponentModel{
|
|
|
92
92
|
*/
|
|
93
93
|
enableOpacity?: boolean;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Specifies the popup element creation on open.
|
|
97
|
+
*
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
100
|
+
createPopupOnClick?: boolean;
|
|
101
|
+
|
|
95
102
|
/**
|
|
96
103
|
* Triggers while selecting the color in picker / palette, when showButtons property is enabled.
|
|
97
104
|
*
|
|
@@ -108,6 +108,12 @@ export declare class ColorPicker extends Component<HTMLInputElement> implements
|
|
|
108
108
|
* @default true
|
|
109
109
|
*/
|
|
110
110
|
enableOpacity: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Specifies the popup element creation on open.
|
|
113
|
+
*
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
createPopupOnClick: boolean;
|
|
111
117
|
/**
|
|
112
118
|
* Triggers while selecting the color in picker / palette, when showButtons property is enabled.
|
|
113
119
|
*
|
|
@@ -188,6 +188,7 @@ var ColorPicker = /** @class */ (function (_super) {
|
|
|
188
188
|
target: this.container,
|
|
189
189
|
disabled: this.disabled,
|
|
190
190
|
enableRtl: this.enableRtl,
|
|
191
|
+
createPopupOnClick: this.createPopupOnClick,
|
|
191
192
|
open: this.onOpen.bind(this),
|
|
192
193
|
click: function () {
|
|
193
194
|
_this.trigger('change', {
|
|
@@ -1335,7 +1336,12 @@ var ColorPicker = /** @class */ (function (_super) {
|
|
|
1335
1336
|
if (!this.showButtons && !isKey) {
|
|
1336
1337
|
this.trigger('change', { currentValue: { hex: hex, rgba: rgba },
|
|
1337
1338
|
previousValue: { hex: this.value.slice(0, 7), rgba: this.convertToRgbString(this.hexToRgb(this.value)) }, value: cValue });
|
|
1338
|
-
this.
|
|
1339
|
+
if (this.enableOpacity) {
|
|
1340
|
+
this.setProperties({ 'value': cValue }, true);
|
|
1341
|
+
}
|
|
1342
|
+
else {
|
|
1343
|
+
this.setProperties({ 'value': hex }, true);
|
|
1344
|
+
}
|
|
1339
1345
|
this.element.value = hex ? hex : '#000000';
|
|
1340
1346
|
}
|
|
1341
1347
|
else {
|
|
@@ -1857,6 +1863,9 @@ var ColorPicker = /** @class */ (function (_super) {
|
|
|
1857
1863
|
__decorate([
|
|
1858
1864
|
Property(true)
|
|
1859
1865
|
], ColorPicker.prototype, "enableOpacity", void 0);
|
|
1866
|
+
__decorate([
|
|
1867
|
+
Property(false)
|
|
1868
|
+
], ColorPicker.prototype, "createPopupOnClick", void 0);
|
|
1860
1869
|
__decorate([
|
|
1861
1870
|
Event()
|
|
1862
1871
|
], ColorPicker.prototype, "select", void 0);
|
|
@@ -180,7 +180,7 @@ export function bindClearEvent() {
|
|
|
180
180
|
}
|
|
181
181
|
function resetHandler(e) {
|
|
182
182
|
e.preventDefault();
|
|
183
|
-
if (!this.inputObj.clearButton.classList.contains('e-clear-icon-hide')) {
|
|
183
|
+
if (!this.inputObj.clearButton.classList.contains('e-clear-icon-hide') || (this.inputObj.container.classList.contains('e-static-clear'))) {
|
|
184
184
|
clear.call(this, e);
|
|
185
185
|
this.value = '';
|
|
186
186
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Event, Property, EmitType, NotifyPropertyChanges, INotifyPropertyChanged, BaseEventArgs } from '@syncfusion/ej2-base';import { isNullOrUndefined, formatUnit, getValue, setValue, addClass, detach } from '@syncfusion/ej2-base';import { removeClass , Browser, closest
|
|
1
|
+
import { Component, Event, Property, EmitType, NotifyPropertyChanges, INotifyPropertyChanged, BaseEventArgs } from '@syncfusion/ej2-base';import { isNullOrUndefined, formatUnit, getValue, setValue, addClass, detach } from '@syncfusion/ej2-base';import { removeClass , Browser, closest} from '@syncfusion/ej2-base';import { Input, InputObject, FloatLabelType } from '../../input/input';import { regularExpressions, createMask, applyMask, wireEvents, unwireEvents, unstrippedValue, strippedValue } from '../base/index';import { setMaskValue, MaskUndo, setElementValue, bindClearEvent } from '../base/index';import { maskInputBlurHandler } from '../base/mask-base';
|
|
2
2
|
import {MaskChangeEventArgs,MaskFocusEventArgs,MaskBlurEventArgs} from "./maskedtextbox";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
|
@@ -132,7 +132,6 @@ export interface MaskedTextBoxModel extends ComponentModel{
|
|
|
132
132
|
* Triggers when the MaskedTextBox component is created.
|
|
133
133
|
*
|
|
134
134
|
* @event created
|
|
135
|
-
* @blazorProperty 'Created'
|
|
136
135
|
*/
|
|
137
136
|
created?: EmitType<Object>;
|
|
138
137
|
|
|
@@ -140,7 +139,6 @@ export interface MaskedTextBoxModel extends ComponentModel{
|
|
|
140
139
|
* Triggers when the MaskedTextBox component is destroyed.
|
|
141
140
|
*
|
|
142
141
|
* @event destroyed
|
|
143
|
-
* @blazorProperty 'Destroyed'
|
|
144
142
|
*/
|
|
145
143
|
destroyed?: EmitType<Object>;
|
|
146
144
|
|
|
@@ -148,7 +146,6 @@ export interface MaskedTextBoxModel extends ComponentModel{
|
|
|
148
146
|
* Triggers when the value of the MaskedTextBox changes.
|
|
149
147
|
*
|
|
150
148
|
* @event change
|
|
151
|
-
* @blazorProperty 'ValueChange'
|
|
152
149
|
*/
|
|
153
150
|
change?: EmitType <MaskChangeEventArgs>;
|
|
154
151
|
|
|
@@ -155,21 +155,18 @@ export declare class MaskedTextBox extends Component<HTMLInputElement> implement
|
|
|
155
155
|
* Triggers when the MaskedTextBox component is created.
|
|
156
156
|
*
|
|
157
157
|
* @event created
|
|
158
|
-
* @blazorProperty 'Created'
|
|
159
158
|
*/
|
|
160
159
|
created: EmitType<Object>;
|
|
161
160
|
/**
|
|
162
161
|
* Triggers when the MaskedTextBox component is destroyed.
|
|
163
162
|
*
|
|
164
163
|
* @event destroyed
|
|
165
|
-
* @blazorProperty 'Destroyed'
|
|
166
164
|
*/
|
|
167
165
|
destroyed: EmitType<Object>;
|
|
168
166
|
/**
|
|
169
167
|
* Triggers when the value of the MaskedTextBox changes.
|
|
170
168
|
*
|
|
171
169
|
* @event change
|
|
172
|
-
* @blazorProperty 'ValueChange'
|
|
173
170
|
*/
|
|
174
171
|
change: EmitType<MaskChangeEventArgs>;
|
|
175
172
|
/**
|
|
@@ -19,7 +19,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
19
19
|
};
|
|
20
20
|
import { Component, Event, Property, NotifyPropertyChanges } from '@syncfusion/ej2-base';
|
|
21
21
|
import { isNullOrUndefined, formatUnit, getValue, setValue, addClass, detach } from '@syncfusion/ej2-base';
|
|
22
|
-
import { removeClass, Browser, closest
|
|
22
|
+
import { removeClass, Browser, closest } from '@syncfusion/ej2-base';
|
|
23
23
|
import { Input } from '../../input/input';
|
|
24
24
|
import { regularExpressions, createMask, applyMask, wireEvents, unwireEvents, unstrippedValue, strippedValue } from '../base/index';
|
|
25
25
|
import { setMaskValue, setElementValue, bindClearEvent } from '../base/index';
|
|
@@ -133,9 +133,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
|
|
|
133
133
|
* @private
|
|
134
134
|
*/
|
|
135
135
|
MaskedTextBox.prototype.render = function () {
|
|
136
|
-
var _this = this;
|
|
137
136
|
if (this.element.tagName.toLowerCase() === 'input') {
|
|
138
|
-
var checkBlazor = isBlazor() && this.isServerRendered;
|
|
139
137
|
if (this.floatLabelType === 'Never') {
|
|
140
138
|
addClass([this.element], INPUT);
|
|
141
139
|
}
|
|
@@ -145,14 +143,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
|
|
|
145
143
|
this.element.setAttribute('name', this.element.id);
|
|
146
144
|
}
|
|
147
145
|
this.isInitial = true;
|
|
148
|
-
|
|
149
|
-
setTimeout(function () {
|
|
150
|
-
_this.resetMaskedTextBox();
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
this.resetMaskedTextBox();
|
|
155
|
-
}
|
|
146
|
+
this.resetMaskedTextBox();
|
|
156
147
|
this.isInitial = false;
|
|
157
148
|
this.setMaskPlaceholder(true, false);
|
|
158
149
|
this.setWidth(this.width);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, EventHandler, Property, Event, Browser, L10n, EmitType } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, BaseEventArgs } from '@syncfusion/ej2-base';import { attributes, addClass, removeClass, detach, closest } from '@syncfusion/ej2-base';import { isNullOrUndefined, getValue, formatUnit, setValue, merge } from '@syncfusion/ej2-base';import { Internationalization, NumberFormatOptions, getNumericObject
|
|
1
|
+
import { Component, EventHandler, Property, Event, Browser, L10n, EmitType } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, BaseEventArgs } from '@syncfusion/ej2-base';import { attributes, addClass, removeClass, detach, closest } from '@syncfusion/ej2-base';import { isNullOrUndefined, getValue, formatUnit, setValue, merge } from '@syncfusion/ej2-base';import { Internationalization, NumberFormatOptions, getNumericObject } from '@syncfusion/ej2-base';import { Input, InputObject, FloatLabelType } from '../input/input';
|
|
2
2
|
import {ChangeEventArgs,NumericFocusEventArgs,NumericBlurEventArgs} from "./numerictextbox";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
|
@@ -32,7 +32,6 @@ export interface NumericTextBoxModel extends ComponentModel{
|
|
|
32
32
|
* @default null
|
|
33
33
|
* @aspType object
|
|
34
34
|
* @isGenericType true
|
|
35
|
-
* @blazorDefaultValue SfBase.GetNumericValue<TValue>("MinValue")
|
|
36
35
|
|
|
37
36
|
*/
|
|
38
37
|
min?: number;
|
|
@@ -45,7 +44,6 @@ export interface NumericTextBoxModel extends ComponentModel{
|
|
|
45
44
|
* @default null
|
|
46
45
|
* @aspType object
|
|
47
46
|
* @isGenericType true
|
|
48
|
-
* @blazorDefaultValue SfBase.GetNumericValue<TValue>("MaxValue")
|
|
49
47
|
|
|
50
48
|
*/
|
|
51
49
|
max?: number;
|
|
@@ -57,7 +55,6 @@ export interface NumericTextBoxModel extends ComponentModel{
|
|
|
57
55
|
*
|
|
58
56
|
* @default 1
|
|
59
57
|
* @isGenericType true
|
|
60
|
-
* @blazorDefaultValue SfBase.GetNumericValue<TValue>("Step")
|
|
61
58
|
*/
|
|
62
59
|
step?: number;
|
|
63
60
|
|
|
@@ -137,9 +134,6 @@ export interface NumericTextBoxModel extends ComponentModel{
|
|
|
137
134
|
* [decimals](../../numerictextbox/formats/#precision-of-numbers).
|
|
138
135
|
*
|
|
139
136
|
* @default null
|
|
140
|
-
* @isBlazorNullableType true
|
|
141
|
-
* @blazorDefaultValue
|
|
142
|
-
* @blazorType int
|
|
143
137
|
*/
|
|
144
138
|
decimals?: number;
|
|
145
139
|
|
|
@@ -195,7 +189,6 @@ export interface NumericTextBoxModel extends ComponentModel{
|
|
|
195
189
|
* Triggers when the NumericTextBox component is created.
|
|
196
190
|
*
|
|
197
191
|
* @event created
|
|
198
|
-
* @blazorProperty 'Created'
|
|
199
192
|
*/
|
|
200
193
|
created?: EmitType<Object>;
|
|
201
194
|
|
|
@@ -203,7 +196,6 @@ export interface NumericTextBoxModel extends ComponentModel{
|
|
|
203
196
|
* Triggers when the NumericTextBox component is destroyed.
|
|
204
197
|
*
|
|
205
198
|
* @event destroyed
|
|
206
|
-
* @blazorProperty 'Destroyed'
|
|
207
199
|
*/
|
|
208
200
|
destroyed?: EmitType<Object>;
|
|
209
201
|
|
|
@@ -211,7 +203,6 @@ export interface NumericTextBoxModel extends ComponentModel{
|
|
|
211
203
|
* Triggers when the value of the NumericTextBox changes.
|
|
212
204
|
*
|
|
213
205
|
* @event change
|
|
214
|
-
* @blazorProperty 'ValueChange'
|
|
215
206
|
*/
|
|
216
207
|
change?: EmitType<ChangeEventArgs>;
|
|
217
208
|
|
|
@@ -74,7 +74,6 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
74
74
|
* @default null
|
|
75
75
|
* @aspType object
|
|
76
76
|
* @isGenericType true
|
|
77
|
-
* @blazorDefaultValue SfBase.GetNumericValue<TValue>("MinValue")
|
|
78
77
|
|
|
79
78
|
*/
|
|
80
79
|
min: number;
|
|
@@ -86,7 +85,6 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
86
85
|
* @default null
|
|
87
86
|
* @aspType object
|
|
88
87
|
* @isGenericType true
|
|
89
|
-
* @blazorDefaultValue SfBase.GetNumericValue<TValue>("MaxValue")
|
|
90
88
|
|
|
91
89
|
*/
|
|
92
90
|
max: number;
|
|
@@ -97,7 +95,6 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
97
95
|
*
|
|
98
96
|
* @default 1
|
|
99
97
|
* @isGenericType true
|
|
100
|
-
* @blazorDefaultValue SfBase.GetNumericValue<TValue>("Step")
|
|
101
98
|
*/
|
|
102
99
|
step: number;
|
|
103
100
|
/**
|
|
@@ -169,9 +166,6 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
169
166
|
* [decimals](../../numerictextbox/formats/#precision-of-numbers).
|
|
170
167
|
*
|
|
171
168
|
* @default null
|
|
172
|
-
* @isBlazorNullableType true
|
|
173
|
-
* @blazorDefaultValue
|
|
174
|
-
* @blazorType int
|
|
175
169
|
*/
|
|
176
170
|
decimals: number;
|
|
177
171
|
/**
|
|
@@ -221,21 +215,18 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
221
215
|
* Triggers when the NumericTextBox component is created.
|
|
222
216
|
*
|
|
223
217
|
* @event created
|
|
224
|
-
* @blazorProperty 'Created'
|
|
225
218
|
*/
|
|
226
219
|
created: EmitType<Object>;
|
|
227
220
|
/**
|
|
228
221
|
* Triggers when the NumericTextBox component is destroyed.
|
|
229
222
|
*
|
|
230
223
|
* @event destroyed
|
|
231
|
-
* @blazorProperty 'Destroyed'
|
|
232
224
|
*/
|
|
233
225
|
destroyed: EmitType<Object>;
|
|
234
226
|
/**
|
|
235
227
|
* Triggers when the value of the NumericTextBox changes.
|
|
236
228
|
*
|
|
237
229
|
* @event change
|
|
238
|
-
* @blazorProperty 'ValueChange'
|
|
239
230
|
*/
|
|
240
231
|
change: EmitType<ChangeEventArgs>;
|
|
241
232
|
/**
|
|
@@ -21,7 +21,7 @@ import { Component, EventHandler, Property, Event, Browser, L10n } from '@syncfu
|
|
|
21
21
|
import { NotifyPropertyChanges } from '@syncfusion/ej2-base';
|
|
22
22
|
import { attributes, addClass, removeClass, detach, closest } from '@syncfusion/ej2-base';
|
|
23
23
|
import { isNullOrUndefined, getValue, formatUnit, setValue, merge } from '@syncfusion/ej2-base';
|
|
24
|
-
import { Internationalization, getNumericObject
|
|
24
|
+
import { Internationalization, getNumericObject } from '@syncfusion/ej2-base';
|
|
25
25
|
import { Input } from '../input/input';
|
|
26
26
|
var ROOT = 'e-control-wrapper e-numeric';
|
|
27
27
|
var SPINICON = 'e-input-group-icon';
|
|
@@ -96,15 +96,13 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
96
96
|
this.element = input;
|
|
97
97
|
setValue('ej2_instances', ejInstance, this.element);
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
107
|
-
}
|
|
99
|
+
attributes(this.element, { 'role': 'spinbutton', 'tabindex': '0', 'autocomplete': 'off', 'aria-live': 'assertive' });
|
|
100
|
+
var localeText = {
|
|
101
|
+
incrementTitle: 'Increment value', decrementTitle: 'Decrement value', placeholder: this.placeholder
|
|
102
|
+
};
|
|
103
|
+
this.l10n = new L10n('numerictextbox', localeText, this.locale);
|
|
104
|
+
if (this.l10n.getConstant('placeholder') !== '') {
|
|
105
|
+
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
108
106
|
}
|
|
109
107
|
this.isValidState = true;
|
|
110
108
|
this.inputStyle = null;
|
|
@@ -113,16 +111,14 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
113
111
|
this.initCultureInfo();
|
|
114
112
|
this.initCultureFunc();
|
|
115
113
|
this.prevValue = this.value;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
this.inputEleValue = this.value;
|
|
121
|
-
}
|
|
114
|
+
this.updateHTMLAttrToElement();
|
|
115
|
+
this.checkAttributes(false);
|
|
116
|
+
if (this.formEle) {
|
|
117
|
+
this.inputEleValue = this.value;
|
|
122
118
|
}
|
|
123
119
|
this.validateMinMax();
|
|
124
120
|
this.validateStep();
|
|
125
|
-
if (this.placeholder === null
|
|
121
|
+
if (this.placeholder === null) {
|
|
126
122
|
this.updatePlaceholder();
|
|
127
123
|
}
|
|
128
124
|
};
|
|
@@ -134,47 +130,26 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
134
130
|
*/
|
|
135
131
|
NumericTextBox.prototype.render = function () {
|
|
136
132
|
if (this.element.tagName.toLowerCase() === 'input') {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
this.spinBtnCreation();
|
|
141
|
-
}
|
|
142
|
-
this.setElementWidth(this.width);
|
|
143
|
-
if (!this.container.classList.contains('e-input-group')) {
|
|
144
|
-
this.container.classList.add('e-input-group');
|
|
145
|
-
}
|
|
146
|
-
this.changeValue(this.value === null || isNaN(this.value) ?
|
|
147
|
-
null : this.strictMode ? this.trimValue(this.value) : this.value);
|
|
133
|
+
this.createWrapper();
|
|
134
|
+
if (this.showSpinButton) {
|
|
135
|
+
this.spinBtnCreation();
|
|
148
136
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
this.
|
|
152
|
-
this.hiddenInput = this.container.querySelector('input[type="hidden"]');
|
|
153
|
-
if (this.showClearButton) {
|
|
154
|
-
this.inputWrapper.clearButton = this.container.querySelector('.e-clear-icon');
|
|
155
|
-
Input.wireClearBtnEvents(this.element, this.inputWrapper.clearButton, this.inputWrapper.container);
|
|
156
|
-
}
|
|
157
|
-
if (this.showSpinButton) {
|
|
158
|
-
this.spinDown = this.container.querySelector('.' + SPINDOWN);
|
|
159
|
-
this.spinUp = this.container.querySelector('.' + SPINUP);
|
|
160
|
-
this.wireSpinBtnEvents();
|
|
161
|
-
}
|
|
162
|
-
Input.bindInitialEvent({
|
|
163
|
-
element: this.element, buttons: null, customTag: null, floatLabelType: this.floatLabelType, properties: this.properties
|
|
164
|
-
});
|
|
137
|
+
this.setElementWidth(this.width);
|
|
138
|
+
if (!this.container.classList.contains('e-input-group')) {
|
|
139
|
+
this.container.classList.add('e-input-group');
|
|
165
140
|
}
|
|
141
|
+
this.changeValue(this.value === null || isNaN(this.value) ?
|
|
142
|
+
null : this.strictMode ? this.trimValue(this.value) : this.value);
|
|
166
143
|
this.wireEvents();
|
|
167
|
-
if (
|
|
168
|
-
if (this.
|
|
169
|
-
|
|
170
|
-
this.setProperties({ value: this.roundNumber(this.value, this.decimals) }, true);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
if (this.element.getAttribute('value') || this.value) {
|
|
174
|
-
this.element.setAttribute('value', this.element.value);
|
|
175
|
-
this.hiddenInput.setAttribute('value', this.hiddenInput.value);
|
|
144
|
+
if (this.value !== null && !isNaN(this.value)) {
|
|
145
|
+
if (this.decimals) {
|
|
146
|
+
this.setProperties({ value: this.roundNumber(this.value, this.decimals) }, true);
|
|
176
147
|
}
|
|
177
148
|
}
|
|
149
|
+
if (this.element.getAttribute('value') || this.value) {
|
|
150
|
+
this.element.setAttribute('value', this.element.value);
|
|
151
|
+
this.hiddenInput.setAttribute('value', this.hiddenInput.value);
|
|
152
|
+
}
|
|
178
153
|
this.elementPrevValue = this.element.value;
|
|
179
154
|
if (this.element.hasAttribute('data-val')) {
|
|
180
155
|
this.element.setAttribute('data-val', 'false');
|
|
@@ -441,7 +416,7 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
441
416
|
};
|
|
442
417
|
NumericTextBox.prototype.resetHandler = function (e) {
|
|
443
418
|
e.preventDefault();
|
|
444
|
-
if (!(this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide'))) {
|
|
419
|
+
if (!(this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide')) || this.inputWrapper.container.classList.contains('e-static-clear')) {
|
|
445
420
|
this.clear(e);
|
|
446
421
|
}
|
|
447
422
|
this.isInteract = true;
|
|
@@ -1089,25 +1064,23 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
1089
1064
|
*/
|
|
1090
1065
|
NumericTextBox.prototype.destroy = function () {
|
|
1091
1066
|
this.unwireEvents();
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
_super.prototype.destroy.call(this);
|
|
1110
|
-
}
|
|
1067
|
+
detach(this.hiddenInput);
|
|
1068
|
+
if (this.showSpinButton) {
|
|
1069
|
+
this.unwireSpinBtnEvents();
|
|
1070
|
+
detach(this.spinUp);
|
|
1071
|
+
detach(this.spinDown);
|
|
1072
|
+
}
|
|
1073
|
+
var attrArray = ['aria-labelledby', 'role', 'autocomplete', 'aria-readonly',
|
|
1074
|
+
'autocorrect', 'aria-disabled', 'aria-placeholder', 'autocapitalize',
|
|
1075
|
+
'spellcheck', 'aria-autocomplete', 'tabindex', 'aria-valuemin',
|
|
1076
|
+
'aria-valuemax', 'aria-live', 'aria-valuenow', 'aria-invalid'];
|
|
1077
|
+
for (var i = 0; i < attrArray.length; i++) {
|
|
1078
|
+
this.element.removeAttribute(attrArray[i]);
|
|
1079
|
+
}
|
|
1080
|
+
this.element.classList.remove('e-input');
|
|
1081
|
+
this.container.insertAdjacentElement('afterend', this.element);
|
|
1082
|
+
detach(this.container);
|
|
1083
|
+
_super.prototype.destroy.call(this);
|
|
1111
1084
|
};
|
|
1112
1085
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns */
|
|
1113
1086
|
/**
|
|
@@ -1261,33 +1234,16 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
1261
1234
|
}
|
|
1262
1235
|
};
|
|
1263
1236
|
NumericTextBox.prototype.updateClearButton = function (newProp) {
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
this.inputWrapper.clearButton = this.container.querySelector('.e-clear-icon');
|
|
1267
|
-
Input.wireClearBtnEvents(this.element, this.inputWrapper.clearButton, this.inputWrapper.container);
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
else {
|
|
1271
|
-
Input.setClearButton(newProp.showClearButton, this.element, this.inputWrapper, undefined, this.createElement);
|
|
1272
|
-
this.bindClearEvent();
|
|
1273
|
-
}
|
|
1237
|
+
Input.setClearButton(newProp.showClearButton, this.element, this.inputWrapper, undefined, this.createElement);
|
|
1238
|
+
this.bindClearEvent();
|
|
1274
1239
|
};
|
|
1275
1240
|
NumericTextBox.prototype.updateSpinButton = function (newProp) {
|
|
1276
|
-
if (
|
|
1277
|
-
|
|
1278
|
-
this.spinDown = this.container.querySelector('.' + SPINDOWN);
|
|
1279
|
-
this.spinUp = this.container.querySelector('.' + SPINUP);
|
|
1280
|
-
this.wireSpinBtnEvents();
|
|
1281
|
-
}
|
|
1241
|
+
if (newProp.showSpinButton) {
|
|
1242
|
+
this.spinBtnCreation();
|
|
1282
1243
|
}
|
|
1283
1244
|
else {
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
}
|
|
1287
|
-
else {
|
|
1288
|
-
detach(this.spinUp);
|
|
1289
|
-
detach(this.spinDown);
|
|
1290
|
-
}
|
|
1245
|
+
detach(this.spinUp);
|
|
1246
|
+
detach(this.spinDown);
|
|
1291
1247
|
}
|
|
1292
1248
|
};
|
|
1293
1249
|
/**
|
package/src/slider/slider.d.ts
CHANGED