@syncfusion/ej2-inputs 24.2.9 → 25.1.37
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/CHANGELOG.md +3 -33
- package/dist/ej2-inputs.min.js +2 -2
- 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 +1098 -269
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +1124 -274
- 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/package.json +10 -10
- package/src/common/signature-base.d.ts +1 -0
- package/src/common/signature-base.js +4 -3
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/input/input.d.ts +18 -1
- package/src/input/input.js +234 -69
- package/src/maskedtextbox/base/mask-base.js +1 -0
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +1 -0
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +9 -2
- package/src/numerictextbox/numerictextbox.d.ts +1 -0
- package/src/numerictextbox/numerictextbox.js +8 -1
- package/src/rating/rating.js +1 -0
- package/src/signature/signature.js +2 -0
- package/src/slider/slider-model.d.ts +3 -2
- package/src/slider/slider.d.ts +3 -2
- package/src/slider/slider.js +6 -1
- package/src/textarea/index.d.ts +5 -0
- package/src/textarea/index.js +4 -0
- package/src/textarea/textarea-model.d.ts +155 -0
- package/src/textarea/textarea.d.ts +231 -0
- package/src/textarea/textarea.js +696 -0
- package/src/textbox/textbox-model.d.ts +1 -1
- package/src/textbox/textbox.d.ts +3 -5
- package/src/textbox/textbox.js +21 -57
- package/styles/bootstrap-dark.css +69 -8
- package/styles/bootstrap-dark.scss +1 -0
- package/styles/bootstrap.css +69 -8
- package/styles/bootstrap.scss +1 -0
- package/styles/bootstrap4.css +69 -8
- package/styles/bootstrap4.scss +1 -0
- package/styles/bootstrap5-dark.css +69 -8
- package/styles/bootstrap5-dark.scss +1 -0
- package/styles/bootstrap5.css +69 -8
- package/styles/bootstrap5.scss +1 -0
- package/styles/color-picker/_bds-definition.scss +133 -0
- package/styles/color-picker/icons/_bds.scss +9 -0
- package/styles/data-form/_bds-definition.scss +41 -0
- package/styles/data-form/_layout.scss +3 -3
- package/styles/data-form/bootstrap-dark.css +8 -8
- package/styles/data-form/bootstrap.css +8 -8
- package/styles/data-form/bootstrap4.css +8 -8
- package/styles/data-form/bootstrap5-dark.css +8 -8
- package/styles/data-form/bootstrap5.css +8 -8
- package/styles/data-form/fabric-dark.css +8 -8
- package/styles/data-form/fabric.css +8 -8
- package/styles/data-form/fluent-dark.css +8 -8
- package/styles/data-form/fluent.css +8 -8
- package/styles/data-form/highcontrast-light.css +8 -8
- package/styles/data-form/highcontrast.css +8 -8
- package/styles/data-form/material-dark.css +8 -8
- package/styles/data-form/material.css +8 -8
- package/styles/data-form/material3-dark.css +8 -8
- package/styles/data-form/material3.css +8 -8
- package/styles/data-form/tailwind-dark.css +8 -8
- package/styles/data-form/tailwind.css +8 -8
- package/styles/fabric-dark.css +69 -8
- package/styles/fabric-dark.scss +1 -0
- package/styles/fabric.css +69 -8
- package/styles/fabric.scss +1 -0
- package/styles/fluent-dark.css +69 -8
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent.css +69 -8
- package/styles/fluent.scss +1 -0
- package/styles/highcontrast-light.css +69 -8
- package/styles/highcontrast-light.scss +1 -0
- package/styles/highcontrast.css +69 -8
- package/styles/highcontrast.scss +1 -0
- package/styles/input/_bds-definition.scss +482 -0
- package/styles/input/icons/_bds.scss +17 -0
- package/styles/maskedtextbox/_bds-definition.scss +7 -0
- package/styles/material-dark.css +75 -8
- package/styles/material-dark.scss +1 -0
- package/styles/material.css +83 -8
- package/styles/material.scss +1 -0
- package/styles/material3-dark.css +83 -8
- package/styles/material3-dark.scss +1 -0
- package/styles/material3.css +83 -8
- package/styles/material3.scss +1 -0
- package/styles/numerictextbox/_bds-definition.scss +3 -0
- package/styles/numerictextbox/icons/_bds.scss +11 -0
- package/styles/rating/_bds-definition.scss +47 -0
- package/styles/signature/_bds-definition.scss +3 -0
- package/styles/slider/_bds-definition.scss +88 -0
- package/styles/tailwind-dark.css +69 -8
- package/styles/tailwind-dark.scss +1 -0
- package/styles/tailwind.css +69 -8
- package/styles/tailwind.scss +1 -0
- package/styles/textarea/_all.scss +1 -0
- package/styles/textarea/_bds-definition.scss +1 -0
- package/styles/textarea/_bootstrap-dark-definition.scss +1 -0
- package/styles/textarea/_bootstrap-definition.scss +1 -0
- package/styles/textarea/_bootstrap4-definition.scss +1 -0
- package/styles/textarea/_bootstrap5-dark-definition.scss +1 -0
- package/styles/textarea/_bootstrap5-definition.scss +1 -0
- package/styles/textarea/_fabric-dark-definition.scss +1 -0
- package/styles/textarea/_fabric-definition.scss +1 -0
- package/styles/textarea/_fluent-dark-definition.scss +1 -0
- package/styles/textarea/_fluent-definition.scss +1 -0
- package/styles/textarea/_fusionnew-definition.scss +1 -0
- package/styles/textarea/_highcontrast-definition.scss +1 -0
- package/styles/textarea/_highcontrast-light-definition.scss +1 -0
- package/styles/textarea/_layout.scss +36 -0
- package/styles/textarea/_material-dark-definition.scss +1 -0
- package/styles/textarea/_material-definition.scss +1 -0
- package/styles/textarea/_material3-dark-definition.scss +1 -0
- package/styles/textarea/_material3-definition.scss +1 -0
- package/styles/textarea/_tailwind-dark-definition.scss +1 -0
- package/styles/textarea/_tailwind-definition.scss +1 -0
- package/styles/textarea/_theme.scss +1 -0
- package/styles/textarea/bootstrap-dark.css +33 -0
- package/styles/textarea/bootstrap-dark.scss +5 -0
- package/styles/textarea/bootstrap.css +33 -0
- package/styles/textarea/bootstrap.scss +5 -0
- package/styles/textarea/bootstrap4.css +33 -0
- package/styles/textarea/bootstrap4.scss +5 -0
- package/styles/textarea/bootstrap5-dark.css +33 -0
- package/styles/textarea/bootstrap5-dark.scss +5 -0
- package/styles/textarea/bootstrap5.css +33 -0
- package/styles/textarea/bootstrap5.scss +5 -0
- package/styles/textarea/fabric-dark.css +33 -0
- package/styles/textarea/fabric-dark.scss +5 -0
- package/styles/textarea/fabric.css +33 -0
- package/styles/textarea/fabric.scss +5 -0
- package/styles/textarea/fluent-dark.css +33 -0
- package/styles/textarea/fluent-dark.scss +5 -0
- package/styles/textarea/fluent.css +33 -0
- package/styles/textarea/fluent.scss +5 -0
- package/styles/textarea/highcontrast-light.css +33 -0
- package/styles/textarea/highcontrast-light.scss +5 -0
- package/styles/textarea/highcontrast.css +33 -0
- package/styles/textarea/highcontrast.scss +5 -0
- package/styles/textarea/material-dark.css +39 -0
- package/styles/textarea/material-dark.scss +5 -0
- package/styles/textarea/material.css +47 -0
- package/styles/textarea/material.scss +5 -0
- package/styles/textarea/material3-dark.css +102 -0
- package/styles/textarea/material3-dark.scss +6 -0
- package/styles/textarea/material3.css +158 -0
- package/styles/textarea/material3.scss +6 -0
- package/styles/textarea/tailwind-dark.css +33 -0
- package/styles/textarea/tailwind-dark.scss +5 -0
- package/styles/textarea/tailwind.css +33 -0
- package/styles/textarea/tailwind.scss +5 -0
- package/styles/textbox/_all.scss +1 -1
- package/styles/textbox/_bds-definition.scss +4 -0
- package/styles/textbox/_layout.scss +0 -11
- package/styles/textbox/bootstrap-dark.css +27 -1
- package/styles/textbox/bootstrap.css +27 -1
- package/styles/textbox/bootstrap4.css +27 -1
- package/styles/textbox/bootstrap5-dark.css +27 -1
- package/styles/textbox/bootstrap5.css +27 -1
- package/styles/textbox/fabric-dark.css +27 -1
- package/styles/textbox/fabric.css +27 -1
- package/styles/textbox/fluent-dark.css +27 -1
- package/styles/textbox/fluent.css +27 -1
- package/styles/textbox/highcontrast-light.css +27 -1
- package/styles/textbox/highcontrast.css +27 -1
- package/styles/textbox/material-dark.css +27 -1
- package/styles/textbox/material.css +27 -1
- package/styles/textbox/material3-dark.css +27 -1
- package/styles/textbox/material3.css +27 -1
- package/styles/textbox/tailwind-dark.css +27 -1
- package/styles/textbox/tailwind.css +27 -1
- package/styles/uploader/_bds-definition.scss +232 -0
- package/styles/uploader/icons/_bds.scss +34 -0
- package/textarea.d.ts +4 -0
- package/textarea.js +4 -0
- package/.eslintrc.json +0 -260
- package/tslint.json +0 -111
|
@@ -21,6 +21,14 @@ var CLASSNAMES = {
|
|
|
21
21
|
INPUTCUSTOMTAG: 'e-input-custom-tag',
|
|
22
22
|
FLOATCUSTOMTAG: 'e-float-custom-tag'
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Defines the constant attributes for the input element container.
|
|
26
|
+
*/
|
|
27
|
+
var containerAttributes = ['title', 'style', 'class'];
|
|
28
|
+
/**
|
|
29
|
+
* Defines the constant focus class for the input element.
|
|
30
|
+
*/
|
|
31
|
+
var TEXTBOX_FOCUS = 'e-input-focus';
|
|
24
32
|
/**
|
|
25
33
|
* Base for Input creation through util methods.
|
|
26
34
|
*/
|
|
@@ -37,6 +45,7 @@ var Input;
|
|
|
37
45
|
*
|
|
38
46
|
*/
|
|
39
47
|
function createInput(args, internalCreateElement) {
|
|
48
|
+
args.element.__eventHandlers = {};
|
|
40
49
|
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
|
|
41
50
|
var inputObject = { container: null, buttons: [], clearButton: null };
|
|
42
51
|
floatType = args.floatLabelType;
|
|
@@ -74,37 +83,64 @@ var Input;
|
|
|
74
83
|
return inputObject;
|
|
75
84
|
}
|
|
76
85
|
Input.createInput = createInput;
|
|
86
|
+
function bindFocusEventHandler(args) {
|
|
87
|
+
var parent = getParentNode(args.element);
|
|
88
|
+
if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline') || parent.classList.contains('e-filled')) {
|
|
89
|
+
parent.classList.add('e-input-focus');
|
|
90
|
+
}
|
|
91
|
+
if (args.floatLabelType === 'Auto') {
|
|
92
|
+
setTimeout(function () {
|
|
93
|
+
Input.calculateWidth(args.element, parent);
|
|
94
|
+
}, 80);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function bindBlurEventHandler(args) {
|
|
98
|
+
var parent = getParentNode(args.element);
|
|
99
|
+
if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline') || parent.classList.contains('e-filled')) {
|
|
100
|
+
parent.classList.remove('e-input-focus');
|
|
101
|
+
}
|
|
102
|
+
if (args.floatLabelType === 'Auto' && args.element.value === '') {
|
|
103
|
+
setTimeout(function () {
|
|
104
|
+
Input.calculateWidth(args.element, parent);
|
|
105
|
+
}, 80);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function bindInputEventHandler(args) {
|
|
109
|
+
checkInputValue(args.floatLabelType, args.element);
|
|
110
|
+
}
|
|
77
111
|
function bindInitialEvent(args) {
|
|
78
112
|
checkInputValue(args.floatLabelType, args.element);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, 80);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
args.element.addEventListener('blur', function () {
|
|
92
|
-
var parent = getParentNode(this);
|
|
93
|
-
if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline')
|
|
94
|
-
|| parent.classList.contains('e-filled')) {
|
|
95
|
-
parent.classList.remove('e-input-focus');
|
|
96
|
-
}
|
|
97
|
-
if (args.floatLabelType === 'Auto' && args.element.value === '') {
|
|
98
|
-
setTimeout(function () {
|
|
99
|
-
Input.calculateWidth(args.element, parent);
|
|
100
|
-
}, 80);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
args.element.addEventListener('input', function () {
|
|
104
|
-
checkInputValue(floatType, args.element);
|
|
105
|
-
});
|
|
113
|
+
var focusHandler = function () { return bindFocusEventHandler(args); };
|
|
114
|
+
var blurHandler = function () { return bindBlurEventHandler(args); };
|
|
115
|
+
var inputHandler = function () { return bindInputEventHandler(args); };
|
|
116
|
+
args.element.addEventListener('focus', focusHandler);
|
|
117
|
+
args.element.addEventListener('blur', blurHandler);
|
|
118
|
+
args.element.addEventListener('input', inputHandler);
|
|
119
|
+
args.element.__eventHandlers["inputFocusHandler"] = { focusHandler: focusHandler };
|
|
120
|
+
args.element.__eventHandlers["inputBlurHandler"] = { blurHandler: blurHandler };
|
|
121
|
+
args.element.__eventHandlers["inputHandler"] = { inputHandler: inputHandler };
|
|
106
122
|
}
|
|
107
123
|
Input.bindInitialEvent = bindInitialEvent;
|
|
124
|
+
function unbindInitialEvent(args) {
|
|
125
|
+
if (!isNullOrUndefined(args.element)) {
|
|
126
|
+
if (!isNullOrUndefined(args.element.__eventHandlers)) {
|
|
127
|
+
if (!isNullOrUndefined(args.element.__eventHandlers["inputFocusHandler"])
|
|
128
|
+
&& !isNullOrUndefined(args.element.__eventHandlers["inputBlurHandler"])
|
|
129
|
+
&& !isNullOrUndefined(args.element.__eventHandlers["inputHandler"])) {
|
|
130
|
+
var focusHandler_1 = args.element.__eventHandlers["inputFocusHandler"].focusHandler;
|
|
131
|
+
var blurHandler_1 = args.element.__eventHandlers["inputBlurHandler"].blurHandler;
|
|
132
|
+
var inputHandler_1 = args.element.__eventHandlers["inputHandler"].inputHandler;
|
|
133
|
+
args.element.removeEventListener('focus', focusHandler_1);
|
|
134
|
+
args.element.removeEventListener('blur', blurHandler_1);
|
|
135
|
+
args.element.removeEventListener('input', inputHandler_1);
|
|
136
|
+
// Clean up stored bound functions
|
|
137
|
+
delete args.element.__eventHandlers["inputFocusHandler"];
|
|
138
|
+
delete args.element.__eventHandlers["inputBlurHandler"];
|
|
139
|
+
delete args.element.__eventHandlers["inputHandler"];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
108
144
|
function checkInputValue(floatLabelType, inputElement) {
|
|
109
145
|
var inputValue = inputElement.value;
|
|
110
146
|
var inputParent = inputElement.parentElement;
|
|
@@ -154,8 +190,16 @@ var Input;
|
|
|
154
190
|
}
|
|
155
191
|
Input.wireFloatingEvents = wireFloatingEvents;
|
|
156
192
|
function unwireFloatingEvents(element) {
|
|
157
|
-
element
|
|
158
|
-
|
|
193
|
+
if (!isNullOrUndefined(element)) {
|
|
194
|
+
element.removeEventListener('focus', _focusFn);
|
|
195
|
+
element.removeEventListener('blur', _blurFn);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function inputEventHandler(args) {
|
|
199
|
+
validateLabel(args.element, args.floatLabelType);
|
|
200
|
+
}
|
|
201
|
+
function blurEventHandler(args) {
|
|
202
|
+
validateLabel(args.element, args.floatLabelType);
|
|
159
203
|
}
|
|
160
204
|
function createFloatingInput(args, inputObject, internalCreateElement) {
|
|
161
205
|
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
|
|
@@ -211,19 +255,36 @@ var Input;
|
|
|
211
255
|
addClass([floatLabelElement], CLASSNAMES.LABELTOP);
|
|
212
256
|
}
|
|
213
257
|
if (args.floatLabelType === 'Auto') {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
258
|
+
var inputFloatHandler = function () { return inputEventHandler(args); };
|
|
259
|
+
var blurFloatHandler = function () { return blurEventHandler(args); };
|
|
260
|
+
// Add event listeners using the defined functions
|
|
261
|
+
args.element.addEventListener('input', inputFloatHandler);
|
|
262
|
+
args.element.addEventListener('blur', blurFloatHandler);
|
|
263
|
+
// Store the event handler functions to remove them later
|
|
264
|
+
args.element.__eventHandlers["floatInputHandler"] = { inputFloatHandler: inputFloatHandler };
|
|
265
|
+
args.element.__eventHandlers["floatBlurHandler"] = { blurFloatHandler: blurFloatHandler };
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
unWireFloatLabelEvents(args);
|
|
222
269
|
}
|
|
223
270
|
if (!isNullOrUndefined(args.element.getAttribute('id'))) {
|
|
224
271
|
floatLabelElement.setAttribute('for', args.element.getAttribute('id'));
|
|
225
272
|
}
|
|
226
273
|
}
|
|
274
|
+
function unWireFloatLabelEvents(args) {
|
|
275
|
+
if (!isNullOrUndefined(args.element) && !isNullOrUndefined(args.element.__eventHandlers)
|
|
276
|
+
&& !isNullOrUndefined(args.element.__eventHandlers["floatInputHandler"])
|
|
277
|
+
&& !isNullOrUndefined(args.element.__eventHandlers["floatBlurHandler"])) {
|
|
278
|
+
var inputFloatHandler = args.element.__eventHandlers["floatInputHandler"].inputFloatHandler;
|
|
279
|
+
var blurFloatHandler = args.element.__eventHandlers["floatBlurHandler"].blurFloatHandler;
|
|
280
|
+
// Remove the event listeners using the defined functions
|
|
281
|
+
args.element.removeEventListener('input', inputFloatHandler);
|
|
282
|
+
args.element.removeEventListener('blur', blurFloatHandler);
|
|
283
|
+
// Clean up stored event handler functions
|
|
284
|
+
delete args.element.__eventHandlers["floatInputHandler"];
|
|
285
|
+
delete args.element.__eventHandlers["floatBlurHandler"];
|
|
286
|
+
}
|
|
287
|
+
}
|
|
227
288
|
function checkFloatLabelType(type, container) {
|
|
228
289
|
if (type === 'Always' && container.classList.contains('e-outline')) {
|
|
229
290
|
container.classList.add('e-valid-input');
|
|
@@ -311,40 +372,89 @@ var Input;
|
|
|
311
372
|
button.setAttribute('aria-label', 'close');
|
|
312
373
|
return button;
|
|
313
374
|
}
|
|
375
|
+
function clickHandler(event, element, button) {
|
|
376
|
+
if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
|
|
377
|
+
event.preventDefault();
|
|
378
|
+
if (element !== document.activeElement) {
|
|
379
|
+
element.focus();
|
|
380
|
+
}
|
|
381
|
+
element.value = '';
|
|
382
|
+
addClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
function inputHandler(element, button) {
|
|
386
|
+
updateIconState(element.value, button);
|
|
387
|
+
}
|
|
388
|
+
function focusHandler(element, button) {
|
|
389
|
+
updateIconState(element.value, button, element.readOnly);
|
|
390
|
+
}
|
|
391
|
+
function blurHandler(element, button) {
|
|
392
|
+
setTimeout(function () {
|
|
393
|
+
if (!isNullOrUndefined(button)) {
|
|
394
|
+
addClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
395
|
+
button = !isNullOrUndefined(element) && element.classList.contains('e-combobox') ? null : button;
|
|
396
|
+
}
|
|
397
|
+
}, 200);
|
|
398
|
+
}
|
|
314
399
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
315
400
|
function wireClearBtnEvents(element, button, container) {
|
|
316
401
|
if (isBindClearAction === undefined || isBindClearAction) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
402
|
+
var clickHandlerEvent = function (e) { return clickHandler(e, element, button); };
|
|
403
|
+
button.addEventListener('click', clickHandlerEvent);
|
|
404
|
+
element.__eventHandlers["clearClickHandler"] = { clickHandlerEvent: clickHandlerEvent };
|
|
405
|
+
}
|
|
406
|
+
var inputHandlerEvent = function () { return inputHandler(element, button); };
|
|
407
|
+
var focusHandlerEvent = function () { return focusHandler(element, button); };
|
|
408
|
+
var blurHandlerEvent = function () { return blurHandler(element, button); };
|
|
409
|
+
element.addEventListener('input', inputHandlerEvent);
|
|
410
|
+
element.addEventListener('focus', focusHandlerEvent);
|
|
411
|
+
element.addEventListener('blur', blurHandlerEvent);
|
|
412
|
+
// Store the bound functions to remove them later
|
|
413
|
+
element.__eventHandlers["clearInputHandler"] = { inputHandlerEvent: inputHandlerEvent };
|
|
414
|
+
element.__eventHandlers["clearFocusHandler"] = { focusHandlerEvent: focusHandlerEvent };
|
|
415
|
+
element.__eventHandlers["clearBlurHandler"] = { blurHandlerEvent: blurHandlerEvent };
|
|
416
|
+
}
|
|
417
|
+
Input.wireClearBtnEvents = wireClearBtnEvents;
|
|
418
|
+
function unWireClearBtnEvents(element, button) {
|
|
419
|
+
if (!isNullOrUndefined(element) && !isNullOrUndefined(element.__eventHandlers)) {
|
|
420
|
+
if (!isNullOrUndefined(element.__eventHandlers["clearClickHandler"])) {
|
|
421
|
+
var clickHandlerEvent = element.__eventHandlers["clearClickHandler"].clickHandlerEvent;
|
|
422
|
+
if (isBindClearAction === undefined || isBindClearAction) {
|
|
423
|
+
if (!isNullOrUndefined(button)) {
|
|
424
|
+
button.removeEventListener('click', clickHandlerEvent);
|
|
322
425
|
}
|
|
323
|
-
element.value = '';
|
|
324
|
-
addClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
325
426
|
}
|
|
326
|
-
|
|
427
|
+
delete element.__eventHandlers["clearClickHandler"];
|
|
428
|
+
}
|
|
429
|
+
if (!isNullOrUndefined(element.__eventHandlers["clearInputHandler"])
|
|
430
|
+
&& !isNullOrUndefined(element.__eventHandlers["clearFocusHandler"])
|
|
431
|
+
&& !isNullOrUndefined(element.__eventHandlers["clearBlurHandler"])) {
|
|
432
|
+
var inputHandlerEvent = element.__eventHandlers["clearInputHandler"].inputHandlerEvent;
|
|
433
|
+
var focusHandlerEvent = element.__eventHandlers["clearFocusHandler"].focusHandlerEvent;
|
|
434
|
+
var blurHandlerEvent = element.__eventHandlers["clearBlurHandler"].blurHandlerEvent;
|
|
435
|
+
element.removeEventListener('input', inputHandlerEvent);
|
|
436
|
+
element.removeEventListener('focus', focusHandlerEvent);
|
|
437
|
+
element.removeEventListener('blur', blurHandlerEvent);
|
|
438
|
+
// Clean up stored Event functions
|
|
439
|
+
delete element.__eventHandlers["clearInputHandler"];
|
|
440
|
+
delete element.__eventHandlers["clearFocusHandler"];
|
|
441
|
+
delete element.__eventHandlers["clearBlurHandler"];
|
|
442
|
+
}
|
|
327
443
|
}
|
|
328
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
329
|
-
element.addEventListener('input', function (event) {
|
|
330
|
-
updateIconState(element.value, button);
|
|
331
|
-
});
|
|
332
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
333
|
-
element.addEventListener('focus', function (event) {
|
|
334
|
-
updateIconState(element.value, button, element.readOnly);
|
|
335
|
-
});
|
|
336
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
337
|
-
element.addEventListener('blur', function (event) {
|
|
338
|
-
setTimeout(function () {
|
|
339
|
-
if (!isNullOrUndefined(button)) {
|
|
340
|
-
addClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
341
|
-
button = !isNullOrUndefined(element) && element.classList.contains('e-combobox') ? null : button;
|
|
342
|
-
}
|
|
343
|
-
}, 200);
|
|
344
|
-
});
|
|
345
444
|
}
|
|
346
|
-
|
|
347
|
-
|
|
445
|
+
function destroy(args, button) {
|
|
446
|
+
if (button === void 0) { button = null; }
|
|
447
|
+
unbindInitialEvent(args);
|
|
448
|
+
if (args.floatLabelType === 'Auto') {
|
|
449
|
+
unWireFloatLabelEvents(args);
|
|
450
|
+
}
|
|
451
|
+
if (args.properties.showClearButton) {
|
|
452
|
+
unWireClearBtnEvents(args.element, button);
|
|
453
|
+
}
|
|
454
|
+
unwireFloatingEvents(args.element);
|
|
455
|
+
if (!isNullOrUndefined(args.element)) {
|
|
456
|
+
delete args.element.__eventHandlers;
|
|
457
|
+
}
|
|
348
458
|
|
|
349
459
|
}
|
|
350
460
|
Input.destroy = destroy;
|
|
@@ -565,7 +675,7 @@ var Input;
|
|
|
565
675
|
* - Element to be enabled or disabled.
|
|
566
676
|
*/
|
|
567
677
|
function setEnabled(isEnable, element, floatLabelType, inputContainer) {
|
|
568
|
-
var disabledAttrs = { 'disabled': '
|
|
678
|
+
var disabledAttrs = { 'disabled': '', 'aria-disabled': 'true' };
|
|
569
679
|
var considerWrapper = isNullOrUndefined(inputContainer) ? false : true;
|
|
570
680
|
if (isEnable) {
|
|
571
681
|
element.classList.remove(CLASSNAMES.DISABLE);
|
|
@@ -680,11 +790,11 @@ var Input;
|
|
|
680
790
|
var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
|
|
681
791
|
var container = closest(input, '.' + CLASSNAMES.INPUTGROUP);
|
|
682
792
|
floatType = type;
|
|
793
|
+
var customTag = container.tagName;
|
|
794
|
+
customTag = customTag !== 'DIV' && customTag !== 'SPAN' ? customTag : null;
|
|
795
|
+
var args = { element: input, floatLabelType: type,
|
|
796
|
+
customTag: customTag, properties: { placeholder: placeholder } };
|
|
683
797
|
if (type !== 'Never') {
|
|
684
|
-
var customTag = container.tagName;
|
|
685
|
-
customTag = customTag !== 'DIV' && customTag !== 'SPAN' ? customTag : null;
|
|
686
|
-
var args = { element: input, floatLabelType: type,
|
|
687
|
-
customTag: customTag, properties: { placeholder: placeholder } };
|
|
688
798
|
var iconEle = container.querySelector('.e-clear-icon');
|
|
689
799
|
var inputObj = { container: container };
|
|
690
800
|
input.classList.remove(CLASSNAMES.INPUT);
|
|
@@ -715,6 +825,9 @@ var Input;
|
|
|
715
825
|
wrapper.insertBefore(floatText, iconEle);
|
|
716
826
|
}
|
|
717
827
|
}
|
|
828
|
+
else {
|
|
829
|
+
unWireFloatLabelEvents(args);
|
|
830
|
+
}
|
|
718
831
|
checkFloatLabelType(type, input.parentElement);
|
|
719
832
|
}
|
|
720
833
|
Input.addFloating = addFloating;
|
|
@@ -898,6 +1011,58 @@ var Input;
|
|
|
898
1011
|
}
|
|
899
1012
|
}
|
|
900
1013
|
Input.validateInputType = validateInputType;
|
|
1014
|
+
function updateHTMLAttributesToElement(htmlAttributes, element) {
|
|
1015
|
+
if (!isNullOrUndefined(htmlAttributes)) {
|
|
1016
|
+
for (var _i = 0, _a = Object.keys(htmlAttributes); _i < _a.length; _i++) {
|
|
1017
|
+
var key = _a[_i];
|
|
1018
|
+
if (containerAttributes.indexOf(key) < 0) {
|
|
1019
|
+
element.setAttribute(key, htmlAttributes["" + key]);
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
Input.updateHTMLAttributesToElement = updateHTMLAttributesToElement;
|
|
1025
|
+
function updateCssClass(newClass, oldClass, container) {
|
|
1026
|
+
setCssClass(getInputValidClassList(newClass), [container], getInputValidClassList(oldClass));
|
|
1027
|
+
}
|
|
1028
|
+
Input.updateCssClass = updateCssClass;
|
|
1029
|
+
function getInputValidClassList(inputClassName) {
|
|
1030
|
+
var result = inputClassName;
|
|
1031
|
+
if (!isNullOrUndefined(inputClassName) && inputClassName !== '') {
|
|
1032
|
+
result = (inputClassName.replace(/\s+/g, ' ')).trim();
|
|
1033
|
+
}
|
|
1034
|
+
return result;
|
|
1035
|
+
}
|
|
1036
|
+
Input.getInputValidClassList = getInputValidClassList;
|
|
1037
|
+
function updateHTMLAttributesToWrapper(htmlAttributes, container) {
|
|
1038
|
+
if (!isNullOrUndefined(htmlAttributes)) {
|
|
1039
|
+
for (var _i = 0, _a = Object.keys(htmlAttributes); _i < _a.length; _i++) {
|
|
1040
|
+
var key = _a[_i];
|
|
1041
|
+
if (containerAttributes.indexOf(key) > -1) {
|
|
1042
|
+
if (key === 'class') {
|
|
1043
|
+
var updatedClassValues = this.getInputValidClassList(htmlAttributes["" + key]);
|
|
1044
|
+
if (updatedClassValues !== '') {
|
|
1045
|
+
addClass([container], updatedClassValues.split(' '));
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
else if (key === 'style') {
|
|
1049
|
+
var setStyle = container.getAttribute(key);
|
|
1050
|
+
setStyle = !isNullOrUndefined(setStyle) ? (setStyle + htmlAttributes["" + key]) :
|
|
1051
|
+
htmlAttributes["" + key];
|
|
1052
|
+
container.setAttribute(key, setStyle);
|
|
1053
|
+
}
|
|
1054
|
+
else {
|
|
1055
|
+
container.setAttribute(key, htmlAttributes["" + key]);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
Input.updateHTMLAttributesToWrapper = updateHTMLAttributesToWrapper;
|
|
1062
|
+
function isBlank(inputString) {
|
|
1063
|
+
return (!inputString || /^\s*$/.test(inputString));
|
|
1064
|
+
}
|
|
1065
|
+
Input.isBlank = isBlank;
|
|
901
1066
|
})(Input || (Input = {}));
|
|
902
1067
|
/* eslint-enable valid-jsdoc, jsdoc/require-jsdoc, jsdoc/require-returns, jsdoc/require-param */
|
|
903
1068
|
|
|
@@ -2011,6 +2176,9 @@ var NumericTextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
2011
2176
|
*/
|
|
2012
2177
|
NumericTextBox.prototype.destroy = function () {
|
|
2013
2178
|
this.unwireEvents();
|
|
2179
|
+
if (this.showClearButton) {
|
|
2180
|
+
this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
|
|
2181
|
+
}
|
|
2014
2182
|
detach(this.hiddenInput);
|
|
2015
2183
|
if (this.showSpinButton) {
|
|
2016
2184
|
this.unwireSpinBtnEvents();
|
|
@@ -2034,7 +2202,11 @@ var NumericTextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
2034
2202
|
this.blurEventArgs = null;
|
|
2035
2203
|
this.focusEventArgs = null;
|
|
2036
2204
|
this.inputWrapper = null;
|
|
2037
|
-
Input.destroy(
|
|
2205
|
+
Input.destroy({
|
|
2206
|
+
element: this.element,
|
|
2207
|
+
floatLabelType: this.floatLabelType,
|
|
2208
|
+
properties: this.properties
|
|
2209
|
+
}, this.clearButton);
|
|
2038
2210
|
_super.prototype.destroy.call(this);
|
|
2039
2211
|
};
|
|
2040
2212
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns */
|
|
@@ -2460,6 +2632,7 @@ function unwireEvents() {
|
|
|
2460
2632
|
EventHandler.remove(this.element, 'focus', maskInputFocusHandler);
|
|
2461
2633
|
EventHandler.remove(this.element, 'blur', maskInputBlurHandler);
|
|
2462
2634
|
EventHandler.remove(this.element, 'paste', maskInputPasteHandler);
|
|
2635
|
+
EventHandler.remove(this.element, 'drop', maskInputDropHandler);
|
|
2463
2636
|
EventHandler.remove(this.element, 'cut', maskInputCutHandler);
|
|
2464
2637
|
EventHandler.remove(this.element, 'mousedown', maskInputMouseDownHandler);
|
|
2465
2638
|
EventHandler.remove(this.element, 'mouseup', maskInputMouseUpHandler);
|
|
@@ -3778,7 +3951,7 @@ var MaskedTextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
3778
3951
|
if (this.placeholder && !this.isFocus) {
|
|
3779
3952
|
this.setMaskPlaceholder(false, false);
|
|
3780
3953
|
}
|
|
3781
|
-
if (this.value === "") {
|
|
3954
|
+
if (this.value === "" && oldProp.value != null) {
|
|
3782
3955
|
this.element.selectionStart = 0;
|
|
3783
3956
|
this.element.selectionEnd = 0;
|
|
3784
3957
|
}
|
|
@@ -3901,6 +4074,9 @@ var MaskedTextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
3901
4074
|
*/
|
|
3902
4075
|
MaskedTextBox.prototype.destroy = function () {
|
|
3903
4076
|
unwireEvents.call(this);
|
|
4077
|
+
if (this.showClearButton) {
|
|
4078
|
+
this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
|
|
4079
|
+
}
|
|
3904
4080
|
var attrArray = ['aria-labelledby', 'role', 'autocomplete', 'aria-readonly',
|
|
3905
4081
|
'aria-disabled', 'autocapitalize', 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-invalid'];
|
|
3906
4082
|
for (var i = 0; i < attrArray.length; i++) {
|
|
@@ -3912,7 +4088,11 @@ var MaskedTextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
3912
4088
|
detach(this.inputObj.container);
|
|
3913
4089
|
}
|
|
3914
4090
|
this.blurEventArgs = null;
|
|
3915
|
-
Input.destroy(
|
|
4091
|
+
Input.destroy({
|
|
4092
|
+
element: this.element,
|
|
4093
|
+
floatLabelType: this.floatLabelType,
|
|
4094
|
+
properties: this.properties
|
|
4095
|
+
}, this.clearButton);
|
|
3916
4096
|
this.changeEventArgs = null;
|
|
3917
4097
|
this.inputObj = null;
|
|
3918
4098
|
_super.prototype.destroy.call(this);
|
|
@@ -6581,6 +6761,10 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6581
6761
|
if (args !== 'tooltip') {
|
|
6582
6762
|
this.updateConfig();
|
|
6583
6763
|
}
|
|
6764
|
+
if (this.readonly) {
|
|
6765
|
+
this.sliderContainer.classList.remove(classNames.readonly);
|
|
6766
|
+
this.setReadOnly();
|
|
6767
|
+
}
|
|
6584
6768
|
};
|
|
6585
6769
|
Slider.prototype.changeRtl = function () {
|
|
6586
6770
|
if (!this.enableRtl && this.type === 'Range') {
|
|
@@ -6724,6 +6908,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6724
6908
|
break;
|
|
6725
6909
|
case 'tooltip':
|
|
6726
6910
|
if (!isNullOrUndefined(newProp.tooltip) && !isNullOrUndefined(oldProp.tooltip)) {
|
|
6911
|
+
this.initialTooltip = true;
|
|
6727
6912
|
this.setTooltip(prop);
|
|
6728
6913
|
if (!this.showButtons) {
|
|
6729
6914
|
this.wireEvents();
|
|
@@ -6967,7 +7152,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6967
7152
|
Property('')
|
|
6968
7153
|
], Slider.prototype, "cssClass", void 0);
|
|
6969
7154
|
__decorate$2([
|
|
6970
|
-
Property(
|
|
7155
|
+
Property(true)
|
|
6971
7156
|
], Slider.prototype, "enableHtmlSanitizer", void 0);
|
|
6972
7157
|
__decorate$2([
|
|
6973
7158
|
Event()
|
|
@@ -13446,8 +13631,6 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
13446
13631
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13447
13632
|
};
|
|
13448
13633
|
var HIDE_CLEAR = 'e-clear-icon-hide';
|
|
13449
|
-
var TEXTBOX_FOCUS = 'e-input-focus';
|
|
13450
|
-
var containerAttr = ['title', 'style', 'class'];
|
|
13451
13634
|
/**
|
|
13452
13635
|
* Represents the TextBox component that allows the user to enter the values based on it's type.
|
|
13453
13636
|
* ```html
|
|
@@ -13506,7 +13689,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13506
13689
|
{
|
|
13507
13690
|
var prevOnChange = this.isProtectedOnChange;
|
|
13508
13691
|
this.isProtectedOnChange = true;
|
|
13509
|
-
if (!
|
|
13692
|
+
if (!Input.isBlank(this.value)) {
|
|
13510
13693
|
this.value = this.value.toString();
|
|
13511
13694
|
}
|
|
13512
13695
|
this.isProtectedOnChange = prevOnChange;
|
|
@@ -13528,8 +13711,8 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13528
13711
|
break;
|
|
13529
13712
|
case 'htmlAttributes':
|
|
13530
13713
|
{
|
|
13531
|
-
this.
|
|
13532
|
-
this.
|
|
13714
|
+
this.updateHTMLAttributesToElement();
|
|
13715
|
+
this.updateHTMLAttributesToWrapper();
|
|
13533
13716
|
this.checkAttributes(true);
|
|
13534
13717
|
this.multiline && !isNullOrUndefined(this.textarea) ? Input.validateInputType(this.textboxWrapper.container, this.textarea) : Input.validateInputType(this.textboxWrapper.container, this.element);
|
|
13535
13718
|
}
|
|
@@ -13564,7 +13747,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13564
13747
|
}
|
|
13565
13748
|
break;
|
|
13566
13749
|
case 'cssClass':
|
|
13567
|
-
|
|
13750
|
+
Input.updateCssClass(newProp.cssClass, oldProp.cssClass, this.textboxWrapper.container);
|
|
13568
13751
|
break;
|
|
13569
13752
|
case 'locale':
|
|
13570
13753
|
this.globalize = new Internationalization(this.locale);
|
|
@@ -13584,9 +13767,6 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13584
13767
|
TextBox.prototype.getModuleName = function () {
|
|
13585
13768
|
return 'textbox';
|
|
13586
13769
|
};
|
|
13587
|
-
TextBox.prototype.isBlank = function (str) {
|
|
13588
|
-
return (!str || /^\s*$/.test(str));
|
|
13589
|
-
};
|
|
13590
13770
|
TextBox.prototype.preRender = function () {
|
|
13591
13771
|
this.cloneElement = this.element.cloneNode(true);
|
|
13592
13772
|
this.formElement = closest(this.element, 'form');
|
|
@@ -13617,7 +13797,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13617
13797
|
this.element = inputElement;
|
|
13618
13798
|
setValue('ej2_instances', ejInstance, this.element);
|
|
13619
13799
|
}
|
|
13620
|
-
this.
|
|
13800
|
+
this.updateHTMLAttributesToElement();
|
|
13621
13801
|
this.checkAttributes(false);
|
|
13622
13802
|
if ((isNullOrUndefined(this.textboxOptions) || (this.textboxOptions['value'] === undefined)) && this.element.value !== '') {
|
|
13623
13803
|
this.setProperties({ value: this.element.value }, true);
|
|
@@ -13653,7 +13833,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13653
13833
|
var apiAttributes = ['placeholder', 'disabled', 'value', 'readonly', 'type', 'autocomplete'];
|
|
13654
13834
|
for (var index = 0; index < this.element.attributes.length; index++) {
|
|
13655
13835
|
var attributeName = this.element.attributes[index].nodeName;
|
|
13656
|
-
if (this.element.hasAttribute(attributeName) &&
|
|
13836
|
+
if (this.element.hasAttribute(attributeName) && containerAttributes.indexOf(attributeName) < 0 &&
|
|
13657
13837
|
!(attributeName === 'id' || attributeName === 'type' || attributeName === 'e-mappinguid')) {
|
|
13658
13838
|
// e-mappinguid attribute is handled for Grid component.
|
|
13659
13839
|
this.textarea.setAttribute(attributeName, this.element.attributes[index].nodeValue);
|
|
@@ -13720,7 +13900,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13720
13900
|
TextBox.prototype.render = function () {
|
|
13721
13901
|
var updatedCssClassValue = this.cssClass;
|
|
13722
13902
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
13723
|
-
updatedCssClassValue =
|
|
13903
|
+
updatedCssClassValue = Input.getInputValidClassList(this.cssClass);
|
|
13724
13904
|
}
|
|
13725
13905
|
this.respectiveElement = (this.isHiddenInput) ? this.textarea : this.element;
|
|
13726
13906
|
this.textboxWrapper = Input.createInput({
|
|
@@ -13735,7 +13915,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13735
13915
|
showClearButton: this.showClearButton
|
|
13736
13916
|
}
|
|
13737
13917
|
});
|
|
13738
|
-
this.
|
|
13918
|
+
this.updateHTMLAttributesToWrapper();
|
|
13739
13919
|
if (this.isHiddenInput) {
|
|
13740
13920
|
this.respectiveElement.parentNode.insertBefore(this.element, this.respectiveElement);
|
|
13741
13921
|
}
|
|
@@ -13765,49 +13945,11 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13765
13945
|
}
|
|
13766
13946
|
this.renderComplete();
|
|
13767
13947
|
};
|
|
13768
|
-
TextBox.prototype.
|
|
13769
|
-
|
|
13770
|
-
for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
|
|
13771
|
-
var key = _a[_i];
|
|
13772
|
-
if (containerAttr.indexOf(key) > -1) {
|
|
13773
|
-
if (key === 'class') {
|
|
13774
|
-
var updatedClassValues = this.getInputValidClassList(this.htmlAttributes["" + key]);
|
|
13775
|
-
if (updatedClassValues !== '') {
|
|
13776
|
-
addClass([this.textboxWrapper.container], updatedClassValues.split(' '));
|
|
13777
|
-
}
|
|
13778
|
-
}
|
|
13779
|
-
else if (key === 'style') {
|
|
13780
|
-
var setStyle = this.textboxWrapper.container.getAttribute(key);
|
|
13781
|
-
setStyle = !isNullOrUndefined(setStyle) ? (setStyle + this.htmlAttributes["" + key]) :
|
|
13782
|
-
this.htmlAttributes["" + key];
|
|
13783
|
-
this.textboxWrapper.container.setAttribute(key, setStyle);
|
|
13784
|
-
}
|
|
13785
|
-
else {
|
|
13786
|
-
this.textboxWrapper.container.setAttribute(key, this.htmlAttributes["" + key]);
|
|
13787
|
-
}
|
|
13788
|
-
}
|
|
13789
|
-
}
|
|
13790
|
-
}
|
|
13791
|
-
};
|
|
13792
|
-
TextBox.prototype.updateHTMLAttrToElement = function () {
|
|
13793
|
-
if (!isNullOrUndefined(this.htmlAttributes)) {
|
|
13794
|
-
for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
|
|
13795
|
-
var key = _a[_i];
|
|
13796
|
-
if (containerAttr.indexOf(key) < 0) {
|
|
13797
|
-
this.multiline && !isNullOrUndefined(this.textarea) ? this.textarea.setAttribute(key, this.htmlAttributes["" + key]) : this.element.setAttribute(key, this.htmlAttributes["" + key]);
|
|
13798
|
-
}
|
|
13799
|
-
}
|
|
13800
|
-
}
|
|
13801
|
-
};
|
|
13802
|
-
TextBox.prototype.updateCssClass = function (newClass, oldClass) {
|
|
13803
|
-
Input.setCssClass(this.getInputValidClassList(newClass), [this.textboxWrapper.container], this.getInputValidClassList(oldClass));
|
|
13948
|
+
TextBox.prototype.updateHTMLAttributesToWrapper = function () {
|
|
13949
|
+
Input.updateHTMLAttributesToWrapper(this.htmlAttributes, this.textboxWrapper.container);
|
|
13804
13950
|
};
|
|
13805
|
-
TextBox.prototype.
|
|
13806
|
-
|
|
13807
|
-
if (!isNullOrUndefined(inputClassName) && inputClassName !== '') {
|
|
13808
|
-
result = (inputClassName.replace(/\s+/g, ' ')).trim();
|
|
13809
|
-
}
|
|
13810
|
-
return result;
|
|
13951
|
+
TextBox.prototype.updateHTMLAttributesToElement = function () {
|
|
13952
|
+
Input.updateHTMLAttributesToElement(this.htmlAttributes, this.respectiveElement ? this.respectiveElement : (this.multiline && !isNullOrUndefined(this.textarea) ? this.textarea : this.element));
|
|
13811
13953
|
};
|
|
13812
13954
|
TextBox.prototype.setInitialValue = function () {
|
|
13813
13955
|
if (!this.isAngular) {
|
|
@@ -13999,6 +14141,9 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13999
14141
|
*/
|
|
14000
14142
|
TextBox.prototype.destroy = function () {
|
|
14001
14143
|
this.unWireEvents();
|
|
14144
|
+
if (this.showClearButton) {
|
|
14145
|
+
this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
|
|
14146
|
+
}
|
|
14002
14147
|
if (this.element.tagName === 'INPUT' && this.multiline) {
|
|
14003
14148
|
detach(this.textboxWrapper.container.getElementsByTagName('textarea')[0]);
|
|
14004
14149
|
this.respectiveElement = this.element;
|
|
@@ -14012,7 +14157,11 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
14012
14157
|
detach(this.textboxWrapper.container);
|
|
14013
14158
|
}
|
|
14014
14159
|
this.textboxWrapper = null;
|
|
14015
|
-
Input.destroy(
|
|
14160
|
+
Input.destroy({
|
|
14161
|
+
element: this.respectiveElement,
|
|
14162
|
+
floatLabelType: this.floatLabelType,
|
|
14163
|
+
properties: this.properties
|
|
14164
|
+
}, this.clearButton);
|
|
14016
14165
|
_super.prototype.destroy.call(this);
|
|
14017
14166
|
};
|
|
14018
14167
|
/**
|
|
@@ -14191,7 +14340,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
14191
14340
|
* Uploader modules
|
|
14192
14341
|
*/
|
|
14193
14342
|
|
|
14194
|
-
var __extends$
|
|
14343
|
+
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
14195
14344
|
var extendStatics = function (d, b) {
|
|
14196
14345
|
extendStatics = Object.setPrototypeOf ||
|
|
14197
14346
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -14204,107 +14353,805 @@ var __extends$8 = (undefined && undefined.__extends) || (function () {
|
|
|
14204
14353
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14205
14354
|
};
|
|
14206
14355
|
})();
|
|
14207
|
-
var
|
|
14208
|
-
|
|
14209
|
-
function
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
|
|
14220
|
-
|
|
14221
|
-
|
|
14222
|
-
_this
|
|
14356
|
+
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14357
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14358
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14359
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14360
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14361
|
+
};
|
|
14362
|
+
var HIDE_CLEAR$1 = 'e-clear-icon-hide';
|
|
14363
|
+
var AUTO_WIDTH = 'e-auto-width';
|
|
14364
|
+
var RESIZE_X = 'e-resize-x';
|
|
14365
|
+
var RESIZE_Y = 'e-resize-y';
|
|
14366
|
+
var RESIZE_XY = 'e-resize-xy';
|
|
14367
|
+
var RESIZE_NONE = 'e-resize-none';
|
|
14368
|
+
var TextArea = /** @__PURE__ @class */ (function (_super) {
|
|
14369
|
+
__extends$7(TextArea, _super);
|
|
14370
|
+
function TextArea(options, element) {
|
|
14371
|
+
var _this = _super.call(this, options, element) || this;
|
|
14372
|
+
_this.previousValue = null;
|
|
14373
|
+
_this.isForm = false;
|
|
14374
|
+
_this.inputPreviousValue = null;
|
|
14375
|
+
_this.isAngular = false;
|
|
14376
|
+
_this.isVue = false;
|
|
14377
|
+
_this.textareaOptions = options;
|
|
14223
14378
|
return _this;
|
|
14224
14379
|
}
|
|
14225
14380
|
/**
|
|
14226
|
-
*
|
|
14381
|
+
* Calls internally if any of the property value is changed.
|
|
14227
14382
|
*
|
|
14228
|
-
* @
|
|
14229
|
-
* @param {
|
|
14230
|
-
* @param {BlazorDotnetObject} dotnetRef - Specifies for blazor client to server communication.
|
|
14383
|
+
* @param {TextAreaModel} newProp - Returns the dynamic property value of the component.
|
|
14384
|
+
* @param {TextAreaModel} oldProp - Returns the previous property value of the component.
|
|
14231
14385
|
* @returns {void}
|
|
14386
|
+
* @private
|
|
14232
14387
|
*/
|
|
14233
|
-
|
|
14234
|
-
|
|
14235
|
-
|
|
14236
|
-
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
|
|
14259
|
-
|
|
14260
|
-
|
|
14261
|
-
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14265
|
-
|
|
14266
|
-
|
|
14267
|
-
|
|
14268
|
-
|
|
14269
|
-
|
|
14270
|
-
|
|
14271
|
-
|
|
14272
|
-
|
|
14273
|
-
|
|
14274
|
-
|
|
14275
|
-
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
|
|
14284
|
-
|
|
14285
|
-
|
|
14286
|
-
|
|
14287
|
-
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14297
|
-
|
|
14298
|
-
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
|
|
14302
|
-
|
|
14303
|
-
|
|
14304
|
-
|
|
14305
|
-
|
|
14306
|
-
|
|
14307
|
-
|
|
14388
|
+
TextArea.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
14389
|
+
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
14390
|
+
var prop = _a[_i];
|
|
14391
|
+
switch (prop) {
|
|
14392
|
+
case 'floatLabelType':
|
|
14393
|
+
Input.removeFloating(this.textareaWrapper);
|
|
14394
|
+
Input.addFloating(this.element, this.floatLabelType, this.placeholder);
|
|
14395
|
+
if (this.floatLabelType === 'Never') {
|
|
14396
|
+
this.element.removeAttribute('aria-labelledby');
|
|
14397
|
+
}
|
|
14398
|
+
break;
|
|
14399
|
+
case 'enabled':
|
|
14400
|
+
Input.setEnabled(this.enabled, this.element, this.floatLabelType, this.textareaWrapper.container);
|
|
14401
|
+
this.bindClearEvent();
|
|
14402
|
+
if (!this.enabled && this.resizeMode !== 'None') {
|
|
14403
|
+
this.element.classList.remove(this.getCurrentResizeClass(this.resizeMode));
|
|
14404
|
+
this.element.classList.add(RESIZE_NONE);
|
|
14405
|
+
}
|
|
14406
|
+
else {
|
|
14407
|
+
this.element.classList.add(this.getCurrentResizeClass(this.resizeMode));
|
|
14408
|
+
}
|
|
14409
|
+
break;
|
|
14410
|
+
case 'width':
|
|
14411
|
+
if (this.resizeMode !== 'None' && this.resizeMode !== 'Vertical') {
|
|
14412
|
+
this.setElementWidth(newProp.width);
|
|
14413
|
+
this.textareaWrapper.container.classList.add(AUTO_WIDTH);
|
|
14414
|
+
}
|
|
14415
|
+
else {
|
|
14416
|
+
if (this.textareaWrapper.container.classList.contains(AUTO_WIDTH)) {
|
|
14417
|
+
this.textareaWrapper.container.classList.remove(AUTO_WIDTH);
|
|
14418
|
+
}
|
|
14419
|
+
Input.setWidth(newProp.width, this.textareaWrapper.container);
|
|
14420
|
+
}
|
|
14421
|
+
break;
|
|
14422
|
+
case 'value':
|
|
14423
|
+
{
|
|
14424
|
+
var prevOnChange = this.isProtectedOnChange;
|
|
14425
|
+
this.isProtectedOnChange = true;
|
|
14426
|
+
if (!Input.isBlank(this.value)) {
|
|
14427
|
+
this.value = this.value.toString();
|
|
14428
|
+
}
|
|
14429
|
+
this.isProtectedOnChange = prevOnChange;
|
|
14430
|
+
Input.setValue(this.value, this.element, this.floatLabelType, this.showClearButton);
|
|
14431
|
+
this.inputPreviousValue = this.element.value;
|
|
14432
|
+
/* istanbul ignore next */
|
|
14433
|
+
if ((this.isAngular || this.isVue) && this.preventChange === true) {
|
|
14434
|
+
this.previousValue = this.isAngular ? this.value : this.previousValue;
|
|
14435
|
+
this.preventChange = false;
|
|
14436
|
+
}
|
|
14437
|
+
else if (isNullOrUndefined(this.isAngular) || !this.isAngular
|
|
14438
|
+
|| (this.isAngular && !this.preventChange) || (this.isAngular && isNullOrUndefined(this.preventChange))) {
|
|
14439
|
+
this.raiseChangeEvent();
|
|
14440
|
+
}
|
|
14441
|
+
}
|
|
14442
|
+
break;
|
|
14443
|
+
case 'htmlAttributes':
|
|
14444
|
+
{
|
|
14445
|
+
this.updateHTMLAttributesToElement();
|
|
14446
|
+
this.updateHTMLAttributesToWrapper();
|
|
14447
|
+
this.checkAttributes(true);
|
|
14448
|
+
Input.validateInputType(this.textareaWrapper.container, this.element);
|
|
14449
|
+
}
|
|
14450
|
+
break;
|
|
14451
|
+
case 'readonly':
|
|
14452
|
+
Input.setReadonly(this.readonly, this.element);
|
|
14453
|
+
if (this.readonly) {
|
|
14454
|
+
this.element.setAttribute('aria-readonly', 'true');
|
|
14455
|
+
}
|
|
14456
|
+
else {
|
|
14457
|
+
this.element.removeAttribute('aria-readonly');
|
|
14458
|
+
}
|
|
14459
|
+
break;
|
|
14460
|
+
case 'showClearButton':
|
|
14461
|
+
Input.setClearButton(this.showClearButton, this.element, this.textareaWrapper);
|
|
14462
|
+
this.bindClearEvent();
|
|
14463
|
+
break;
|
|
14464
|
+
case 'enableRtl':
|
|
14465
|
+
Input.setEnableRtl(this.enableRtl, [this.textareaWrapper.container]);
|
|
14466
|
+
break;
|
|
14467
|
+
case 'placeholder':
|
|
14468
|
+
Input.setPlaceholder(this.placeholder, this.element);
|
|
14469
|
+
Input.calculateWidth(this.element, this.textareaWrapper.container);
|
|
14470
|
+
break;
|
|
14471
|
+
case 'cssClass':
|
|
14472
|
+
Input.updateCssClass(newProp.cssClass, oldProp.cssClass, this.textareaWrapper.container);
|
|
14473
|
+
break;
|
|
14474
|
+
case 'locale':
|
|
14475
|
+
this.globalize = new Internationalization(this.locale);
|
|
14476
|
+
this.l10n.setLocale(this.locale);
|
|
14477
|
+
this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
|
|
14478
|
+
Input.setPlaceholder(this.placeholder, this.element);
|
|
14479
|
+
break;
|
|
14480
|
+
case 'rowsCount':
|
|
14481
|
+
if (this.rowsCount) {
|
|
14482
|
+
this.element.setAttribute('rows', this.rowsCount.toString());
|
|
14483
|
+
}
|
|
14484
|
+
break;
|
|
14485
|
+
case 'columnsCount':
|
|
14486
|
+
if (this.columnsCount) {
|
|
14487
|
+
this.element.setAttribute('cols', this.columnsCount.toString());
|
|
14488
|
+
if (this.width == null) {
|
|
14489
|
+
this.textareaWrapper.container.classList.add(AUTO_WIDTH);
|
|
14490
|
+
}
|
|
14491
|
+
}
|
|
14492
|
+
break;
|
|
14493
|
+
case 'maxLength':
|
|
14494
|
+
if (this.maxLength) {
|
|
14495
|
+
this.element.setAttribute('maxlength', this.maxLength.toString());
|
|
14496
|
+
}
|
|
14497
|
+
break;
|
|
14498
|
+
case 'resizeMode':
|
|
14499
|
+
if (this.enabled) {
|
|
14500
|
+
if (this.element.classList.contains(this.getCurrentResizeClass(oldProp.resizeMode))) {
|
|
14501
|
+
this.element.classList.remove(this.getCurrentResizeClass(oldProp.resizeMode));
|
|
14502
|
+
}
|
|
14503
|
+
this.element.classList.add(this.getCurrentResizeClass(this.resizeMode));
|
|
14504
|
+
if (this.element.style.width && (this.resizeMode === 'None' || this.resizeMode === 'Vertical')) {
|
|
14505
|
+
Input.setWidth(this.element.style.width, this.textareaWrapper.container);
|
|
14506
|
+
}
|
|
14507
|
+
else {
|
|
14508
|
+
var currentWidth = this.element.offsetWidth;
|
|
14509
|
+
this.element.style.width = currentWidth + 'px';
|
|
14510
|
+
if (this.textareaWrapper.container.style.width) {
|
|
14511
|
+
this.textareaWrapper.container.style.width = '';
|
|
14512
|
+
}
|
|
14513
|
+
}
|
|
14514
|
+
this.setWrapperWidth();
|
|
14515
|
+
}
|
|
14516
|
+
break;
|
|
14517
|
+
}
|
|
14518
|
+
}
|
|
14519
|
+
};
|
|
14520
|
+
TextArea.prototype.preRender = function () {
|
|
14521
|
+
this.formElement = closest(this.element, 'form');
|
|
14522
|
+
if (!isNullOrUndefined(this.formElement)) {
|
|
14523
|
+
this.isForm = true;
|
|
14524
|
+
}
|
|
14525
|
+
/* istanbul ignore next */
|
|
14526
|
+
if (this.element.tagName === 'EJS-TEXTAREA') {
|
|
14527
|
+
var ejInstance = getValue('ej2_instances', this.element);
|
|
14528
|
+
var inputElement = this.createElement('textarea');
|
|
14529
|
+
var index = 0;
|
|
14530
|
+
for (index; index < this.element.attributes.length; index++) {
|
|
14531
|
+
var attributeName = this.element.attributes[index].nodeName;
|
|
14532
|
+
if (attributeName !== 'id' && attributeName !== 'class') {
|
|
14533
|
+
inputElement.setAttribute(attributeName, this.element.attributes[index].nodeValue);
|
|
14534
|
+
inputElement.innerHTML = this.element.innerHTML;
|
|
14535
|
+
if (attributeName === 'name') {
|
|
14536
|
+
this.element.removeAttribute('name');
|
|
14537
|
+
}
|
|
14538
|
+
}
|
|
14539
|
+
else if (attributeName === 'class') {
|
|
14540
|
+
inputElement.setAttribute(attributeName, this.element.className.split(' ').filter(function (item) { return item.indexOf('ng-') !== 0; }).join(' '));
|
|
14541
|
+
}
|
|
14542
|
+
}
|
|
14543
|
+
this.element.appendChild(inputElement);
|
|
14544
|
+
this.element = inputElement;
|
|
14545
|
+
setValue('ej2_instances', ejInstance, this.element);
|
|
14546
|
+
}
|
|
14547
|
+
this.updateHTMLAttributesToElement();
|
|
14548
|
+
this.checkAttributes(false);
|
|
14549
|
+
if ((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['value'] === undefined)) && this.element.value !== '') {
|
|
14550
|
+
this.setProperties({ value: this.element.value }, true);
|
|
14551
|
+
}
|
|
14552
|
+
this.globalize = new Internationalization(this.locale);
|
|
14553
|
+
var localeText = { placeholder: this.placeholder };
|
|
14554
|
+
this.l10n = new L10n('textarea', localeText, this.locale);
|
|
14555
|
+
if (this.l10n.getConstant('placeholder') !== '') {
|
|
14556
|
+
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
14557
|
+
}
|
|
14558
|
+
if (!this.element.hasAttribute('id')) {
|
|
14559
|
+
this.element.setAttribute('id', getUniqueID('textbox'));
|
|
14560
|
+
}
|
|
14561
|
+
if (!this.element.hasAttribute('name')) {
|
|
14562
|
+
this.element.setAttribute('name', this.element.getAttribute('id'));
|
|
14563
|
+
}
|
|
14564
|
+
if (this.rowsCount) {
|
|
14565
|
+
this.element.setAttribute('rows', this.rowsCount.toString());
|
|
14566
|
+
}
|
|
14567
|
+
if (this.columnsCount) {
|
|
14568
|
+
this.element.setAttribute('cols', this.columnsCount.toString());
|
|
14569
|
+
}
|
|
14570
|
+
if (this.maxLength) {
|
|
14571
|
+
this.element.setAttribute('maxlength', this.maxLength.toString());
|
|
14572
|
+
}
|
|
14573
|
+
if (!this.element.style.resize && this.enabled) {
|
|
14574
|
+
this.element.classList.add(this.getCurrentResizeClass(this.resizeMode));
|
|
14575
|
+
}
|
|
14576
|
+
if (this.enabled) {
|
|
14577
|
+
this.element.setAttribute('aria-multiline', 'true');
|
|
14578
|
+
}
|
|
14579
|
+
};
|
|
14580
|
+
/**
|
|
14581
|
+
* To Initialize the control rendering
|
|
14582
|
+
*
|
|
14583
|
+
* @returns {void}
|
|
14584
|
+
* @private
|
|
14585
|
+
*/
|
|
14586
|
+
TextArea.prototype.render = function () {
|
|
14587
|
+
var updatedCssClassValue = this.cssClass;
|
|
14588
|
+
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
14589
|
+
updatedCssClassValue = Input.getInputValidClassList(this.cssClass);
|
|
14590
|
+
}
|
|
14591
|
+
this.textareaWrapper = Input.createInput({
|
|
14592
|
+
element: this.element,
|
|
14593
|
+
floatLabelType: this.floatLabelType,
|
|
14594
|
+
properties: {
|
|
14595
|
+
enabled: this.enabled,
|
|
14596
|
+
enableRtl: this.enableRtl,
|
|
14597
|
+
cssClass: updatedCssClassValue,
|
|
14598
|
+
readonly: this.readonly,
|
|
14599
|
+
placeholder: this.placeholder,
|
|
14600
|
+
showClearButton: this.showClearButton
|
|
14601
|
+
}
|
|
14602
|
+
});
|
|
14603
|
+
this.updateHTMLAttributesToWrapper();
|
|
14604
|
+
this.wireEvents();
|
|
14605
|
+
if (!isNullOrUndefined(this.value)) {
|
|
14606
|
+
Input.setValue(this.value, this.element, this.floatLabelType, this.showClearButton);
|
|
14607
|
+
}
|
|
14608
|
+
if (!isNullOrUndefined(this.value)) {
|
|
14609
|
+
this.initialValue = this.value;
|
|
14610
|
+
if (!this.isAngular) {
|
|
14611
|
+
this.element.setAttribute('value', this.initialValue);
|
|
14612
|
+
}
|
|
14613
|
+
}
|
|
14614
|
+
this.previousValue = this.value;
|
|
14615
|
+
this.inputPreviousValue = this.value;
|
|
14616
|
+
this.element.defaultValue = this.element.value;
|
|
14617
|
+
Input.setWidth(this.width, this.textareaWrapper.container);
|
|
14618
|
+
this.setWrapperWidth();
|
|
14619
|
+
this.renderComplete();
|
|
14620
|
+
};
|
|
14621
|
+
TextArea.prototype.getModuleName = function () {
|
|
14622
|
+
return 'textarea';
|
|
14623
|
+
};
|
|
14624
|
+
/* eslint-disable valid-jsdoc, jsdoc/require-returns */
|
|
14625
|
+
/**
|
|
14626
|
+
* Gets the properties to be maintained in the persisted state.
|
|
14627
|
+
*
|
|
14628
|
+
*/
|
|
14629
|
+
TextArea.prototype.getPersistData = function () {
|
|
14630
|
+
var keyEntity = ['value'];
|
|
14631
|
+
return this.addOnPersist(keyEntity);
|
|
14632
|
+
};
|
|
14633
|
+
TextArea.prototype.checkAttributes = function (isDynamic) {
|
|
14634
|
+
var attrs = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|
|
14635
|
+
['placeholder', 'disabled', 'value', 'readonly'];
|
|
14636
|
+
for (var _i = 0, attrs_1 = attrs; _i < attrs_1.length; _i++) {
|
|
14637
|
+
var key = attrs_1[_i];
|
|
14638
|
+
if (!isNullOrUndefined(this.element.getAttribute(key))) {
|
|
14639
|
+
switch (key) {
|
|
14640
|
+
case 'disabled':
|
|
14641
|
+
if ((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['enabled'] === undefined)) || isDynamic) {
|
|
14642
|
+
var enabled = this.element.getAttribute(key) === 'disabled' || this.element.getAttribute(key) === '' ||
|
|
14643
|
+
this.element.getAttribute(key) === 'true' ? false : true;
|
|
14644
|
+
this.setProperties({ enabled: enabled }, !isDynamic);
|
|
14645
|
+
}
|
|
14646
|
+
break;
|
|
14647
|
+
case 'readonly':
|
|
14648
|
+
if ((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['readonly'] === undefined)) || isDynamic) {
|
|
14649
|
+
var readonly = this.element.getAttribute(key) === 'readonly' || this.element.getAttribute(key) === ''
|
|
14650
|
+
|| this.element.getAttribute(key) === 'true' ? true : false;
|
|
14651
|
+
this.setProperties({ readonly: readonly }, !isDynamic);
|
|
14652
|
+
}
|
|
14653
|
+
break;
|
|
14654
|
+
case 'placeholder':
|
|
14655
|
+
if ((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['placeholder'] === undefined)) || isDynamic) {
|
|
14656
|
+
this.setProperties({ placeholder: this.element.placeholder }, !isDynamic);
|
|
14657
|
+
}
|
|
14658
|
+
break;
|
|
14659
|
+
case 'value':
|
|
14660
|
+
if (((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['value'] === undefined)) || isDynamic) && this.element.value !== '') {
|
|
14661
|
+
this.setProperties({ value: this.element.value }, !isDynamic);
|
|
14662
|
+
}
|
|
14663
|
+
break;
|
|
14664
|
+
}
|
|
14665
|
+
}
|
|
14666
|
+
}
|
|
14667
|
+
};
|
|
14668
|
+
TextArea.prototype.wireEvents = function () {
|
|
14669
|
+
EventHandler.add(this.element, 'focus', this.focusHandler, this);
|
|
14670
|
+
EventHandler.add(this.element, 'blur', this.focusOutHandler, this);
|
|
14671
|
+
EventHandler.add(this.element, 'keydown', this.keydownHandler, this);
|
|
14672
|
+
EventHandler.add(this.element, 'input', this.inputHandler, this);
|
|
14673
|
+
EventHandler.add(this.element, 'change', this.changeHandler, this);
|
|
14674
|
+
if (this.isForm) {
|
|
14675
|
+
EventHandler.add(this.formElement, 'reset', this.resetForm, this);
|
|
14676
|
+
}
|
|
14677
|
+
this.bindClearEvent();
|
|
14678
|
+
};
|
|
14679
|
+
TextArea.prototype.unWireEvents = function () {
|
|
14680
|
+
EventHandler.remove(this.element, 'focus', this.focusHandler);
|
|
14681
|
+
EventHandler.remove(this.element, 'blur', this.focusOutHandler);
|
|
14682
|
+
EventHandler.remove(this.element, 'keydown', this.keydownHandler);
|
|
14683
|
+
EventHandler.remove(this.element, 'input', this.inputHandler);
|
|
14684
|
+
EventHandler.remove(this.element, 'change', this.changeHandler);
|
|
14685
|
+
if (this.isForm) {
|
|
14686
|
+
EventHandler.remove(this.formElement, 'reset', this.resetForm);
|
|
14687
|
+
}
|
|
14688
|
+
};
|
|
14689
|
+
/**
|
|
14690
|
+
* Removes the component from the DOM and detaches all its related event handlers.
|
|
14691
|
+
* Also, it maintains the initial TextArea element from the DOM.
|
|
14692
|
+
*
|
|
14693
|
+
* @method destroy
|
|
14694
|
+
* @returns {void}
|
|
14695
|
+
*/
|
|
14696
|
+
TextArea.prototype.destroy = function () {
|
|
14697
|
+
this.unWireEvents();
|
|
14698
|
+
if (this.showClearButton) {
|
|
14699
|
+
this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
|
|
14700
|
+
}
|
|
14701
|
+
this.element.value = this.element.defaultValue;
|
|
14702
|
+
this.element.classList.remove('e-input', RESIZE_X, RESIZE_Y, RESIZE_XY, RESIZE_NONE);
|
|
14703
|
+
this.removeAttributes(['aria-disabled', 'aria-readonly', 'aria-labelledby', 'aria-multiline']);
|
|
14704
|
+
if (!isNullOrUndefined(this.textareaWrapper)) {
|
|
14705
|
+
this.textareaWrapper.container.insertAdjacentElement('afterend', this.element);
|
|
14706
|
+
detach(this.textareaWrapper.container);
|
|
14707
|
+
}
|
|
14708
|
+
this.textareaWrapper = null;
|
|
14709
|
+
this.formElement = null;
|
|
14710
|
+
Input.destroy({
|
|
14711
|
+
element: this.element,
|
|
14712
|
+
floatLabelType: this.floatLabelType,
|
|
14713
|
+
properties: this.properties
|
|
14714
|
+
}, this.clearButton);
|
|
14715
|
+
_super.prototype.destroy.call(this);
|
|
14716
|
+
};
|
|
14717
|
+
TextArea.prototype.focusHandler = function (args) {
|
|
14718
|
+
var eventArgs = {
|
|
14719
|
+
container: this.textareaWrapper.container,
|
|
14720
|
+
event: args,
|
|
14721
|
+
value: this.value
|
|
14722
|
+
};
|
|
14723
|
+
this.trigger('focus', eventArgs);
|
|
14724
|
+
};
|
|
14725
|
+
TextArea.prototype.focusOutHandler = function (args) {
|
|
14726
|
+
if (!(this.previousValue === null && this.value === null) &&
|
|
14727
|
+
(this.previousValue !== this.value)) {
|
|
14728
|
+
this.raiseChangeEvent(args, true);
|
|
14729
|
+
}
|
|
14730
|
+
var eventArgs = {
|
|
14731
|
+
container: this.textareaWrapper.container,
|
|
14732
|
+
event: args,
|
|
14733
|
+
value: this.value
|
|
14734
|
+
};
|
|
14735
|
+
this.trigger('blur', eventArgs);
|
|
14736
|
+
};
|
|
14737
|
+
TextArea.prototype.keydownHandler = function (args) {
|
|
14738
|
+
if ((args.keyCode === 13 || args.keyCode === 9) && !((this.previousValue === null || this.previousValue === '') && (this.value === null || this.value === '') && this.element.value === '')) {
|
|
14739
|
+
this.setProperties({ value: this.element.value }, true);
|
|
14740
|
+
}
|
|
14741
|
+
};
|
|
14742
|
+
TextArea.prototype.inputHandler = function (args) {
|
|
14743
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias
|
|
14744
|
+
var textareaObj = this;
|
|
14745
|
+
var eventArgs = {
|
|
14746
|
+
event: args,
|
|
14747
|
+
value: this.element.value,
|
|
14748
|
+
previousValue: this.inputPreviousValue,
|
|
14749
|
+
container: this.textareaWrapper.container
|
|
14750
|
+
};
|
|
14751
|
+
this.inputPreviousValue = this.element.value;
|
|
14752
|
+
/* istanbul ignore next */
|
|
14753
|
+
if (this.isAngular) {
|
|
14754
|
+
textareaObj.localChange({ value: this.element.value });
|
|
14755
|
+
this.preventChange = true;
|
|
14756
|
+
}
|
|
14757
|
+
if (this.isVue) {
|
|
14758
|
+
this.preventChange = true;
|
|
14759
|
+
}
|
|
14760
|
+
this.trigger('input', eventArgs);
|
|
14761
|
+
args.stopPropagation();
|
|
14762
|
+
};
|
|
14763
|
+
TextArea.prototype.changeHandler = function (args) {
|
|
14764
|
+
this.setProperties({ value: this.element.value }, true);
|
|
14765
|
+
if (this.previousValue !== this.value) {
|
|
14766
|
+
this.raiseChangeEvent(args, true);
|
|
14767
|
+
}
|
|
14768
|
+
args.stopPropagation();
|
|
14769
|
+
};
|
|
14770
|
+
TextArea.prototype.raiseChangeEvent = function (event, interaction) {
|
|
14771
|
+
var eventArgs = {
|
|
14772
|
+
event: event,
|
|
14773
|
+
value: this.value,
|
|
14774
|
+
previousValue: this.previousValue,
|
|
14775
|
+
container: this.textareaWrapper.container,
|
|
14776
|
+
isInteraction: interaction ? interaction : false,
|
|
14777
|
+
isInteracted: interaction ? interaction : false
|
|
14778
|
+
};
|
|
14779
|
+
this.preventChange = false;
|
|
14780
|
+
this.trigger('change', eventArgs);
|
|
14781
|
+
this.previousValue = this.value;
|
|
14782
|
+
};
|
|
14783
|
+
TextArea.prototype.updateHTMLAttributesToWrapper = function () {
|
|
14784
|
+
Input.updateHTMLAttributesToWrapper(this.htmlAttributes, this.textareaWrapper.container);
|
|
14785
|
+
};
|
|
14786
|
+
TextArea.prototype.updateHTMLAttributesToElement = function () {
|
|
14787
|
+
Input.updateHTMLAttributesToElement(this.htmlAttributes, this.element);
|
|
14788
|
+
};
|
|
14789
|
+
TextArea.prototype.bindClearEvent = function () {
|
|
14790
|
+
if (this.showClearButton) {
|
|
14791
|
+
if (this.enabled) {
|
|
14792
|
+
EventHandler.add(this.textareaWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
|
|
14793
|
+
}
|
|
14794
|
+
else {
|
|
14795
|
+
EventHandler.remove(this.textareaWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler);
|
|
14796
|
+
}
|
|
14797
|
+
}
|
|
14798
|
+
};
|
|
14799
|
+
TextArea.prototype.resetInputHandler = function (event) {
|
|
14800
|
+
event.preventDefault();
|
|
14801
|
+
if (!(this.textareaWrapper.clearButton.classList.contains(HIDE_CLEAR$1)) || this.textareaWrapper.container.classList.contains('e-static-clear')) {
|
|
14802
|
+
Input.setValue('', this.element, this.floatLabelType, this.showClearButton);
|
|
14803
|
+
this.setProperties({ value: this.element.value }, true);
|
|
14804
|
+
}
|
|
14805
|
+
var eventArgs = {
|
|
14806
|
+
event: event,
|
|
14807
|
+
value: this.element.value,
|
|
14808
|
+
previousValue: this.inputPreviousValue,
|
|
14809
|
+
container: this.textareaWrapper.container
|
|
14810
|
+
};
|
|
14811
|
+
this.trigger('input', eventArgs);
|
|
14812
|
+
this.inputPreviousValue = this.element.value;
|
|
14813
|
+
this.raiseChangeEvent(event, true);
|
|
14814
|
+
if (closest(this.element, 'form')) {
|
|
14815
|
+
var element = this.element;
|
|
14816
|
+
var keyupEvent = document.createEvent('KeyboardEvent');
|
|
14817
|
+
keyupEvent.initEvent('keyup', false, true);
|
|
14818
|
+
element.dispatchEvent(keyupEvent);
|
|
14819
|
+
}
|
|
14820
|
+
};
|
|
14821
|
+
/* eslint-enable valid-jsdoc, jsdoc/require-returns */
|
|
14822
|
+
/**
|
|
14823
|
+
* Adding the multiple attributes as key-value pair to the TextArea element.
|
|
14824
|
+
*
|
|
14825
|
+
* @param {string} attributes - Specifies the attributes to be add to TextArea element.
|
|
14826
|
+
* @returns {void}
|
|
14827
|
+
*/
|
|
14828
|
+
TextArea.prototype.addAttributes = function (attributes$$1) {
|
|
14829
|
+
for (var _i = 0, _a = Object.keys(attributes$$1); _i < _a.length; _i++) {
|
|
14830
|
+
var key = _a[_i];
|
|
14831
|
+
if (key === 'disabled') {
|
|
14832
|
+
this.setProperties({ enabled: false }, true);
|
|
14833
|
+
Input.setEnabled(this.enabled, this.element, this.floatLabelType, this.textareaWrapper.container);
|
|
14834
|
+
}
|
|
14835
|
+
else if (key === 'readonly') {
|
|
14836
|
+
this.setProperties({ readonly: true }, true);
|
|
14837
|
+
Input.setReadonly(this.readonly, this.element);
|
|
14838
|
+
}
|
|
14839
|
+
else if (key === 'class') {
|
|
14840
|
+
this.element.classList.add(attributes$$1["" + key]);
|
|
14841
|
+
}
|
|
14842
|
+
else if (key === 'placeholder') {
|
|
14843
|
+
this.setProperties({ placeholder: attributes$$1["" + key] }, true);
|
|
14844
|
+
Input.setPlaceholder(this.placeholder, this.element);
|
|
14845
|
+
}
|
|
14846
|
+
else {
|
|
14847
|
+
this.element.setAttribute(key, attributes$$1["" + key]);
|
|
14848
|
+
}
|
|
14849
|
+
}
|
|
14850
|
+
};
|
|
14851
|
+
/**
|
|
14852
|
+
* Removing the multiple attributes as key-value pair to the TextArea element.
|
|
14853
|
+
*
|
|
14854
|
+
* @param { string[] } attributes - Specifies the attributes name to be removed from TextArea element.
|
|
14855
|
+
* @returns {void}
|
|
14856
|
+
*/
|
|
14857
|
+
TextArea.prototype.removeAttributes = function (attributes$$1) {
|
|
14858
|
+
for (var _i = 0, attributes_1 = attributes$$1; _i < attributes_1.length; _i++) {
|
|
14859
|
+
var key = attributes_1[_i];
|
|
14860
|
+
if (key === 'disabled') {
|
|
14861
|
+
this.setProperties({ enabled: true }, true);
|
|
14862
|
+
Input.setEnabled(this.enabled, this.element, this.floatLabelType, this.textareaWrapper.container);
|
|
14863
|
+
}
|
|
14864
|
+
else if (key === 'readonly') {
|
|
14865
|
+
this.setProperties({ readonly: false }, true);
|
|
14866
|
+
Input.setReadonly(this.readonly, this.element);
|
|
14867
|
+
}
|
|
14868
|
+
else if (key === 'placeholder') {
|
|
14869
|
+
this.setProperties({ placeholder: null }, true);
|
|
14870
|
+
Input.setPlaceholder(this.placeholder, this.element);
|
|
14871
|
+
}
|
|
14872
|
+
else {
|
|
14873
|
+
this.element.removeAttribute(key);
|
|
14874
|
+
}
|
|
14875
|
+
}
|
|
14876
|
+
};
|
|
14877
|
+
/**
|
|
14878
|
+
* Sets the focus to widget for interaction.
|
|
14879
|
+
*
|
|
14880
|
+
* @returns {void}
|
|
14881
|
+
*/
|
|
14882
|
+
TextArea.prototype.focusIn = function () {
|
|
14883
|
+
if (document.activeElement !== this.element && this.enabled) {
|
|
14884
|
+
this.element.focus();
|
|
14885
|
+
if (this.textareaWrapper.container.classList.contains('e-input-group')
|
|
14886
|
+
|| this.textareaWrapper.container.classList.contains('e-outline')
|
|
14887
|
+
|| this.textareaWrapper.container.classList.contains('e-filled')) {
|
|
14888
|
+
addClass([this.textareaWrapper.container], [TEXTBOX_FOCUS]);
|
|
14889
|
+
}
|
|
14890
|
+
}
|
|
14891
|
+
};
|
|
14892
|
+
/**
|
|
14893
|
+
* Remove the focus from widget, if the widget is in focus state.
|
|
14894
|
+
*
|
|
14895
|
+
* @returns {void}
|
|
14896
|
+
*/
|
|
14897
|
+
TextArea.prototype.focusOut = function () {
|
|
14898
|
+
if (document.activeElement === this.element && this.enabled) {
|
|
14899
|
+
this.element.blur();
|
|
14900
|
+
if (this.textareaWrapper.container.classList.contains('e-input-group')
|
|
14901
|
+
|| this.textareaWrapper.container.classList.contains('e-outline')
|
|
14902
|
+
|| this.textareaWrapper.container.classList.contains('e-filled')) {
|
|
14903
|
+
removeClass([this.textareaWrapper.container], [TEXTBOX_FOCUS]);
|
|
14904
|
+
}
|
|
14905
|
+
}
|
|
14906
|
+
};
|
|
14907
|
+
/**
|
|
14908
|
+
* Sets up the width for the textarea wrapper.
|
|
14909
|
+
*
|
|
14910
|
+
* @returns {void}
|
|
14911
|
+
*/
|
|
14912
|
+
TextArea.prototype.setWrapperWidth = function () {
|
|
14913
|
+
if (this.enabled && ((this.resizeMode !== 'None' && this.resizeMode !== 'Vertical') || (this.columnsCount || this.element.getAttribute('cols')))) {
|
|
14914
|
+
if (this.resizeMode !== 'None' && this.resizeMode !== 'Vertical') {
|
|
14915
|
+
if (this.textareaWrapper.container.style.width) {
|
|
14916
|
+
this.setElementWidth(this.textareaWrapper.container.style.width);
|
|
14917
|
+
this.textareaWrapper.container.style.width = '';
|
|
14918
|
+
this.textareaWrapper.container.classList.add(AUTO_WIDTH);
|
|
14919
|
+
}
|
|
14920
|
+
}
|
|
14921
|
+
this.textareaWrapper.container.classList.add(AUTO_WIDTH);
|
|
14922
|
+
}
|
|
14923
|
+
else {
|
|
14924
|
+
if (this.textareaWrapper.container.classList.contains(AUTO_WIDTH)) {
|
|
14925
|
+
this.textareaWrapper.container.classList.remove(AUTO_WIDTH);
|
|
14926
|
+
}
|
|
14927
|
+
}
|
|
14928
|
+
};
|
|
14929
|
+
TextArea.prototype.resetForm = function () {
|
|
14930
|
+
if (this.isAngular) {
|
|
14931
|
+
this.resetValue('');
|
|
14932
|
+
}
|
|
14933
|
+
else {
|
|
14934
|
+
this.resetValue(this.initialValue);
|
|
14935
|
+
}
|
|
14936
|
+
if (!isNullOrUndefined(this.textareaWrapper)) {
|
|
14937
|
+
var label = this.textareaWrapper.container.querySelector('.e-float-text');
|
|
14938
|
+
if (!isNullOrUndefined(label) && this.floatLabelType !== 'Always') {
|
|
14939
|
+
if ((isNullOrUndefined(this.initialValue) || this.initialValue === '')) {
|
|
14940
|
+
label.classList.add('e-label-bottom');
|
|
14941
|
+
label.classList.remove('e-label-top');
|
|
14942
|
+
}
|
|
14943
|
+
else if (this.initialValue !== '') {
|
|
14944
|
+
label.classList.add('e-label-top');
|
|
14945
|
+
label.classList.remove('e-label-bottom');
|
|
14946
|
+
}
|
|
14947
|
+
}
|
|
14948
|
+
}
|
|
14949
|
+
};
|
|
14950
|
+
TextArea.prototype.resetValue = function (value) {
|
|
14951
|
+
var prevOnChange = this.isProtectedOnChange;
|
|
14952
|
+
this.isProtectedOnChange = true;
|
|
14953
|
+
this.value = value;
|
|
14954
|
+
if (value == null && this.textareaWrapper.container.classList.contains('e-valid-input')) {
|
|
14955
|
+
this.textareaWrapper.container.classList.remove('e-valid-input');
|
|
14956
|
+
}
|
|
14957
|
+
this.isProtectedOnChange = prevOnChange;
|
|
14958
|
+
};
|
|
14959
|
+
TextArea.prototype.setElementWidth = function (width) {
|
|
14960
|
+
if (typeof width === 'number') {
|
|
14961
|
+
this.element.style.width = formatUnit(width);
|
|
14962
|
+
}
|
|
14963
|
+
else if (typeof width === 'string') {
|
|
14964
|
+
this.element.style.width = (width.match(/px|%|em/)) ? (width) : (formatUnit(width));
|
|
14965
|
+
}
|
|
14966
|
+
};
|
|
14967
|
+
TextArea.prototype.getCurrentResizeClass = function (resizeMode) {
|
|
14968
|
+
return resizeMode === 'None' ? RESIZE_NONE : (resizeMode === 'Both' ? RESIZE_XY : resizeMode === 'Horizontal' ? RESIZE_X : RESIZE_Y);
|
|
14969
|
+
};
|
|
14970
|
+
__decorate$7([
|
|
14971
|
+
Property(false)
|
|
14972
|
+
], TextArea.prototype, "readonly", void 0);
|
|
14973
|
+
__decorate$7([
|
|
14974
|
+
Property(null)
|
|
14975
|
+
], TextArea.prototype, "value", void 0);
|
|
14976
|
+
__decorate$7([
|
|
14977
|
+
Property('Never')
|
|
14978
|
+
], TextArea.prototype, "floatLabelType", void 0);
|
|
14979
|
+
__decorate$7([
|
|
14980
|
+
Property('')
|
|
14981
|
+
], TextArea.prototype, "cssClass", void 0);
|
|
14982
|
+
__decorate$7([
|
|
14983
|
+
Property(null)
|
|
14984
|
+
], TextArea.prototype, "placeholder", void 0);
|
|
14985
|
+
__decorate$7([
|
|
14986
|
+
Property({})
|
|
14987
|
+
], TextArea.prototype, "htmlAttributes", void 0);
|
|
14988
|
+
__decorate$7([
|
|
14989
|
+
Property(true)
|
|
14990
|
+
], TextArea.prototype, "enabled", void 0);
|
|
14991
|
+
__decorate$7([
|
|
14992
|
+
Property(false)
|
|
14993
|
+
], TextArea.prototype, "showClearButton", void 0);
|
|
14994
|
+
__decorate$7([
|
|
14995
|
+
Property(false)
|
|
14996
|
+
], TextArea.prototype, "enablePersistence", void 0);
|
|
14997
|
+
__decorate$7([
|
|
14998
|
+
Property(null)
|
|
14999
|
+
], TextArea.prototype, "width", void 0);
|
|
15000
|
+
__decorate$7([
|
|
15001
|
+
Property('Vertical')
|
|
15002
|
+
], TextArea.prototype, "resizeMode", void 0);
|
|
15003
|
+
__decorate$7([
|
|
15004
|
+
Property(null)
|
|
15005
|
+
], TextArea.prototype, "maxLength", void 0);
|
|
15006
|
+
__decorate$7([
|
|
15007
|
+
Property(null)
|
|
15008
|
+
], TextArea.prototype, "columnsCount", void 0);
|
|
15009
|
+
__decorate$7([
|
|
15010
|
+
Property(null)
|
|
15011
|
+
], TextArea.prototype, "rowsCount", void 0);
|
|
15012
|
+
__decorate$7([
|
|
15013
|
+
Event()
|
|
15014
|
+
], TextArea.prototype, "created", void 0);
|
|
15015
|
+
__decorate$7([
|
|
15016
|
+
Event()
|
|
15017
|
+
], TextArea.prototype, "destroyed", void 0);
|
|
15018
|
+
__decorate$7([
|
|
15019
|
+
Event()
|
|
15020
|
+
], TextArea.prototype, "change", void 0);
|
|
15021
|
+
__decorate$7([
|
|
15022
|
+
Event()
|
|
15023
|
+
], TextArea.prototype, "blur", void 0);
|
|
15024
|
+
__decorate$7([
|
|
15025
|
+
Event()
|
|
15026
|
+
], TextArea.prototype, "focus", void 0);
|
|
15027
|
+
__decorate$7([
|
|
15028
|
+
Event()
|
|
15029
|
+
], TextArea.prototype, "input", void 0);
|
|
15030
|
+
TextArea = __decorate$7([
|
|
15031
|
+
NotifyPropertyChanges
|
|
15032
|
+
], TextArea);
|
|
15033
|
+
return TextArea;
|
|
15034
|
+
}(Component));
|
|
15035
|
+
|
|
15036
|
+
/**
|
|
15037
|
+
* Uploader modules
|
|
15038
|
+
*/
|
|
15039
|
+
|
|
15040
|
+
var __extends$9 = (undefined && undefined.__extends) || (function () {
|
|
15041
|
+
var extendStatics = function (d, b) {
|
|
15042
|
+
extendStatics = Object.setPrototypeOf ||
|
|
15043
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
15044
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
15045
|
+
return extendStatics(d, b);
|
|
15046
|
+
};
|
|
15047
|
+
return function (d, b) {
|
|
15048
|
+
extendStatics(d, b);
|
|
15049
|
+
function __() { this.constructor = d; }
|
|
15050
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15051
|
+
};
|
|
15052
|
+
})();
|
|
15053
|
+
var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
15054
|
+
__extends$9(SignatureBase, _super);
|
|
15055
|
+
function SignatureBase() {
|
|
15056
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
15057
|
+
/* minDistance(distance between the two point) was calaculated for smoothness.*/
|
|
15058
|
+
_this.minDistance = 5;
|
|
15059
|
+
_this.previous = 0;
|
|
15060
|
+
/* interval handles for the smoothness in the mouse move event.*/
|
|
15061
|
+
_this.interval = 30;
|
|
15062
|
+
_this.timeout = null;
|
|
15063
|
+
_this.isSignatureEmpty = true;
|
|
15064
|
+
_this.backgroundLoaded = null;
|
|
15065
|
+
_this.isBlazor = false;
|
|
15066
|
+
_this.isResponsive = false;
|
|
15067
|
+
_this.signPointsColl = [];
|
|
15068
|
+
_this.signRatioPointsColl = [];
|
|
15069
|
+
_this.canRedraw = true;
|
|
15070
|
+
return _this;
|
|
15071
|
+
}
|
|
15072
|
+
/**
|
|
15073
|
+
* To Initialize the component rendering
|
|
15074
|
+
*
|
|
15075
|
+
* @private
|
|
15076
|
+
* @param {HTMLCanvasElement} element - Specifies the canvas element.
|
|
15077
|
+
* @param {BlazorDotnetObject} dotnetRef - Specifies for blazor client to server communication.
|
|
15078
|
+
* @returns {void}
|
|
15079
|
+
*/
|
|
15080
|
+
SignatureBase.prototype.initialize = function (element, dotnetRef) {
|
|
15081
|
+
this.clearArray = [];
|
|
15082
|
+
this.element = element;
|
|
15083
|
+
this.canvasContext = this.element.getContext('2d');
|
|
15084
|
+
this.canvasContext.canvas.tabIndex = -1;
|
|
15085
|
+
if (dotnetRef) {
|
|
15086
|
+
this.dotnetRef = dotnetRef;
|
|
15087
|
+
this.isBlazor = true;
|
|
15088
|
+
if (this.signatureValue) {
|
|
15089
|
+
this.loadPersistedSignature();
|
|
15090
|
+
}
|
|
15091
|
+
}
|
|
15092
|
+
this.setHTMLProperties();
|
|
15093
|
+
if (isNullOrUndefined(this.signatureValue)) {
|
|
15094
|
+
this.updateSnapCollection(true);
|
|
15095
|
+
}
|
|
15096
|
+
this.wireEvents();
|
|
15097
|
+
if (!this.isBlazor) {
|
|
15098
|
+
this.trigger('created', null);
|
|
15099
|
+
}
|
|
15100
|
+
};
|
|
15101
|
+
SignatureBase.prototype.wireEvents = function () {
|
|
15102
|
+
if (isNullOrUndefined(this.pointColl) && !this.isReadOnly && !this.disabled) {
|
|
15103
|
+
EventHandler.add(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler, this);
|
|
15104
|
+
EventHandler.add(this.canvasContext.canvas, 'keydown', this.keyboardHandler, this);
|
|
15105
|
+
window.addEventListener('resize', this.resizeHandler.bind(this));
|
|
15106
|
+
}
|
|
15107
|
+
else if (this.pointColl) {
|
|
15108
|
+
EventHandler.add(this.canvasContext.canvas, 'mousemove touchmove', this.mouseMoveHandler, this);
|
|
15109
|
+
EventHandler.add(this.canvasContext.canvas, 'mouseup touchend', this.mouseUpHandler, this);
|
|
15110
|
+
EventHandler.add(document, 'mouseup', this.mouseUpHandler, this);
|
|
15111
|
+
}
|
|
15112
|
+
};
|
|
15113
|
+
SignatureBase.prototype.unwireEvents = function (type) {
|
|
15114
|
+
if (type === 'mouseup' || type === 'touchend') {
|
|
15115
|
+
EventHandler.remove(this.canvasContext.canvas, 'mousemove touchmove', this.mouseMoveHandler);
|
|
15116
|
+
EventHandler.remove(this.canvasContext.canvas, 'mouseup touchend', this.mouseUpHandler);
|
|
15117
|
+
EventHandler.remove(document, 'mouseup', this.mouseUpHandler);
|
|
15118
|
+
}
|
|
15119
|
+
else {
|
|
15120
|
+
EventHandler.remove(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler);
|
|
15121
|
+
EventHandler.remove(this.canvasContext.canvas, 'keydown', this.keyboardHandler);
|
|
15122
|
+
window.removeEventListener('resize', this.resizeHandler);
|
|
15123
|
+
}
|
|
15124
|
+
};
|
|
15125
|
+
SignatureBase.prototype.setHTMLProperties = function () {
|
|
15126
|
+
if (this.element.height === 150 && this.element.width === 300 && this.element.offsetHeight !== 0 && this.element.offsetWidth !== 0) {
|
|
15127
|
+
this.element.height = this.element.offsetHeight;
|
|
15128
|
+
this.element.width = this.element.offsetWidth;
|
|
15129
|
+
this.isResponsive = true;
|
|
15130
|
+
}
|
|
15131
|
+
else if ((this.element.height !== this.element.offsetHeight - 1 || this.element.width !== this.element.offsetWidth - 1)
|
|
15132
|
+
&& this.element.offsetHeight !== 0 && this.element.offsetWidth !== 0) {
|
|
15133
|
+
this.element.height = this.element.offsetHeight;
|
|
15134
|
+
this.element.width = this.element.offsetWidth;
|
|
15135
|
+
}
|
|
15136
|
+
this.canvasContext.fillStyle = this.strokeColor;
|
|
15137
|
+
this.tempCanvas = this.createElement('canvas', { className: 'e-' + this.getModuleName() + '-temp' });
|
|
15138
|
+
this.tempContext = this.tempCanvas.getContext('2d');
|
|
15139
|
+
this.tempCanvas.width = this.element.width;
|
|
15140
|
+
this.tempCanvas.height = this.element.height;
|
|
15141
|
+
if (this.backgroundImage) {
|
|
15142
|
+
this.canvasContext.canvas.style.backgroundImage = 'url(' + this.backgroundImage + ')';
|
|
15143
|
+
this.canvasContext.canvas.style.backgroundRepeat = 'no-repeat';
|
|
15144
|
+
if (this.saveWithBackground) {
|
|
15145
|
+
this.setBackgroundImage(this.backgroundImage, 'temp');
|
|
15146
|
+
}
|
|
15147
|
+
}
|
|
15148
|
+
else if (this.backgroundColor) {
|
|
15149
|
+
this.canvasContext.canvas.style.backgroundColor = this.backgroundColor;
|
|
15150
|
+
}
|
|
15151
|
+
};
|
|
15152
|
+
// eslint-disable-next-line
|
|
15153
|
+
SignatureBase.prototype.mouseDownHandler = function (e) {
|
|
15154
|
+
if (e.buttons === 1 || e.buttons === 2 || e.type === 'touchstart') {
|
|
14308
15155
|
if (e.type === 'touchstart') {
|
|
14309
15156
|
e.preventDefault();
|
|
14310
15157
|
e.stopPropagation();
|
|
@@ -14381,7 +15228,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14381
15228
|
SignatureBase.prototype.resizeHandler = function () {
|
|
14382
15229
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
14383
15230
|
var proxy = this;
|
|
14384
|
-
if (this.isResponsive) {
|
|
15231
|
+
if (this.isResponsive && this.canRedraw) {
|
|
14385
15232
|
this.canvasContext.canvas.width = this.element.offsetWidth;
|
|
14386
15233
|
this.canvasContext.canvas.height = this.element.offsetHeight;
|
|
14387
15234
|
this.canvasContext.scale(1, 1);
|
|
@@ -14761,7 +15608,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14761
15608
|
this.internalRefresh();
|
|
14762
15609
|
this.signRatioPointsColl = [];
|
|
14763
15610
|
this.updateSnapCollection(true);
|
|
14764
|
-
this.isSignatureEmpty = true;
|
|
15611
|
+
this.isSignatureEmpty = this.canRedraw = true;
|
|
14765
15612
|
if (!this.isBlazor) {
|
|
14766
15613
|
this.trigger('change', args);
|
|
14767
15614
|
}
|
|
@@ -14925,7 +15772,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14925
15772
|
proxy.updateSnapCollection();
|
|
14926
15773
|
});
|
|
14927
15774
|
};
|
|
14928
|
-
this.isSignatureEmpty = false;
|
|
15775
|
+
this.isSignatureEmpty = this.canRedraw = false;
|
|
14929
15776
|
};
|
|
14930
15777
|
SignatureBase.prototype.saveBackground = function (savebg) {
|
|
14931
15778
|
var imageSrc;
|
|
@@ -15176,7 +16023,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
15176
16023
|
return SignatureBase;
|
|
15177
16024
|
}(Component));
|
|
15178
16025
|
|
|
15179
|
-
var __extends$
|
|
16026
|
+
var __extends$8 = (undefined && undefined.__extends) || (function () {
|
|
15180
16027
|
var extendStatics = function (d, b) {
|
|
15181
16028
|
extendStatics = Object.setPrototypeOf ||
|
|
15182
16029
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -15189,7 +16036,7 @@ var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
|
15189
16036
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15190
16037
|
};
|
|
15191
16038
|
})();
|
|
15192
|
-
var __decorate$
|
|
16039
|
+
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15193
16040
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15194
16041
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15195
16042
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -15211,7 +16058,7 @@ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
15211
16058
|
* ```
|
|
15212
16059
|
*/
|
|
15213
16060
|
var Signature = /** @__PURE__ @class */ (function (_super) {
|
|
15214
|
-
__extends$
|
|
16061
|
+
__extends$8(Signature, _super);
|
|
15215
16062
|
/**
|
|
15216
16063
|
* Constructor for creating the widget.
|
|
15217
16064
|
*
|
|
@@ -15235,6 +16082,8 @@ var Signature = /** @__PURE__ @class */ (function (_super) {
|
|
|
15235
16082
|
this.initialize();
|
|
15236
16083
|
};
|
|
15237
16084
|
Signature.prototype.initialize = function () {
|
|
16085
|
+
this.element.setAttribute('role', 'img');
|
|
16086
|
+
this.element.setAttribute('aria-label', 'signature');
|
|
15238
16087
|
addClass([this.element], 'e-' + this.getModuleName());
|
|
15239
16088
|
_super.prototype.initialize.call(this, this.element);
|
|
15240
16089
|
if (this.enablePersistence) {
|
|
@@ -15293,52 +16142,52 @@ var Signature = /** @__PURE__ @class */ (function (_super) {
|
|
|
15293
16142
|
}
|
|
15294
16143
|
}
|
|
15295
16144
|
};
|
|
15296
|
-
__decorate$
|
|
16145
|
+
__decorate$8([
|
|
15297
16146
|
Property('')
|
|
15298
16147
|
], Signature.prototype, "backgroundColor", void 0);
|
|
15299
|
-
__decorate$
|
|
16148
|
+
__decorate$8([
|
|
15300
16149
|
Property('')
|
|
15301
16150
|
], Signature.prototype, "backgroundImage", void 0);
|
|
15302
|
-
__decorate$
|
|
16151
|
+
__decorate$8([
|
|
15303
16152
|
Property(false)
|
|
15304
16153
|
], Signature.prototype, "disabled", void 0);
|
|
15305
|
-
__decorate$
|
|
16154
|
+
__decorate$8([
|
|
15306
16155
|
Property(false)
|
|
15307
16156
|
], Signature.prototype, "isReadOnly", void 0);
|
|
15308
|
-
__decorate$
|
|
16157
|
+
__decorate$8([
|
|
15309
16158
|
Property(true)
|
|
15310
16159
|
], Signature.prototype, "saveWithBackground", void 0);
|
|
15311
|
-
__decorate$
|
|
16160
|
+
__decorate$8([
|
|
15312
16161
|
Property('#000000')
|
|
15313
16162
|
], Signature.prototype, "strokeColor", void 0);
|
|
15314
|
-
__decorate$
|
|
16163
|
+
__decorate$8([
|
|
15315
16164
|
Property(0.5)
|
|
15316
16165
|
], Signature.prototype, "minStrokeWidth", void 0);
|
|
15317
|
-
__decorate$
|
|
16166
|
+
__decorate$8([
|
|
15318
16167
|
Property(2)
|
|
15319
16168
|
], Signature.prototype, "maxStrokeWidth", void 0);
|
|
15320
|
-
__decorate$
|
|
16169
|
+
__decorate$8([
|
|
15321
16170
|
Property(0.7)
|
|
15322
16171
|
], Signature.prototype, "velocity", void 0);
|
|
15323
|
-
__decorate$
|
|
16172
|
+
__decorate$8([
|
|
15324
16173
|
Property('en-US')
|
|
15325
16174
|
], Signature.prototype, "locale", void 0);
|
|
15326
|
-
__decorate$
|
|
16175
|
+
__decorate$8([
|
|
15327
16176
|
Property(false)
|
|
15328
16177
|
], Signature.prototype, "enableRtl", void 0);
|
|
15329
|
-
__decorate$
|
|
16178
|
+
__decorate$8([
|
|
15330
16179
|
Property(false)
|
|
15331
16180
|
], Signature.prototype, "enablePersistence", void 0);
|
|
15332
|
-
__decorate$
|
|
16181
|
+
__decorate$8([
|
|
15333
16182
|
Event()
|
|
15334
16183
|
], Signature.prototype, "beforeSave", void 0);
|
|
15335
|
-
__decorate$
|
|
16184
|
+
__decorate$8([
|
|
15336
16185
|
Event()
|
|
15337
16186
|
], Signature.prototype, "change", void 0);
|
|
15338
|
-
__decorate$
|
|
16187
|
+
__decorate$8([
|
|
15339
16188
|
Event()
|
|
15340
16189
|
], Signature.prototype, "created", void 0);
|
|
15341
|
-
Signature = __decorate$
|
|
16190
|
+
Signature = __decorate$8([
|
|
15342
16191
|
NotifyPropertyChanges
|
|
15343
16192
|
], Signature);
|
|
15344
16193
|
return Signature;
|
|
@@ -15348,7 +16197,7 @@ var Signature = /** @__PURE__ @class */ (function (_super) {
|
|
|
15348
16197
|
* Signature modules
|
|
15349
16198
|
*/
|
|
15350
16199
|
|
|
15351
|
-
var __extends$
|
|
16200
|
+
var __extends$10 = (undefined && undefined.__extends) || (function () {
|
|
15352
16201
|
var extendStatics = function (d, b) {
|
|
15353
16202
|
extendStatics = Object.setPrototypeOf ||
|
|
15354
16203
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -15361,7 +16210,7 @@ var __extends$9 = (undefined && undefined.__extends) || (function () {
|
|
|
15361
16210
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15362
16211
|
};
|
|
15363
16212
|
})();
|
|
15364
|
-
var __decorate$
|
|
16213
|
+
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15365
16214
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15366
16215
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15367
16216
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -15443,7 +16292,7 @@ var PrecisionType;
|
|
|
15443
16292
|
* ```
|
|
15444
16293
|
*/
|
|
15445
16294
|
var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
15446
|
-
__extends$
|
|
16295
|
+
__extends$10(Rating, _super);
|
|
15447
16296
|
/**
|
|
15448
16297
|
* Constructor for creating the widget
|
|
15449
16298
|
*
|
|
@@ -15934,6 +16783,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15934
16783
|
});
|
|
15935
16784
|
};
|
|
15936
16785
|
Rating.prototype.keyActionHandler = function (e) {
|
|
16786
|
+
e.preventDefault();
|
|
15937
16787
|
if (this.disabled || this.readOnly) {
|
|
15938
16788
|
return;
|
|
15939
16789
|
}
|
|
@@ -16121,73 +16971,73 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
16121
16971
|
}
|
|
16122
16972
|
}
|
|
16123
16973
|
};
|
|
16124
|
-
__decorate$
|
|
16974
|
+
__decorate$9([
|
|
16125
16975
|
Property(false)
|
|
16126
16976
|
], Rating.prototype, "allowReset", void 0);
|
|
16127
|
-
__decorate$
|
|
16977
|
+
__decorate$9([
|
|
16128
16978
|
Property('')
|
|
16129
16979
|
], Rating.prototype, "cssClass", void 0);
|
|
16130
|
-
__decorate$
|
|
16980
|
+
__decorate$9([
|
|
16131
16981
|
Property(false)
|
|
16132
16982
|
], Rating.prototype, "disabled", void 0);
|
|
16133
|
-
__decorate$
|
|
16983
|
+
__decorate$9([
|
|
16134
16984
|
Property('')
|
|
16135
16985
|
], Rating.prototype, "emptyTemplate", void 0);
|
|
16136
|
-
__decorate$
|
|
16986
|
+
__decorate$9([
|
|
16137
16987
|
Property(true)
|
|
16138
16988
|
], Rating.prototype, "enableAnimation", void 0);
|
|
16139
|
-
__decorate$
|
|
16989
|
+
__decorate$9([
|
|
16140
16990
|
Property(false)
|
|
16141
16991
|
], Rating.prototype, "enableSingleSelection", void 0);
|
|
16142
|
-
__decorate$
|
|
16992
|
+
__decorate$9([
|
|
16143
16993
|
Property('')
|
|
16144
16994
|
], Rating.prototype, "fullTemplate", void 0);
|
|
16145
|
-
__decorate$
|
|
16995
|
+
__decorate$9([
|
|
16146
16996
|
Property(5)
|
|
16147
16997
|
], Rating.prototype, "itemsCount", void 0);
|
|
16148
|
-
__decorate$
|
|
16998
|
+
__decorate$9([
|
|
16149
16999
|
Property(LabelPosition.Right)
|
|
16150
17000
|
], Rating.prototype, "labelPosition", void 0);
|
|
16151
|
-
__decorate$
|
|
17001
|
+
__decorate$9([
|
|
16152
17002
|
Property('')
|
|
16153
17003
|
], Rating.prototype, "labelTemplate", void 0);
|
|
16154
|
-
__decorate$
|
|
17004
|
+
__decorate$9([
|
|
16155
17005
|
Property(0.0)
|
|
16156
17006
|
], Rating.prototype, "min", void 0);
|
|
16157
|
-
__decorate$
|
|
17007
|
+
__decorate$9([
|
|
16158
17008
|
Property(PrecisionType.Full)
|
|
16159
17009
|
], Rating.prototype, "precision", void 0);
|
|
16160
|
-
__decorate$
|
|
17010
|
+
__decorate$9([
|
|
16161
17011
|
Property(false)
|
|
16162
17012
|
], Rating.prototype, "readOnly", void 0);
|
|
16163
|
-
__decorate$
|
|
17013
|
+
__decorate$9([
|
|
16164
17014
|
Property(false)
|
|
16165
17015
|
], Rating.prototype, "showLabel", void 0);
|
|
16166
|
-
__decorate$
|
|
17016
|
+
__decorate$9([
|
|
16167
17017
|
Property(true)
|
|
16168
17018
|
], Rating.prototype, "showTooltip", void 0);
|
|
16169
|
-
__decorate$
|
|
17019
|
+
__decorate$9([
|
|
16170
17020
|
Property('')
|
|
16171
17021
|
], Rating.prototype, "tooltipTemplate", void 0);
|
|
16172
|
-
__decorate$
|
|
17022
|
+
__decorate$9([
|
|
16173
17023
|
Property(0.0)
|
|
16174
17024
|
], Rating.prototype, "value", void 0);
|
|
16175
|
-
__decorate$
|
|
17025
|
+
__decorate$9([
|
|
16176
17026
|
Property(true)
|
|
16177
17027
|
], Rating.prototype, "visible", void 0);
|
|
16178
|
-
__decorate$
|
|
17028
|
+
__decorate$9([
|
|
16179
17029
|
Event()
|
|
16180
17030
|
], Rating.prototype, "beforeItemRender", void 0);
|
|
16181
|
-
__decorate$
|
|
17031
|
+
__decorate$9([
|
|
16182
17032
|
Event()
|
|
16183
17033
|
], Rating.prototype, "created", void 0);
|
|
16184
|
-
__decorate$
|
|
17034
|
+
__decorate$9([
|
|
16185
17035
|
Event()
|
|
16186
17036
|
], Rating.prototype, "onItemHover", void 0);
|
|
16187
|
-
__decorate$
|
|
17037
|
+
__decorate$9([
|
|
16188
17038
|
Event()
|
|
16189
17039
|
], Rating.prototype, "valueChanged", void 0);
|
|
16190
|
-
Rating = __decorate$
|
|
17040
|
+
Rating = __decorate$9([
|
|
16191
17041
|
NotifyPropertyChanges
|
|
16192
17042
|
], Rating);
|
|
16193
17043
|
return Rating;
|
|
@@ -16205,5 +17055,5 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
16205
17055
|
* NumericTextBox all modules
|
|
16206
17056
|
*/
|
|
16207
17057
|
|
|
16208
|
-
export { NumericTextBox, regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputMouseDownHandler, maskInputMouseUpHandler, maskInputFocusHandler, triggerFocus, escapeRegExp, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo, MaskedTextBox, Input, TicksData, ColorRangeData, LimitData, TooltipData, Slider, regex, ErrorOption, FormValidator, FilesProp, ButtonsProps, AsyncSettings, Uploader, ColorPicker, TextBox, Signature, LabelPosition, PrecisionType, Rating, SignatureBase };
|
|
17058
|
+
export { NumericTextBox, regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputMouseDownHandler, maskInputMouseUpHandler, maskInputFocusHandler, triggerFocus, escapeRegExp, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo, MaskedTextBox, containerAttributes, TEXTBOX_FOCUS, Input, TicksData, ColorRangeData, LimitData, TooltipData, Slider, regex, ErrorOption, FormValidator, FilesProp, ButtonsProps, AsyncSettings, Uploader, ColorPicker, TextBox, TextArea, Signature, LabelPosition, PrecisionType, Rating, SignatureBase };
|
|
16209
17059
|
//# sourceMappingURL=ej2-inputs.es5.js.map
|