@syncfusion/ej2-inputs 19.2.60 → 19.3.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +359 -610
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +371 -627
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/helpers/e2e/colorpickerHelper.d.ts +23 -0
- package/helpers/e2e/colorpickerHelper.js +53 -0
- package/package.json +9 -9
- package/src/color-picker/color-picker-model.d.ts +7 -0
- package/src/color-picker/color-picker.d.ts +6 -0
- package/src/color-picker/color-picker.js +10 -1
- package/src/maskedtextbox/base/mask-base.js +1 -1
- package/src/maskedtextbox/maskedtextbox/maskedtextbox-model.d.ts +1 -4
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +0 -3
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +2 -11
- package/src/numerictextbox/numerictextbox-model.d.ts +1 -10
- package/src/numerictextbox/numerictextbox.d.ts +0 -9
- package/src/numerictextbox/numerictextbox.js +52 -96
- package/src/slider/slider.d.ts +1 -0
- package/src/slider/slider.js +10 -1
- package/src/textbox/textbox-model.d.ts +1 -4
- package/src/textbox/textbox.d.ts +0 -3
- package/src/textbox/textbox.js +91 -113
- package/src/uploader/uploader-model.d.ts +1 -26
- package/src/uploader/uploader.d.ts +0 -40
- package/src/uploader/uploader.js +210 -407
- package/styles/bootstrap-dark.css +14 -6
- package/styles/bootstrap.css +14 -6
- package/styles/bootstrap4.css +22 -12
- package/styles/bootstrap5-dark.css +7548 -0
- package/styles/bootstrap5-dark.scss +7 -0
- package/styles/bootstrap5.css +7548 -0
- package/styles/bootstrap5.scss +7 -0
- package/styles/color-picker/_bootstrap5-dark-definition.scss +1 -0
- package/styles/color-picker/_bootstrap5-definition.scss +134 -0
- package/styles/color-picker/_layout.scss +26 -3
- package/styles/color-picker/_tailwind-dark-definition.scss +1 -132
- package/styles/color-picker/_tailwind-definition.scss +25 -24
- package/styles/color-picker/_theme.scss +33 -0
- package/styles/color-picker/bootstrap5-dark.css +964 -0
- package/styles/color-picker/bootstrap5-dark.scss +11 -0
- package/styles/color-picker/bootstrap5.css +964 -0
- package/styles/color-picker/bootstrap5.scss +11 -0
- package/styles/color-picker/icons/_bootstrap5-dark.scss +1 -0
- package/styles/color-picker/icons/_bootstrap5.scss +10 -0
- package/styles/fabric-dark.css +15 -7
- package/styles/fabric.css +15 -7
- package/styles/highcontrast-light.css +15 -7
- package/styles/highcontrast.css +16 -8
- package/styles/input/_bootstrap5-dark-definition.scss +1 -0
- package/styles/input/_bootstrap5-definition.scss +320 -0
- package/styles/input/_definition.scss +217 -0
- package/styles/input/_fabric-definition.scss +1 -1
- package/styles/input/_highcontrast-definition.scss +1 -1
- package/styles/input/_layout.scss +196 -157
- package/styles/input/_material-dark-definition.scss +133 -120
- package/styles/input/_material-definition.scss +1 -0
- package/styles/input/_tailwind-dark-definition.scss +1 -315
- package/styles/input/_tailwind-definition.scss +50 -47
- package/styles/input/_theme.scss +92 -59
- package/styles/input/bootstrap-dark.css +12 -3
- package/styles/input/bootstrap.css +12 -3
- package/styles/input/bootstrap4.css +15 -3
- package/styles/input/bootstrap5-dark.css +4670 -0
- package/styles/input/bootstrap5-dark.scss +4 -0
- package/styles/input/bootstrap5.css +4670 -0
- package/styles/input/bootstrap5.scss +4 -0
- package/styles/input/fabric-dark.css +12 -3
- package/styles/input/fabric.css +13 -4
- package/styles/input/highcontrast-light.css +12 -3
- package/styles/input/highcontrast.css +13 -4
- package/styles/input/icons/_bootstrap5-dark.scss +1 -0
- package/styles/input/icons/_bootstrap5.scss +17 -0
- package/styles/input/icons/_material-dark.scss +32 -0
- package/styles/input/icons/_tailwind-dark.scss +1 -17
- package/styles/input/material-dark.css +2320 -201
- package/styles/input/material.css +12 -3
- package/styles/input/tailwind-dark.css +14 -5
- package/styles/input/tailwind.css +14 -5
- package/styles/maskedtextbox/_bootstrap5-dark-definition.scss +1 -0
- package/styles/maskedtextbox/_bootstrap5-definition.scss +7 -0
- package/styles/maskedtextbox/_tailwind-dark-definition.scss +1 -6
- package/styles/maskedtextbox/_tailwind-definition.scss +4 -1
- package/styles/maskedtextbox/bootstrap5-dark.css +33 -0
- package/styles/maskedtextbox/bootstrap5-dark.scss +4 -0
- package/styles/maskedtextbox/bootstrap5.css +33 -0
- package/styles/maskedtextbox/bootstrap5.scss +4 -0
- package/styles/material-dark.css +2337 -218
- package/styles/material.css +14 -5
- package/styles/numerictextbox/_bootstrap5-dark-definition.scss +1 -0
- package/styles/numerictextbox/_bootstrap5-definition.scss +3 -0
- package/styles/numerictextbox/_tailwind-dark-definition.scss +1 -5
- package/styles/numerictextbox/_tailwind-definition.scss +1 -1
- package/styles/numerictextbox/bootstrap5-dark.css +48 -0
- package/styles/numerictextbox/bootstrap5-dark.scss +5 -0
- package/styles/numerictextbox/bootstrap5.css +48 -0
- package/styles/numerictextbox/bootstrap5.scss +5 -0
- package/styles/numerictextbox/icons/_bootstrap5-dark.scss +1 -0
- package/styles/numerictextbox/icons/_bootstrap5.scss +12 -0
- package/styles/numerictextbox/icons/_tailwind-dark.scss +1 -12
- package/styles/slider/_bootstrap5-dark-definition.scss +1 -0
- package/styles/slider/_bootstrap5-definition.scss +90 -0
- package/styles/slider/_fabric-dark-definition.scss +2 -2
- package/styles/slider/_layout.scss +294 -69
- package/styles/slider/_material-dark-definition.scss +1 -1
- package/styles/slider/_tailwind-dark-definition.scss +1 -80
- package/styles/slider/_tailwind-definition.scss +32 -27
- package/styles/slider/_theme.scss +14 -6
- package/styles/slider/bootstrap-dark.css +2 -3
- package/styles/slider/bootstrap.css +2 -3
- package/styles/slider/bootstrap4.css +7 -9
- package/styles/slider/bootstrap5-dark.css +749 -0
- package/styles/slider/bootstrap5-dark.scss +5 -0
- package/styles/slider/bootstrap5.css +749 -0
- package/styles/slider/bootstrap5.scss +5 -0
- package/styles/slider/fabric-dark.css +3 -4
- package/styles/slider/fabric.css +2 -3
- package/styles/slider/highcontrast-light.css +3 -4
- package/styles/slider/highcontrast.css +3 -4
- package/styles/slider/material-dark.css +16 -16
- package/styles/slider/material.css +2 -2
- package/styles/slider/tailwind-dark.css +9 -8
- package/styles/slider/tailwind.css +7 -3
- package/styles/tailwind-dark.css +23 -13
- package/styles/tailwind.css +21 -8
- package/styles/textbox/_bootstrap5-dark-definition.scss +1 -0
- package/styles/textbox/_bootstrap5-definition.scss +0 -0
- package/styles/textbox/_tailwind-dark-definition.scss +1 -0
- package/styles/textbox/bootstrap5-dark.css +0 -0
- package/styles/textbox/bootstrap5-dark.scss +4 -0
- package/styles/textbox/bootstrap5.css +0 -0
- package/styles/textbox/bootstrap5.scss +4 -0
- package/styles/uploader/_bootstrap5-dark-definition.scss +1 -0
- package/styles/uploader/_bootstrap5-definition.scss +216 -0
- package/styles/uploader/_definition.scss +142 -0
- package/styles/uploader/_tailwind-dark-definition.scss +1 -216
- package/styles/uploader/_tailwind-definition.scss +21 -21
- package/styles/uploader/_theme.scss +2 -2
- package/styles/uploader/bootstrap5-dark.css +1079 -0
- package/styles/uploader/bootstrap5-dark.scss +6 -0
- package/styles/uploader/bootstrap5.css +1079 -0
- package/styles/uploader/bootstrap5.scss +6 -0
- package/styles/uploader/icons/_bootstrap5-dark.scss +1 -0
- package/styles/uploader/icons/_bootstrap5.scss +34 -0
- package/styles/uploader/icons/_tailwind-dark.scss +1 -35
- package/styles/uploader/material-dark.css +1 -1
- package/styles/color-picker/_icons.scss +0 -10
package/src/slider/slider.js
CHANGED
|
@@ -308,11 +308,19 @@ var Slider = /** @class */ (function (_super) {
|
|
|
308
308
|
* @private
|
|
309
309
|
*/
|
|
310
310
|
Slider.prototype.render = function () {
|
|
311
|
+
var _this = this;
|
|
311
312
|
this.initialize();
|
|
312
313
|
this.initRender();
|
|
313
314
|
this.wireEvents();
|
|
314
315
|
this.setZindex();
|
|
315
316
|
this.renderComplete();
|
|
317
|
+
if (this.element.tagName === 'EJS-SLIDER') {
|
|
318
|
+
if (this.getTheme(this.sliderContainer) == "none") {
|
|
319
|
+
setTimeout(function () {
|
|
320
|
+
_this.refresh();
|
|
321
|
+
}, 0);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
316
324
|
};
|
|
317
325
|
Slider.prototype.initialize = function () {
|
|
318
326
|
addClass([this.element], classNames.root);
|
|
@@ -431,6 +439,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
431
439
|
|| this.getTheme(this.sliderContainer) === 'bootstrap-dark';
|
|
432
440
|
this.isBootstrap4 = this.getTheme(this.sliderContainer) === 'bootstrap4';
|
|
433
441
|
this.isTailwind = this.getTheme(this.sliderContainer) === 'tailwind' || this.getTheme(this.sliderContainer) === 'tailwind-dark';
|
|
442
|
+
this.isBootstrap5 = this.getTheme(this.sliderContainer) === 'bootstrap5';
|
|
434
443
|
this.isMaterialTooltip = this.isMaterial && this.type !== 'Range' && this.tooltip.isVisible;
|
|
435
444
|
};
|
|
436
445
|
Slider.prototype.createRangeBar = function () {
|
|
@@ -921,7 +930,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
921
930
|
};
|
|
922
931
|
Slider.prototype.renderTooltip = function () {
|
|
923
932
|
this.tooltipObj = new Tooltip({
|
|
924
|
-
showTipPointer: this.isBootstrap || this.isMaterial || this.isBootstrap4 || this.isTailwind,
|
|
933
|
+
showTipPointer: this.isBootstrap || this.isMaterial || this.isBootstrap4 || this.isTailwind || this.isBootstrap5,
|
|
925
934
|
cssClass: classNames.sliderTooltip,
|
|
926
935
|
height: this.isMaterial ? 30 : 'auto',
|
|
927
936
|
animation: { open: { effect: 'None' }, close: { effect: 'FadeOut', duration: 500 } },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Property, Event, EmitType, EventHandler, L10n, setValue, getValue, isNullOrUndefined } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, detach, Internationalization, getUniqueID, closest } from '@syncfusion/ej2-base';import { addClass, removeClass
|
|
1
|
+
import { Component, Property, Event, EmitType, EventHandler, L10n, setValue, getValue, isNullOrUndefined } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, detach, Internationalization, getUniqueID, closest } from '@syncfusion/ej2-base';import { addClass, removeClass } from '@syncfusion/ej2-base';import { FloatLabelType, Input, InputObject } from '../input/input';
|
|
2
2
|
import {ChangedEventArgs,FocusOutEventArgs,FocusInEventArgs,InputEventArgs} from "./textbox";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
|
@@ -114,7 +114,6 @@ export interface TextBoxModel extends ComponentModel{
|
|
|
114
114
|
* Triggers when the TextBox component is created.
|
|
115
115
|
*
|
|
116
116
|
* @event created
|
|
117
|
-
* @blazorProperty 'Created'
|
|
118
117
|
*/
|
|
119
118
|
created?: EmitType<Object>;
|
|
120
119
|
|
|
@@ -122,7 +121,6 @@ export interface TextBoxModel extends ComponentModel{
|
|
|
122
121
|
* Triggers when the TextBox component is destroyed.
|
|
123
122
|
*
|
|
124
123
|
* @event destroyed
|
|
125
|
-
* @blazorProperty 'Destroyed'
|
|
126
124
|
*/
|
|
127
125
|
destroyed?: EmitType<Object>;
|
|
128
126
|
|
|
@@ -130,7 +128,6 @@ export interface TextBoxModel extends ComponentModel{
|
|
|
130
128
|
* Triggers when the content of TextBox has changed and gets focus-out.
|
|
131
129
|
*
|
|
132
130
|
* @event change
|
|
133
|
-
* @blazorProperty 'ValueChange'
|
|
134
131
|
*/
|
|
135
132
|
change?: EmitType<ChangedEventArgs>;
|
|
136
133
|
|
package/src/textbox/textbox.d.ts
CHANGED
|
@@ -155,21 +155,18 @@ export declare class TextBox extends Component<HTMLInputElement | HTMLTextAreaEl
|
|
|
155
155
|
* Triggers when the TextBox component is created.
|
|
156
156
|
*
|
|
157
157
|
* @event created
|
|
158
|
-
* @blazorProperty 'Created'
|
|
159
158
|
*/
|
|
160
159
|
created: EmitType<Object>;
|
|
161
160
|
/**
|
|
162
161
|
* Triggers when the TextBox component is destroyed.
|
|
163
162
|
*
|
|
164
163
|
* @event destroyed
|
|
165
|
-
* @blazorProperty 'Destroyed'
|
|
166
164
|
*/
|
|
167
165
|
destroyed: EmitType<Object>;
|
|
168
166
|
/**
|
|
169
167
|
* Triggers when the content of TextBox has changed and gets focus-out.
|
|
170
168
|
*
|
|
171
169
|
* @event change
|
|
172
|
-
* @blazorProperty 'ValueChange'
|
|
173
170
|
*/
|
|
174
171
|
change: EmitType<ChangedEventArgs>;
|
|
175
172
|
/**
|
package/src/textbox/textbox.js
CHANGED
|
@@ -19,7 +19,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
19
19
|
};
|
|
20
20
|
import { Component, Property, Event, EventHandler, L10n, setValue, getValue, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
21
21
|
import { NotifyPropertyChanges, detach, Internationalization, getUniqueID, closest } from '@syncfusion/ej2-base';
|
|
22
|
-
import { addClass, removeClass
|
|
22
|
+
import { addClass, removeClass } from '@syncfusion/ej2-base';
|
|
23
23
|
import { Input } from '../input/input';
|
|
24
24
|
var HIDE_CLEAR = 'e-clear-icon-hide';
|
|
25
25
|
var TEXTBOX_FOCUS = 'e-input-focus';
|
|
@@ -165,72 +165,70 @@ var TextBox = /** @class */ (function (_super) {
|
|
|
165
165
|
return (!str || /^\s*$/.test(str));
|
|
166
166
|
};
|
|
167
167
|
TextBox.prototype.preRender = function () {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
this.element.removeAttribute('name');
|
|
188
|
-
}
|
|
168
|
+
this.cloneElement = this.element.cloneNode(true);
|
|
169
|
+
this.formElement = closest(this.element, 'form');
|
|
170
|
+
if (!isNullOrUndefined(this.formElement)) {
|
|
171
|
+
this.isForm = true;
|
|
172
|
+
}
|
|
173
|
+
/* istanbul ignore next */
|
|
174
|
+
if (this.element.tagName === 'EJS-TEXTBOX') {
|
|
175
|
+
var ejInstance = getValue('ej2_instances', this.element);
|
|
176
|
+
var inputElement = this.multiline ?
|
|
177
|
+
this.createElement('textarea') :
|
|
178
|
+
this.createElement('input');
|
|
179
|
+
var index = 0;
|
|
180
|
+
for (index; index < this.element.attributes.length; index++) {
|
|
181
|
+
var attributeName = this.element.attributes[index].nodeName;
|
|
182
|
+
if (attributeName !== 'id') {
|
|
183
|
+
inputElement.setAttribute(attributeName, this.element.attributes[index].nodeValue);
|
|
184
|
+
inputElement.innerHTML = this.element.innerHTML;
|
|
185
|
+
if (attributeName === 'name') {
|
|
186
|
+
this.element.removeAttribute('name');
|
|
189
187
|
}
|
|
190
188
|
}
|
|
191
|
-
this.element.appendChild(inputElement);
|
|
192
|
-
this.element = inputElement;
|
|
193
|
-
setValue('ej2_instances', ejInstance, this.element);
|
|
194
|
-
}
|
|
195
|
-
this.updateHTMLAttrToElement();
|
|
196
|
-
this.checkAttributes(false);
|
|
197
|
-
if (this.element.tagName !== 'TEXTAREA') {
|
|
198
|
-
this.element.setAttribute('type', this.type);
|
|
199
|
-
}
|
|
200
|
-
this.element.setAttribute('role', 'textbox');
|
|
201
|
-
this.globalize = new Internationalization(this.locale);
|
|
202
|
-
var localeText = { placeholder: this.placeholder };
|
|
203
|
-
this.l10n = new L10n('textbox', localeText, this.locale);
|
|
204
|
-
if (this.l10n.getConstant('placeholder') !== '') {
|
|
205
|
-
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
206
189
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
190
|
+
this.element.appendChild(inputElement);
|
|
191
|
+
this.element = inputElement;
|
|
192
|
+
setValue('ej2_instances', ejInstance, this.element);
|
|
193
|
+
}
|
|
194
|
+
this.updateHTMLAttrToElement();
|
|
195
|
+
this.checkAttributes(false);
|
|
196
|
+
if (this.element.tagName !== 'TEXTAREA') {
|
|
197
|
+
this.element.setAttribute('type', this.type);
|
|
198
|
+
}
|
|
199
|
+
this.element.setAttribute('role', 'textbox');
|
|
200
|
+
this.globalize = new Internationalization(this.locale);
|
|
201
|
+
var localeText = { placeholder: this.placeholder };
|
|
202
|
+
this.l10n = new L10n('textbox', localeText, this.locale);
|
|
203
|
+
if (this.l10n.getConstant('placeholder') !== '') {
|
|
204
|
+
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
205
|
+
}
|
|
206
|
+
if (!this.element.hasAttribute('id')) {
|
|
207
|
+
this.element.setAttribute('id', getUniqueID('textbox'));
|
|
208
|
+
}
|
|
209
|
+
if (!this.element.hasAttribute('name')) {
|
|
210
|
+
this.element.setAttribute('name', this.element.getAttribute('id'));
|
|
211
|
+
}
|
|
212
|
+
if (this.element.tagName === 'INPUT' && this.multiline) {
|
|
213
|
+
this.isHiddenInput = true;
|
|
214
|
+
this.textarea = this.createElement('textarea');
|
|
215
|
+
this.element.parentNode.insertBefore(this.textarea, this.element);
|
|
216
|
+
this.element.setAttribute('type', 'hidden');
|
|
217
|
+
this.textarea.setAttribute('name', this.element.getAttribute('name'));
|
|
218
|
+
this.element.removeAttribute('name');
|
|
219
|
+
this.textarea.setAttribute('role', this.element.getAttribute('role'));
|
|
220
|
+
this.element.removeAttribute('role');
|
|
221
|
+
this.textarea.setAttribute('id', getUniqueID('textarea'));
|
|
222
|
+
var apiAttributes = ['placeholder', 'disabled', 'value', 'readonly', 'type', 'autocomplete'];
|
|
223
|
+
for (var index = 0; index < this.element.attributes.length; index++) {
|
|
224
|
+
var attributeName = this.element.attributes[index].nodeName;
|
|
225
|
+
if (this.element.hasAttribute(attributeName) && containerAttr.indexOf(attributeName) < 0 &&
|
|
226
|
+
!(attributeName === 'id' || attributeName === 'type' || attributeName === 'e-mappinguid')) {
|
|
227
|
+
// e-mappinguid attribute is handled for Grid component.
|
|
228
|
+
this.textarea.setAttribute(attributeName, this.element.attributes[index].nodeValue);
|
|
229
|
+
if (apiAttributes.indexOf(attributeName) < 0) {
|
|
230
|
+
this.element.removeAttribute(attributeName);
|
|
231
|
+
index--;
|
|
234
232
|
}
|
|
235
233
|
}
|
|
236
234
|
}
|
|
@@ -293,37 +291,22 @@ var TextBox = /** @class */ (function (_super) {
|
|
|
293
291
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
294
292
|
updatedCssClassValue = this.getInputValidClassList(this.cssClass);
|
|
295
293
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
this.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
this.respectiveElement.parentNode.insertBefore(this.element, this.respectiveElement);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
else {
|
|
316
|
-
this.respectiveElement = this.element;
|
|
317
|
-
this.textboxWrapper = { container: this.element.parentElement };
|
|
318
|
-
if (this.showClearButton && !this.multiline) {
|
|
319
|
-
this.textboxWrapper.clearButton = this.textboxWrapper.container.querySelector('.e-clear-icon');
|
|
320
|
-
Input.wireClearBtnEvents(this.respectiveElement, this.textboxWrapper.clearButton, this.textboxWrapper.container);
|
|
321
|
-
}
|
|
322
|
-
if (this.floatLabelType === 'Auto') {
|
|
323
|
-
Input.wireFloatingEvents(this.respectiveElement);
|
|
324
|
-
}
|
|
325
|
-
// eslint-disable-next-line max-len, @typescript-eslint/no-explicit-any
|
|
326
|
-
Input.bindInitialEvent({ element: this.respectiveElement, buttons: null, customTag: null, floatLabelType: this.floatLabelType, properties: this.properties });
|
|
294
|
+
this.respectiveElement = (this.isHiddenInput) ? this.textarea : this.element;
|
|
295
|
+
this.textboxWrapper = Input.createInput({
|
|
296
|
+
element: this.respectiveElement,
|
|
297
|
+
floatLabelType: this.floatLabelType,
|
|
298
|
+
properties: {
|
|
299
|
+
enabled: this.enabled,
|
|
300
|
+
enableRtl: this.enableRtl,
|
|
301
|
+
cssClass: updatedCssClassValue,
|
|
302
|
+
readonly: this.readonly,
|
|
303
|
+
placeholder: this.placeholder,
|
|
304
|
+
showClearButton: this.showClearButton
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
this.updateHTMLAttrToWrapper();
|
|
308
|
+
if (this.isHiddenInput) {
|
|
309
|
+
this.respectiveElement.parentNode.insertBefore(this.element, this.respectiveElement);
|
|
327
310
|
}
|
|
328
311
|
this.wireEvents();
|
|
329
312
|
if (!isNullOrUndefined(this.value)) {
|
|
@@ -520,7 +503,7 @@ var TextBox = /** @class */ (function (_super) {
|
|
|
520
503
|
};
|
|
521
504
|
TextBox.prototype.resetInputHandler = function (event) {
|
|
522
505
|
event.preventDefault();
|
|
523
|
-
if (!(this.textboxWrapper.clearButton.classList.contains(HIDE_CLEAR))) {
|
|
506
|
+
if (!(this.textboxWrapper.clearButton.classList.contains(HIDE_CLEAR)) || this.textboxWrapper.container.classList.contains('e-static-clear')) {
|
|
524
507
|
Input.setValue('', this.respectiveElement, this.floatLabelType, this.showClearButton);
|
|
525
508
|
if (this.isHiddenInput) {
|
|
526
509
|
this.element.value = this.respectiveElement.value;
|
|
@@ -560,25 +543,20 @@ var TextBox = /** @class */ (function (_super) {
|
|
|
560
543
|
*/
|
|
561
544
|
TextBox.prototype.destroy = function () {
|
|
562
545
|
this.unWireEvents();
|
|
563
|
-
if (
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
this.element.removeAttribute('type');
|
|
568
|
-
}
|
|
569
|
-
this.respectiveElement.value = this.respectiveElement.defaultValue;
|
|
570
|
-
this.respectiveElement.classList.remove('e-input');
|
|
571
|
-
this.removeAttributes(['aria-placeholder', 'aria-disabled', 'aria-readonly', 'aria-labelledby']);
|
|
572
|
-
if (!isNullOrUndefined(this.textboxWrapper)) {
|
|
573
|
-
this.textboxWrapper.container.insertAdjacentElement('afterend', this.respectiveElement);
|
|
574
|
-
detach(this.textboxWrapper.container);
|
|
575
|
-
}
|
|
576
|
-
this.textboxWrapper = null;
|
|
577
|
-
_super.prototype.destroy.call(this);
|
|
546
|
+
if (this.element.tagName === 'INPUT' && this.multiline) {
|
|
547
|
+
detach(this.textboxWrapper.container.getElementsByTagName('textarea')[0]);
|
|
548
|
+
this.respectiveElement = this.element;
|
|
549
|
+
this.element.removeAttribute('type');
|
|
578
550
|
}
|
|
579
|
-
|
|
580
|
-
|
|
551
|
+
this.respectiveElement.value = this.respectiveElement.defaultValue;
|
|
552
|
+
this.respectiveElement.classList.remove('e-input');
|
|
553
|
+
this.removeAttributes(['aria-placeholder', 'aria-disabled', 'aria-readonly', 'aria-labelledby']);
|
|
554
|
+
if (!isNullOrUndefined(this.textboxWrapper)) {
|
|
555
|
+
this.textboxWrapper.container.insertAdjacentElement('afterend', this.respectiveElement);
|
|
556
|
+
detach(this.textboxWrapper.container);
|
|
581
557
|
}
|
|
558
|
+
this.textboxWrapper = null;
|
|
559
|
+
_super.prototype.destroy.call(this);
|
|
582
560
|
};
|
|
583
561
|
/**
|
|
584
562
|
* Adding the icons to the TextBox component.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Property, Event, EmitType, EventHandler, L10n, compile, isNullOrUndefined} from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, detach, append, Animation } from '@syncfusion/ej2-base';import { addClass, removeClass, KeyboardEvents, KeyboardEventArgs, setValue, getValue, ChildProperty } from '@syncfusion/ej2-base';import { Collection, Complex, Browser, Ajax, BeforeSendEventArgs, getUniqueID, closest, remove } from '@syncfusion/ej2-base';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import {
|
|
1
|
+
import { Component, Property, Event, EmitType, EventHandler, L10n, compile, isNullOrUndefined} from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, detach, append, Animation } from '@syncfusion/ej2-base';import { addClass, removeClass, KeyboardEvents, KeyboardEventArgs, setValue, getValue, ChildProperty } from '@syncfusion/ej2-base';import { Collection, Complex, Browser, Ajax, BeforeSendEventArgs, getUniqueID, closest, remove } from '@syncfusion/ej2-base';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { select, selectAll } from '@syncfusion/ej2-base';
|
|
2
2
|
import {DropEffect,ActionCompleteEventArgs,RenderingEventArgs,BeforeUploadEventArgs,FileListRenderingEventArgs,SelectedEventArgs,UploadingEventArgs,RemovingEventArgs,BeforeRemoveEventArgs,ClearingEventArgs,CancelEventArgs,PauseResumeEventArgs} from "./uploader";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
|
@@ -270,7 +270,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
270
270
|
* Triggers when the component is created.
|
|
271
271
|
*
|
|
272
272
|
* @event created
|
|
273
|
-
* @blazorProperty 'Created'
|
|
274
273
|
*/
|
|
275
274
|
created?: EmitType<Object>;
|
|
276
275
|
|
|
@@ -278,7 +277,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
278
277
|
* Triggers after all the selected files has processed to upload successfully or failed to server.
|
|
279
278
|
*
|
|
280
279
|
* @event actionComplete
|
|
281
|
-
* @blazorProperty 'OnActionComplete'
|
|
282
280
|
*/
|
|
283
281
|
actionComplete?: EmitType<ActionCompleteEventArgs>;
|
|
284
282
|
|
|
@@ -294,7 +292,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
294
292
|
* Triggers when the upload process before. This event is used to add additional parameter with upload request.
|
|
295
293
|
*
|
|
296
294
|
* @event beforeUpload
|
|
297
|
-
* @blazorProperty 'BeforeUpload'
|
|
298
295
|
*/
|
|
299
296
|
beforeUpload?: EmitType<BeforeUploadEventArgs>;
|
|
300
297
|
|
|
@@ -303,7 +300,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
303
300
|
* It helps to customize specific file item structure.
|
|
304
301
|
*
|
|
305
302
|
* @event fileListRendering
|
|
306
|
-
* @blazorProperty 'OnFileListRender'
|
|
307
303
|
*/
|
|
308
304
|
fileListRendering?: EmitType<FileListRenderingEventArgs>;
|
|
309
305
|
|
|
@@ -311,7 +307,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
311
307
|
* Triggers after selecting or dropping the files by adding the files in upload queue.
|
|
312
308
|
*
|
|
313
309
|
* @event selected
|
|
314
|
-
* @blazorProperty 'FileSelected'
|
|
315
310
|
*/
|
|
316
311
|
selected?: EmitType<SelectedEventArgs>;
|
|
317
312
|
|
|
@@ -319,7 +314,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
319
314
|
* Triggers when the upload process gets started. This event is used to add additional parameter with upload request.
|
|
320
315
|
*
|
|
321
316
|
* @event uploading
|
|
322
|
-
* @blazorProperty 'OnUploadStart'
|
|
323
317
|
*/
|
|
324
318
|
uploading?: EmitType<UploadingEventArgs>;
|
|
325
319
|
|
|
@@ -350,8 +344,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
350
344
|
* </table>
|
|
351
345
|
*
|
|
352
346
|
* @event success
|
|
353
|
-
* @blazorProperty 'Success'
|
|
354
|
-
* @blazorType SuccessEventArgs
|
|
355
347
|
*/
|
|
356
348
|
success?: EmitType<Object>;
|
|
357
349
|
|
|
@@ -382,8 +374,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
382
374
|
* </table>
|
|
383
375
|
*
|
|
384
376
|
* @event failure
|
|
385
|
-
* @blazorProperty 'OnFailured'
|
|
386
|
-
* @blazorType FailureEventArgs
|
|
387
377
|
*/
|
|
388
378
|
failure?: EmitType<Object>;
|
|
389
379
|
|
|
@@ -391,7 +381,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
391
381
|
* Triggers on removing the uploaded file. The event used to get confirm before removing the file from server.
|
|
392
382
|
*
|
|
393
383
|
* @event removing
|
|
394
|
-
* @blazorProperty 'OnRemove'
|
|
395
384
|
*/
|
|
396
385
|
removing?: EmitType<RemovingEventArgs>;
|
|
397
386
|
|
|
@@ -399,7 +388,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
399
388
|
* Triggers on remove the uploaded file. The event used to get confirm before remove the file from server.
|
|
400
389
|
*
|
|
401
390
|
* @event beforeRemove
|
|
402
|
-
* @blazorProperty 'BeforeRemove'
|
|
403
391
|
*/
|
|
404
392
|
beforeRemove?: EmitType<BeforeRemoveEventArgs>;
|
|
405
393
|
|
|
@@ -407,7 +395,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
407
395
|
* Triggers before clearing the items in file list when clicking “clear”.
|
|
408
396
|
*
|
|
409
397
|
* @event clearing
|
|
410
|
-
* @blazorProperty 'OnClear'
|
|
411
398
|
*/
|
|
412
399
|
clearing?: EmitType<ClearingEventArgs>;
|
|
413
400
|
|
|
@@ -434,8 +421,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
434
421
|
* </table>
|
|
435
422
|
*
|
|
436
423
|
* @event progress
|
|
437
|
-
* @blazorProperty 'Progressing'
|
|
438
|
-
* @blazorType ProgressEventArgs
|
|
439
424
|
*/
|
|
440
425
|
progress?: EmitType<Object>;
|
|
441
426
|
|
|
@@ -458,8 +443,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
458
443
|
* </table>
|
|
459
444
|
*
|
|
460
445
|
* @event change
|
|
461
|
-
* @blazorProperty 'ValueChange'
|
|
462
|
-
* @blazorType UploadChangeEventArgs
|
|
463
446
|
*/
|
|
464
447
|
change?: EmitType<Object>;
|
|
465
448
|
|
|
@@ -490,8 +473,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
490
473
|
* </table>
|
|
491
474
|
*
|
|
492
475
|
* @event chunkSuccess
|
|
493
|
-
* @blazorProperty 'OnChunkSuccess'
|
|
494
|
-
* @blazorType SuccessEventArgs
|
|
495
476
|
*/
|
|
496
477
|
chunkSuccess?: EmitType<Object>;
|
|
497
478
|
|
|
@@ -530,8 +511,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
530
511
|
* </table>
|
|
531
512
|
*
|
|
532
513
|
* @event chunkFailure
|
|
533
|
-
* @blazorProperty 'OnChunkFailured'
|
|
534
|
-
* @blazorType FailureEventArgs
|
|
535
514
|
*/
|
|
536
515
|
chunkFailure?: EmitType<Object>;
|
|
537
516
|
|
|
@@ -539,7 +518,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
539
518
|
* Fires when every chunk upload process gets started. This event is used to add additional parameter with upload request.
|
|
540
519
|
*
|
|
541
520
|
* @event chunkUploading
|
|
542
|
-
* @blazorProperty 'OnChunkUploadStart'
|
|
543
521
|
*/
|
|
544
522
|
chunkUploading?: EmitType<UploadingEventArgs>;
|
|
545
523
|
|
|
@@ -547,7 +525,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
547
525
|
* Fires if cancel the chunk file uploading.
|
|
548
526
|
*
|
|
549
527
|
* @event canceling
|
|
550
|
-
* @blazorProperty 'OnCancel'
|
|
551
528
|
*/
|
|
552
529
|
canceling?: EmitType<CancelEventArgs>;
|
|
553
530
|
|
|
@@ -555,7 +532,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
555
532
|
* Fires if pause the chunk file uploading.
|
|
556
533
|
*
|
|
557
534
|
* @event pausing
|
|
558
|
-
* @blazorProperty 'Paused'
|
|
559
535
|
*/
|
|
560
536
|
pausing?: EmitType<PauseResumeEventArgs>;
|
|
561
537
|
|
|
@@ -563,7 +539,6 @@ export interface UploaderModel extends ComponentModel{
|
|
|
563
539
|
* Fires if resume the paused chunk file upload.
|
|
564
540
|
*
|
|
565
541
|
* @event resuming
|
|
566
|
-
* @blazorProperty 'OnResume'
|
|
567
542
|
*/
|
|
568
543
|
resuming?: EmitType<PauseResumeEventArgs>;
|
|
569
544
|
|