@syncfusion/ej2-inputs 21.2.8 → 22.1.34
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 -0
- package/CHANGELOG.md +37 -0
- 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 +144 -96
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +146 -99
- 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 +9 -9
- package/src/color-picker/color-picker.d.ts +1 -0
- package/src/color-picker/color-picker.js +5 -1
- package/src/form-validator/form-validator.js +21 -3
- package/src/input/input.js +16 -10
- package/src/numerictextbox/numerictextbox.js +6 -2
- package/src/rating/rating-model.d.ts +31 -27
- package/src/rating/rating.d.ts +8 -4
- package/src/rating/rating.js +26 -19
- package/src/slider/slider.d.ts +31 -65
- package/src/slider/slider.js +69 -50
- package/src/textbox/textbox.js +3 -5
- package/src/uploader/uploader-model.d.ts +2 -1
- package/src/uploader/uploader.d.ts +2 -1
- package/src/uploader/uploader.js +2 -10
- package/styles/bootstrap-dark.css +22 -3
- package/styles/bootstrap.css +22 -3
- package/styles/bootstrap4.css +22 -4
- package/styles/bootstrap5-dark.css +22 -3
- package/styles/bootstrap5.css +22 -3
- package/styles/color-picker/_layout.scss +49 -5
- package/styles/color-picker/_material3-dark-definition.scss +1 -0
- package/styles/color-picker/_material3-definition.scss +141 -0
- package/styles/color-picker/_theme.scss +6 -1
- package/styles/color-picker/fluent-dark.css +1 -0
- package/styles/color-picker/fluent.css +1 -0
- package/styles/color-picker/icons/_material3-dark.scss +1 -0
- package/styles/color-picker/material3-dark.css +880 -0
- package/styles/color-picker/material3-dark.scss +12 -0
- package/styles/color-picker/material3.css +936 -0
- package/styles/color-picker/material3.scss +12 -0
- package/styles/fabric-dark.css +22 -3
- package/styles/fabric.css +22 -3
- package/styles/fluent-dark.css +23 -3
- package/styles/fluent.css +23 -3
- package/styles/highcontrast-light.css +22 -3
- package/styles/highcontrast.css +22 -3
- package/styles/input/_layout.scss +268 -107
- package/styles/input/_material3-dark-definition.scss +1 -0
- package/styles/input/_material3-definition.scss +548 -0
- package/styles/input/_theme.scss +3 -2
- package/styles/input/bootstrap-dark.css +14 -1
- package/styles/input/bootstrap.css +14 -1
- package/styles/input/bootstrap4.css +14 -1
- package/styles/input/bootstrap5-dark.css +14 -1
- package/styles/input/bootstrap5.css +14 -1
- package/styles/input/fabric-dark.css +14 -1
- package/styles/input/fabric.css +14 -1
- package/styles/input/fluent-dark.css +14 -1
- package/styles/input/fluent.css +14 -1
- package/styles/input/highcontrast-light.css +14 -1
- package/styles/input/highcontrast.css +14 -1
- package/styles/input/icons/_material3-dark.scss +1 -0
- package/styles/input/material-dark.css +92 -64
- package/styles/input/material.css +92 -64
- package/styles/input/material3-dark.css +12357 -0
- package/styles/input/material3-dark.scss +5 -0
- package/styles/input/material3.css +12413 -0
- package/styles/input/material3.scss +5 -0
- package/styles/input/tailwind-dark.css +14 -1
- package/styles/input/tailwind.css +14 -1
- package/styles/maskedtextbox/_material3-dark-definition.scss +1 -0
- package/styles/maskedtextbox/_material3-definition.scss +4 -0
- package/styles/maskedtextbox/material3-dark.css +104 -0
- package/styles/maskedtextbox/material3-dark.scss +5 -0
- package/styles/maskedtextbox/material3.css +160 -0
- package/styles/maskedtextbox/material3.scss +5 -0
- package/styles/material-dark.css +102 -66
- package/styles/material.css +102 -66
- package/styles/material3-dark.css +15119 -0
- package/styles/material3-dark.scss +11 -0
- package/styles/material3.css +15175 -0
- package/styles/material3.scss +11 -0
- package/styles/numerictextbox/_material3-dark-definition.scss +1 -0
- package/styles/numerictextbox/_material3-definition.scss +4 -0
- package/styles/numerictextbox/icons/_material3-dark.scss +1 -0
- package/styles/numerictextbox/material3-dark.css +118 -0
- package/styles/numerictextbox/material3-dark.scss +6 -0
- package/styles/numerictextbox/material3.css +174 -0
- package/styles/numerictextbox/material3.scss +6 -0
- package/styles/rating/_bootstrap-dark-definition.scss +4 -3
- package/styles/rating/_bootstrap-definition.scss +4 -3
- package/styles/rating/_bootstrap4-definition.scss +4 -3
- package/styles/rating/_bootstrap5-definition.scss +4 -0
- package/styles/rating/_fabric-dark-definition.scss +4 -3
- package/styles/rating/_fabric-definition.scss +4 -3
- package/styles/rating/_fluent-definition.scss +4 -0
- package/styles/rating/_fusionnew-definition.scss +4 -3
- package/styles/rating/_highcontrast-definition.scss +4 -3
- package/styles/rating/_highcontrast-light-definition.scss +4 -3
- package/styles/rating/_layout.scss +2 -0
- package/styles/rating/_material-dark-definition.scss +4 -3
- package/styles/rating/_material-definition.scss +4 -3
- package/styles/rating/_material3-dark-definition.scss +1 -0
- package/styles/rating/_material3-definition.scss +47 -0
- package/styles/rating/_tailwind-definition.scss +4 -0
- package/styles/rating/_theme.scss +36 -14
- package/styles/rating/bootstrap-dark.css +8 -2
- package/styles/rating/bootstrap.css +8 -2
- package/styles/rating/bootstrap4.css +8 -3
- package/styles/rating/bootstrap5-dark.css +8 -2
- package/styles/rating/bootstrap5.css +8 -2
- package/styles/rating/fabric-dark.css +8 -2
- package/styles/rating/fabric.css +8 -2
- package/styles/rating/fluent-dark.css +8 -2
- package/styles/rating/fluent.css +8 -2
- package/styles/rating/highcontrast-light.css +8 -2
- package/styles/rating/highcontrast.css +8 -2
- package/styles/rating/material-dark.css +8 -2
- package/styles/rating/material.css +8 -2
- package/styles/rating/material3-dark.css +340 -0
- package/styles/rating/material3-dark.scss +5 -0
- package/styles/rating/material3.css +396 -0
- package/styles/rating/material3.scss +5 -0
- package/styles/rating/tailwind-dark.css +8 -2
- package/styles/rating/tailwind.css +8 -2
- package/styles/signature/_material3-dark-definition.scss +1 -0
- package/styles/signature/_material3-definition.scss +3 -0
- package/styles/signature/material3-dark.css +65 -0
- package/styles/signature/material3-dark.scss +4 -0
- package/styles/signature/material3.css +121 -0
- package/styles/signature/material3.scss +4 -0
- package/styles/slider/_layout.scss +60 -15
- package/styles/slider/_material3-dark-definition.scss +1 -0
- package/styles/slider/_material3-definition.scss +97 -0
- package/styles/slider/_theme.scss +11 -2
- package/styles/slider/material-dark.css +2 -0
- package/styles/slider/material.css +2 -0
- package/styles/slider/material3-dark.css +765 -0
- package/styles/slider/material3-dark.scss +6 -0
- package/styles/slider/material3.css +821 -0
- package/styles/slider/material3.scss +6 -0
- package/styles/tailwind-dark.css +22 -3
- package/styles/tailwind.css +22 -3
- package/styles/textbox/_bootstrap-dark-definition.scss +3 -0
- package/styles/textbox/_bootstrap-definition.scss +3 -0
- package/styles/textbox/_bootstrap4-definition.scss +3 -0
- package/styles/textbox/_bootstrap5-definition.scss +3 -0
- package/styles/textbox/_fabric-dark-definition.scss +3 -0
- package/styles/textbox/_fabric-definition.scss +3 -0
- package/styles/textbox/_fluent-definition.scss +3 -0
- package/styles/textbox/_fusionnew-definition.scss +3 -0
- package/styles/textbox/_highcontrast-definition.scss +3 -0
- package/styles/textbox/_highcontrast-light-definition.scss +3 -0
- package/styles/textbox/_layout.scss +27 -0
- package/styles/textbox/_material-dark-definition.scss +3 -0
- package/styles/textbox/_material-definition.scss +3 -0
- package/styles/textbox/_material3-dark-definition.scss +1 -0
- package/styles/textbox/_material3-definition.scss +4 -0
- package/styles/textbox/_tailwind-definition.scss +3 -0
- package/styles/textbox/material3-dark.css +72 -0
- package/styles/textbox/material3-dark.scss +5 -0
- package/styles/textbox/material3.css +128 -0
- package/styles/textbox/material3.scss +5 -0
- package/styles/uploader/_material3-dark-definition.scss +1 -0
- package/styles/uploader/_material3-definition.scss +215 -0
- package/styles/uploader/icons/_material3-dark.scss +1 -0
- package/styles/uploader/material3-dark.css +861 -0
- package/styles/uploader/material3-dark.scss +7 -0
- package/styles/uploader/material3.css +917 -0
- package/styles/uploader/material3.scss +7 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ajax, Animation, Base, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, attributes, classList, closest, compile, createElement, detach, extend, formatUnit, getInstance, getNumericObject, getUniqueID, getValue, isNullOrUndefined, merge, onIntlChange, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Ajax, Animation, Base, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, attributes, classList, closest, compile, createElement, detach, extend, formatUnit, getInstance, getNumericObject, getUniqueID, getValue, initializeCSPTemplate, isNullOrUndefined, merge, onIntlChange, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Popup, Tooltip, createSpinner, getZindexPartial, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
|
3
3
|
import { Deferred, SplitButton, getModel } from '@syncfusion/ej2-splitbuttons';
|
|
4
4
|
|
|
@@ -52,14 +52,14 @@ var Input;
|
|
|
52
52
|
}
|
|
53
53
|
bindInitialEvent(args);
|
|
54
54
|
if (!isNullOrUndefined(args.properties) && !isNullOrUndefined(args.properties.showClearButton) &&
|
|
55
|
-
args.properties.showClearButton
|
|
55
|
+
args.properties.showClearButton) {
|
|
56
56
|
setClearButton(args.properties.showClearButton, args.element, inputObject, true, makeElement);
|
|
57
57
|
inputObject.clearButton.setAttribute('role', 'button');
|
|
58
58
|
if (inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT)) {
|
|
59
59
|
addClass([inputObject.container], CLASSNAMES.INPUTGROUP);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
if (!isNullOrUndefined(args.buttons)
|
|
62
|
+
if (!isNullOrUndefined(args.buttons)) {
|
|
63
63
|
for (let i = 0; i < args.buttons.length; i++) {
|
|
64
64
|
inputObject.buttons.push(appendSpan(args.buttons[i], inputObject.container, makeElement));
|
|
65
65
|
}
|
|
@@ -82,9 +82,11 @@ var Input;
|
|
|
82
82
|
|| parent.classList.contains('e-filled')) {
|
|
83
83
|
parent.classList.add('e-input-focus');
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
if (args.floatLabelType === 'Auto') {
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
Input.calculateWidth(args.element, parent);
|
|
88
|
+
}, 80);
|
|
89
|
+
}
|
|
88
90
|
});
|
|
89
91
|
args.element.addEventListener('blur', function () {
|
|
90
92
|
const parent = getParentNode(this);
|
|
@@ -92,9 +94,11 @@ var Input;
|
|
|
92
94
|
|| parent.classList.contains('e-filled')) {
|
|
93
95
|
parent.classList.remove('e-input-focus');
|
|
94
96
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
if (args.floatLabelType === 'Auto' && args.element.value === '') {
|
|
98
|
+
setTimeout(() => {
|
|
99
|
+
Input.calculateWidth(args.element, parent);
|
|
100
|
+
}, 80);
|
|
101
|
+
}
|
|
98
102
|
});
|
|
99
103
|
args.element.addEventListener('input', () => {
|
|
100
104
|
checkInputValue(floatType, args.element);
|
|
@@ -298,7 +302,7 @@ var Input;
|
|
|
298
302
|
}
|
|
299
303
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
300
304
|
function wireClearBtnEvents(element, button, container) {
|
|
301
|
-
if (
|
|
305
|
+
if (isBindClearAction === undefined || isBindClearAction) {
|
|
302
306
|
button.addEventListener('click', (event) => {
|
|
303
307
|
if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
|
|
304
308
|
event.preventDefault();
|
|
@@ -379,7 +383,9 @@ var Input;
|
|
|
379
383
|
*/
|
|
380
384
|
function setValue$$1(value, element, floatLabelType, clearButton) {
|
|
381
385
|
element.value = value;
|
|
382
|
-
|
|
386
|
+
if (floatLabelType === 'Auto' && value === '') {
|
|
387
|
+
calculateWidth(element, element.parentElement);
|
|
388
|
+
}
|
|
383
389
|
if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
|
|
384
390
|
validateLabel(element, floatLabelType);
|
|
385
391
|
}
|
|
@@ -1928,8 +1934,12 @@ let NumericTextBox = class NumericTextBox extends Component {
|
|
|
1928
1934
|
event.stopPropagation();
|
|
1929
1935
|
clearInterval(this.timeOut);
|
|
1930
1936
|
this.isCalled = false;
|
|
1931
|
-
|
|
1932
|
-
|
|
1937
|
+
if (this.spinUp) {
|
|
1938
|
+
EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
|
|
1939
|
+
}
|
|
1940
|
+
if (this.spinDown) {
|
|
1941
|
+
EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
|
|
1942
|
+
}
|
|
1933
1943
|
}
|
|
1934
1944
|
/**
|
|
1935
1945
|
* Increments the NumericTextBox value with the specified step value.
|
|
@@ -4303,13 +4313,15 @@ let Slider = class Slider extends Component {
|
|
|
4303
4313
|
getThemeInitialization() {
|
|
4304
4314
|
this.isMaterial = this.getTheme(this.sliderContainer) === 'material'
|
|
4305
4315
|
|| this.getTheme(this.sliderContainer) === 'material-dark';
|
|
4316
|
+
this.isMaterial3 = this.getTheme(this.sliderContainer) === 'Material3'
|
|
4317
|
+
|| this.getTheme(this.sliderContainer) === 'Material3-dark';
|
|
4306
4318
|
this.isBootstrap = this.getTheme(this.sliderContainer) === 'bootstrap'
|
|
4307
4319
|
|| this.getTheme(this.sliderContainer) === 'bootstrap-dark';
|
|
4308
4320
|
this.isBootstrap4 = this.getTheme(this.sliderContainer) === 'bootstrap4';
|
|
4309
4321
|
this.isTailwind = this.getTheme(this.sliderContainer) === 'tailwind' || this.getTheme(this.sliderContainer) === 'tailwind-dark';
|
|
4310
4322
|
this.isBootstrap5 = this.getTheme(this.sliderContainer) === 'bootstrap5';
|
|
4311
4323
|
this.isFluent = this.getTheme(this.sliderContainer) === 'FluentUI';
|
|
4312
|
-
this.isMaterialTooltip = this.isMaterial && this.type !== 'Range' && this.tooltip.isVisible;
|
|
4324
|
+
this.isMaterialTooltip = (this.isMaterial || this.isMaterial3) && this.type !== 'Range' && this.tooltip.isVisible;
|
|
4313
4325
|
}
|
|
4314
4326
|
createRangeBar() {
|
|
4315
4327
|
if (this.type !== 'Default') {
|
|
@@ -4462,7 +4474,7 @@ let Slider = class Slider extends Component {
|
|
|
4462
4474
|
if (this.type !== 'Default') {
|
|
4463
4475
|
this.rangeBar.style.transition = 'none';
|
|
4464
4476
|
}
|
|
4465
|
-
if (this.isMaterial && this.tooltip.isVisible && this.type === 'Default') {
|
|
4477
|
+
if ((this.isMaterial || this.isMaterial3) && this.tooltip.isVisible && this.type === 'Default') {
|
|
4466
4478
|
this.tooltipElement.style.transition = this.transition.handle;
|
|
4467
4479
|
}
|
|
4468
4480
|
this.tooltipToggle(this.getHandle());
|
|
@@ -4509,9 +4521,6 @@ let Slider = class Slider extends Component {
|
|
|
4509
4521
|
}
|
|
4510
4522
|
}
|
|
4511
4523
|
setHandler() {
|
|
4512
|
-
if (this.min > this.max) {
|
|
4513
|
-
this.min = this.max;
|
|
4514
|
-
}
|
|
4515
4524
|
this.createFirstHandle();
|
|
4516
4525
|
if (this.type === 'Range') {
|
|
4517
4526
|
this.createSecondHandle();
|
|
@@ -4661,7 +4670,7 @@ let Slider = class Slider extends Component {
|
|
|
4661
4670
|
}
|
|
4662
4671
|
}
|
|
4663
4672
|
tooltipCollision(position) {
|
|
4664
|
-
if (this.isBootstrap || this.isBootstrap4 || (this.isMaterial && !this.isMaterialTooltip)) {
|
|
4673
|
+
if (this.isBootstrap || this.isBootstrap4 || ((this.isMaterial || this.isMaterial3) && !this.isMaterialTooltip)) {
|
|
4665
4674
|
const tooltipOffsetValue = this.isBootstrap4 ? bootstrap4TooltipOffset : bootstrapTooltipOffset;
|
|
4666
4675
|
switch (position) {
|
|
4667
4676
|
case 'TopCenter':
|
|
@@ -4799,9 +4808,9 @@ let Slider = class Slider extends Component {
|
|
|
4799
4808
|
}
|
|
4800
4809
|
renderTooltip() {
|
|
4801
4810
|
this.tooltipObj = new Tooltip({
|
|
4802
|
-
showTipPointer: this.isBootstrap || this.isMaterial || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
|
|
4811
|
+
showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
|
|
4803
4812
|
cssClass: classNames.sliderTooltip,
|
|
4804
|
-
height: this.isMaterial ? 30 : 'auto',
|
|
4813
|
+
height: (this.isMaterial || this.isMaterial3) ? 30 : 'auto',
|
|
4805
4814
|
animation: { open: { effect: 'None' }, close: { effect: 'FadeOut', duration: 500 } },
|
|
4806
4815
|
opensOn: 'Custom',
|
|
4807
4816
|
beforeOpen: this.tooltipBeforeOpen.bind(this),
|
|
@@ -4861,7 +4870,7 @@ let Slider = class Slider extends Component {
|
|
|
4861
4870
|
attributes(enabledRTL ? this.firstBtn : this.secondBtn, { 'aria-label': incrementTitle, title: incrementTitle });
|
|
4862
4871
|
}
|
|
4863
4872
|
buttonFocusOut() {
|
|
4864
|
-
if (this.isMaterial) {
|
|
4873
|
+
if (this.isMaterial || this.isMaterial3) {
|
|
4865
4874
|
this.getHandle().classList.remove('e-large-thumb-size');
|
|
4866
4875
|
}
|
|
4867
4876
|
}
|
|
@@ -5038,7 +5047,12 @@ let Slider = class Slider extends Component {
|
|
|
5038
5047
|
start = this.makeRoundNumber(start + smallStep, decimalPoints);
|
|
5039
5048
|
}
|
|
5040
5049
|
else {
|
|
5041
|
-
|
|
5050
|
+
if (this.min > this.max) {
|
|
5051
|
+
start = this.makeRoundNumber(start + smallStep, decimalPoints);
|
|
5052
|
+
}
|
|
5053
|
+
else {
|
|
5054
|
+
start = this.makeRoundNumber(start - smallStep, decimalPoints);
|
|
5055
|
+
}
|
|
5042
5056
|
}
|
|
5043
5057
|
left = this.makeRoundNumber(left + smallStep, decimalPoints);
|
|
5044
5058
|
}
|
|
@@ -5279,16 +5293,16 @@ let Slider = class Slider extends Component {
|
|
|
5279
5293
|
(value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false));
|
|
5280
5294
|
}
|
|
5281
5295
|
else if ((args.keyCode === 36)) {
|
|
5282
|
-
value = parseFloat(this.min.toString());
|
|
5296
|
+
value = parseFloat(this.min < this.max ? this.min.toString() : this.max.toString());
|
|
5283
5297
|
}
|
|
5284
5298
|
else if ((args.keyCode === 35)) {
|
|
5285
|
-
value = parseFloat(this.max.toString());
|
|
5299
|
+
value = parseFloat(this.min < this.max ? this.max.toString() : this.min.toString());
|
|
5286
5300
|
}
|
|
5287
5301
|
if (this.limits.enabled) {
|
|
5288
5302
|
value = this.getLimitCorrectedValues(value);
|
|
5289
5303
|
}
|
|
5290
5304
|
this.changeHandleValue(value);
|
|
5291
|
-
if (this.isMaterial && !this.tooltip.isVisible &&
|
|
5305
|
+
if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
|
|
5292
5306
|
!this.getHandle().classList.contains(classNames.sliderTabHandle)) {
|
|
5293
5307
|
this.materialChange();
|
|
5294
5308
|
}
|
|
@@ -5337,12 +5351,12 @@ let Slider = class Slider extends Component {
|
|
|
5337
5351
|
}
|
|
5338
5352
|
else {
|
|
5339
5353
|
if (this.type === 'MinRange') {
|
|
5340
|
-
this.rangeBar.style.bottom = '0px';
|
|
5341
|
-
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
|
|
5354
|
+
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
|
|
5355
|
+
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
|
|
5342
5356
|
}
|
|
5343
5357
|
else {
|
|
5344
|
-
this.rangeBar.style.bottom = this.handlePos1 + 'px';
|
|
5345
|
-
setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
|
|
5358
|
+
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
|
|
5359
|
+
setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
|
|
5346
5360
|
}
|
|
5347
5361
|
}
|
|
5348
5362
|
}
|
|
@@ -5363,8 +5377,8 @@ let Slider = class Slider extends Component {
|
|
|
5363
5377
|
}
|
|
5364
5378
|
}
|
|
5365
5379
|
else {
|
|
5366
|
-
this.limitBarFirst.style.bottom = fromMinPostion + 'px';
|
|
5367
|
-
this.limitBarFirst.style.height = (fromMaxpostion - fromMinPostion) + 'px';
|
|
5380
|
+
this.limitBarFirst.style.bottom = (this.min < this.max ? fromMinPostion : fromMaxpostion) + 'px';
|
|
5381
|
+
this.limitBarFirst.style.height = (this.min < this.max ? (fromMaxpostion - fromMinPostion) : (fromMinPostion - fromMaxpostion)) + 'px';
|
|
5368
5382
|
}
|
|
5369
5383
|
if (this.type === 'Range') {
|
|
5370
5384
|
if (this.orientation === 'Horizontal') {
|
|
@@ -5378,8 +5392,8 @@ let Slider = class Slider extends Component {
|
|
|
5378
5392
|
}
|
|
5379
5393
|
}
|
|
5380
5394
|
else {
|
|
5381
|
-
this.limitBarSecond.style.bottom = toMinPostion + 'px';
|
|
5382
|
-
this.limitBarSecond.style.height = (toMaxpostion - toMinPostion) + 'px';
|
|
5395
|
+
this.limitBarSecond.style.bottom = (this.min < this.max ? toMinPostion : toMaxpostion) + 'px';
|
|
5396
|
+
this.limitBarSecond.style.height = (this.min < this.max ? (toMaxpostion - toMinPostion) : (toMinPostion - toMaxpostion)) + 'px';
|
|
5383
5397
|
}
|
|
5384
5398
|
}
|
|
5385
5399
|
}
|
|
@@ -5405,13 +5419,13 @@ let Slider = class Slider extends Component {
|
|
|
5405
5419
|
}
|
|
5406
5420
|
getLimitValueAndPosition(currentValue, minValue, maxValue, limitBar) {
|
|
5407
5421
|
if (isNullOrUndefined(minValue)) {
|
|
5408
|
-
minValue = this.min;
|
|
5422
|
+
minValue = this.min < this.max ? this.min : this.max;
|
|
5409
5423
|
if (isNullOrUndefined(currentValue) && limitBar) {
|
|
5410
5424
|
currentValue = minValue;
|
|
5411
5425
|
}
|
|
5412
5426
|
}
|
|
5413
5427
|
if (isNullOrUndefined(maxValue)) {
|
|
5414
|
-
maxValue = this.max;
|
|
5428
|
+
maxValue = this.min < this.max ? this.max : this.min;
|
|
5415
5429
|
if (isNullOrUndefined(currentValue) && limitBar) {
|
|
5416
5430
|
currentValue = maxValue;
|
|
5417
5431
|
}
|
|
@@ -5593,10 +5607,14 @@ let Slider = class Slider extends Component {
|
|
|
5593
5607
|
}
|
|
5594
5608
|
this.handlePos1 = this.checkHandlePosition(this.handleVal1);
|
|
5595
5609
|
this.handlePos2 = this.checkHandlePosition(this.handleVal2);
|
|
5596
|
-
if (this.handlePos1 > this.handlePos2) {
|
|
5610
|
+
if (this.min < this.max && this.handlePos1 > this.handlePos2) {
|
|
5597
5611
|
this.handlePos1 = this.handlePos2;
|
|
5598
5612
|
this.handleVal1 = this.handleVal2;
|
|
5599
5613
|
}
|
|
5614
|
+
if (this.min > this.max && this.handlePos1 < this.handlePos2) {
|
|
5615
|
+
this.handlePos2 = this.handlePos1;
|
|
5616
|
+
this.handleVal2 = this.handleVal1;
|
|
5617
|
+
}
|
|
5600
5618
|
this.preHandlePos1 = this.handlePos1;
|
|
5601
5619
|
this.preHandlePos2 = this.handlePos2;
|
|
5602
5620
|
if (this.limits.enabled) {
|
|
@@ -5633,9 +5651,6 @@ let Slider = class Slider extends Component {
|
|
|
5633
5651
|
return pos;
|
|
5634
5652
|
}
|
|
5635
5653
|
checkHandleValue(value) {
|
|
5636
|
-
if (this.min > this.max) {
|
|
5637
|
-
this.min = this.max;
|
|
5638
|
-
}
|
|
5639
5654
|
if (this.min === this.max) {
|
|
5640
5655
|
return (parseFloat(formatUnit(this.max)));
|
|
5641
5656
|
}
|
|
@@ -5695,13 +5710,13 @@ let Slider = class Slider extends Component {
|
|
|
5695
5710
|
this.materialHandle.style.bottom = `${this.handlePos1}px`;
|
|
5696
5711
|
}
|
|
5697
5712
|
if (this.type === 'MinRange') {
|
|
5698
|
-
this.rangeBar.style.bottom = '0px';
|
|
5699
|
-
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
|
|
5713
|
+
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
|
|
5714
|
+
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
|
|
5700
5715
|
}
|
|
5701
5716
|
else if (this.type === 'Range') {
|
|
5702
5717
|
this.secondHandle.style.bottom = `${this.handlePos2}px`;
|
|
5703
|
-
this.rangeBar.style.bottom = this.handlePos1 + 'px';
|
|
5704
|
-
setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
|
|
5718
|
+
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
|
|
5719
|
+
setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
|
|
5705
5720
|
}
|
|
5706
5721
|
}
|
|
5707
5722
|
if (this.limits.enabled) {
|
|
@@ -5730,7 +5745,7 @@ let Slider = class Slider extends Component {
|
|
|
5730
5745
|
if (!(this.limits.enabled && this.limits.startHandleFixed)) {
|
|
5731
5746
|
this.handleVal1 = this.checkHandleValue(value);
|
|
5732
5747
|
this.handlePos1 = this.checkHandlePosition(this.handleVal1);
|
|
5733
|
-
if (this.type === 'Range' && this.handlePos1 > this.handlePos2) {
|
|
5748
|
+
if (this.type === 'Range' && ((this.handlePos1 > this.handlePos2 && this.min < this.max) || (this.handlePos1 < this.handlePos2 && this.min > this.max))) {
|
|
5734
5749
|
this.handlePos1 = this.handlePos2;
|
|
5735
5750
|
this.handleVal1 = this.handleVal2;
|
|
5736
5751
|
}
|
|
@@ -5744,7 +5759,7 @@ let Slider = class Slider extends Component {
|
|
|
5744
5759
|
if (!(this.limits.enabled && this.limits.endHandleFixed)) {
|
|
5745
5760
|
this.handleVal2 = this.checkHandleValue(value);
|
|
5746
5761
|
this.handlePos2 = this.checkHandlePosition(this.handleVal2);
|
|
5747
|
-
if (this.type === 'Range' && this.handlePos2 < this.handlePos1) {
|
|
5762
|
+
if (this.type === 'Range' && ((this.handlePos2 < this.handlePos1 && this.min < this.max) || (this.handlePos2 > this.handlePos1 && this.min > this.max))) {
|
|
5748
5763
|
this.handlePos2 = this.handlePos1;
|
|
5749
5764
|
this.handleVal2 = this.handleVal1;
|
|
5750
5765
|
}
|
|
@@ -5862,7 +5877,7 @@ let Slider = class Slider extends Component {
|
|
|
5862
5877
|
}
|
|
5863
5878
|
let handlepos = this.xyToPosition(pos);
|
|
5864
5879
|
let handleVal = this.positionToValue(handlepos);
|
|
5865
|
-
if (this.type === 'Range' && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1)) {
|
|
5880
|
+
if (this.type === 'Range' && (this.min < (this.max) && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1) || (this.min > this.max) && (this.handlePos1 - handlepos) > (handlepos - this.handlePos2))) {
|
|
5866
5881
|
this.activeHandle = 2;
|
|
5867
5882
|
if (!(this.limits.enabled && this.limits.endHandleFixed)) {
|
|
5868
5883
|
if (this.limits.enabled) {
|
|
@@ -5906,7 +5921,7 @@ let Slider = class Slider extends Component {
|
|
|
5906
5921
|
behindElement = document.elementFromPoint(eventX, eventY);
|
|
5907
5922
|
}
|
|
5908
5923
|
if (evt.target === handle && behindElement != handle) {
|
|
5909
|
-
if (this.isMaterial && !this.tooltip.isVisible &&
|
|
5924
|
+
if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
|
|
5910
5925
|
!this.getHandle().classList.contains(classNames.sliderTabHandle)) {
|
|
5911
5926
|
this.materialChange();
|
|
5912
5927
|
}
|
|
@@ -5917,7 +5932,7 @@ let Slider = class Slider extends Component {
|
|
|
5917
5932
|
if (!this.checkRepeatedValue(handleVal)) {
|
|
5918
5933
|
return;
|
|
5919
5934
|
}
|
|
5920
|
-
let transition = this.isMaterial && this.tooltip.isVisible ?
|
|
5935
|
+
let transition = (this.isMaterial || this.isMaterial3) && this.tooltip.isVisible ?
|
|
5921
5936
|
this.transitionOnMaterialTooltip : this.transition;
|
|
5922
5937
|
this.getHandle().style.transition = transition.handle;
|
|
5923
5938
|
if (this.type !== 'Default') {
|
|
@@ -5968,16 +5983,28 @@ let Slider = class Slider extends Component {
|
|
|
5968
5983
|
else {
|
|
5969
5984
|
pos = { x: xPostion + this.secondPartRemain, y: yPostion + this.secondPartRemain };
|
|
5970
5985
|
}
|
|
5971
|
-
this.
|
|
5972
|
-
|
|
5986
|
+
if (this.min > this.max) {
|
|
5987
|
+
this.handlePos2 = this.xyToPosition(pos);
|
|
5988
|
+
this.handleVal2 = this.positionToValue(this.handlePos2);
|
|
5989
|
+
}
|
|
5990
|
+
else {
|
|
5991
|
+
this.handlePos1 = this.xyToPosition(pos);
|
|
5992
|
+
this.handleVal1 = this.positionToValue(this.handlePos1);
|
|
5993
|
+
}
|
|
5973
5994
|
if (!this.enableRtl) {
|
|
5974
5995
|
pos = { x: xPostion + this.secondPartRemain, y: yPostion - this.firstPartRemain };
|
|
5975
5996
|
}
|
|
5976
5997
|
else {
|
|
5977
5998
|
pos = { x: xPostion - this.firstPartRemain, y: yPostion - this.firstPartRemain };
|
|
5978
5999
|
}
|
|
5979
|
-
this.
|
|
5980
|
-
|
|
6000
|
+
if (this.min > this.max) {
|
|
6001
|
+
this.handlePos1 = this.xyToPosition(pos);
|
|
6002
|
+
this.handleVal1 = this.positionToValue(this.handlePos1);
|
|
6003
|
+
}
|
|
6004
|
+
else {
|
|
6005
|
+
this.handlePos2 = this.xyToPosition(pos);
|
|
6006
|
+
this.handleVal2 = this.positionToValue(this.handlePos2);
|
|
6007
|
+
}
|
|
5981
6008
|
if (this.limits.enabled) {
|
|
5982
6009
|
let value = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
|
|
5983
6010
|
this.handleVal1 = value[0];
|
|
@@ -5998,11 +6025,11 @@ let Slider = class Slider extends Component {
|
|
|
5998
6025
|
this.handleValueAdjust(this.handleVal2, this.limits.maxEnd, 2);
|
|
5999
6026
|
}
|
|
6000
6027
|
}
|
|
6001
|
-
if (this.handleVal2 === this.max) {
|
|
6002
|
-
this.handleValueAdjust(this.handleVal2, this.max, 2);
|
|
6028
|
+
if (this.handleVal2 === (this.min > this.max ? this.min : this.max)) {
|
|
6029
|
+
this.handleValueAdjust(this.handleVal2, (this.min > this.max ? this.min : this.max), 2);
|
|
6003
6030
|
}
|
|
6004
|
-
if (this.handleVal1 === this.min) {
|
|
6005
|
-
this.handleValueAdjust(this.handleVal1, this.min, 1);
|
|
6031
|
+
if (this.handleVal1 === (this.min > this.max ? this.max : this.min)) {
|
|
6032
|
+
this.handleValueAdjust(this.handleVal1, (this.min > this.max ? this.max : this.min), 1);
|
|
6006
6033
|
}
|
|
6007
6034
|
}
|
|
6008
6035
|
this.activeHandle = 1;
|
|
@@ -6021,7 +6048,7 @@ let Slider = class Slider extends Component {
|
|
|
6021
6048
|
this.secondHandle.classList.remove(classNames.sliderActiveHandle);
|
|
6022
6049
|
}
|
|
6023
6050
|
this.closeTooltip();
|
|
6024
|
-
if (this.isMaterial) {
|
|
6051
|
+
if (this.isMaterial || this.isMaterial3) {
|
|
6025
6052
|
this.getHandle().classList.remove('e-large-thumb-size');
|
|
6026
6053
|
if (this.isMaterialTooltip) {
|
|
6027
6054
|
this.tooltipElement.classList.remove(classNames.materialTooltipActive);
|
|
@@ -6060,7 +6087,7 @@ let Slider = class Slider extends Component {
|
|
|
6060
6087
|
if (this.activeHandle === 1) {
|
|
6061
6088
|
this.firstHandle.classList.add(classNames.sliderActiveHandle);
|
|
6062
6089
|
if (!(this.limits.enabled && this.limits.startHandleFixed)) {
|
|
6063
|
-
if (handlepos > this.handlePos2) {
|
|
6090
|
+
if ((this.min < this.max && handlepos > this.handlePos2 || (this.min > this.max && handlepos < this.handlePos2))) {
|
|
6064
6091
|
handlepos = this.handlePos2;
|
|
6065
6092
|
handleVal = this.handleVal2;
|
|
6066
6093
|
}
|
|
@@ -6079,7 +6106,7 @@ let Slider = class Slider extends Component {
|
|
|
6079
6106
|
else if (this.activeHandle === 2) {
|
|
6080
6107
|
this.secondHandle.classList.add(classNames.sliderActiveHandle);
|
|
6081
6108
|
if (!(this.limits.enabled && this.limits.endHandleFixed)) {
|
|
6082
|
-
if (handlepos < this.handlePos1) {
|
|
6109
|
+
if ((this.min < this.max && handlepos < this.handlePos1) || (this.min > this.max && handlepos > this.handlePos1)) {
|
|
6083
6110
|
handlepos = this.handlePos1;
|
|
6084
6111
|
handleVal = this.handleVal1;
|
|
6085
6112
|
}
|
|
@@ -6104,7 +6131,7 @@ let Slider = class Slider extends Component {
|
|
|
6104
6131
|
this.rangeBar.style.transition = 'none';
|
|
6105
6132
|
}
|
|
6106
6133
|
this.setHandlePosition(evt);
|
|
6107
|
-
if (this.isMaterial && !this.tooltip.isVisible &&
|
|
6134
|
+
if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
|
|
6108
6135
|
!this.getHandle().classList.contains(classNames.sliderTabHandle)) {
|
|
6109
6136
|
this.materialChange();
|
|
6110
6137
|
}
|
|
@@ -6542,7 +6569,9 @@ let Slider = class Slider extends Component {
|
|
|
6542
6569
|
case 'tooltip':
|
|
6543
6570
|
if (!isNullOrUndefined(newProp.tooltip) && !isNullOrUndefined(oldProp.tooltip)) {
|
|
6544
6571
|
this.setTooltip(prop);
|
|
6545
|
-
this.
|
|
6572
|
+
if (!this.showButtons) {
|
|
6573
|
+
this.wireEvents();
|
|
6574
|
+
}
|
|
6546
6575
|
}
|
|
6547
6576
|
break;
|
|
6548
6577
|
case 'type':
|
|
@@ -6659,7 +6688,7 @@ let Slider = class Slider extends Component {
|
|
|
6659
6688
|
this.ul.style.zIndex = (this.zIndex + -7) + '';
|
|
6660
6689
|
this.element.style.zIndex = (this.zIndex + 2) + '';
|
|
6661
6690
|
}
|
|
6662
|
-
if (!this.isMaterial && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
|
|
6691
|
+
if (!this.isMaterial && !this.isMaterial3 && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
|
|
6663
6692
|
this.element.style.zIndex = (this.zIndex + 2) + '';
|
|
6664
6693
|
}
|
|
6665
6694
|
this.firstHandle.style.zIndex = (this.zIndex + 3) + '';
|
|
@@ -7450,7 +7479,17 @@ let FormValidator = FormValidator_1 = class FormValidator extends Base {
|
|
|
7450
7479
|
this.customPlacement.call(this, this.inputElement, errorElement);
|
|
7451
7480
|
}
|
|
7452
7481
|
else {
|
|
7453
|
-
|
|
7482
|
+
const inputParent = this.inputElement.parentElement;
|
|
7483
|
+
const grandParent = inputParent.parentElement;
|
|
7484
|
+
if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
|
|
7485
|
+
grandParent.insertBefore(errorElement, inputParent.nextSibling);
|
|
7486
|
+
}
|
|
7487
|
+
else if (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper')) {
|
|
7488
|
+
grandParent.parentElement.insertBefore(errorElement, grandParent.nextSibling);
|
|
7489
|
+
}
|
|
7490
|
+
else {
|
|
7491
|
+
inputParent.insertBefore(errorElement, this.inputElement.nextSibling);
|
|
7492
|
+
}
|
|
7454
7493
|
}
|
|
7455
7494
|
errorElement.style.display = 'block';
|
|
7456
7495
|
this.getErrorElement(name);
|
|
@@ -7545,7 +7584,15 @@ FormValidator.checkValidator = {
|
|
|
7545
7584
|
return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];
|
|
7546
7585
|
},
|
|
7547
7586
|
date: (option) => {
|
|
7548
|
-
|
|
7587
|
+
if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
|
|
7588
|
+
var globalize = new Internationalization;
|
|
7589
|
+
var dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
7590
|
+
var dateValue = globalize.parseDate(option.value, dateOptions);
|
|
7591
|
+
return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
|
|
7592
|
+
}
|
|
7593
|
+
else {
|
|
7594
|
+
return !isNaN(new Date(option.value).getTime());
|
|
7595
|
+
}
|
|
7549
7596
|
},
|
|
7550
7597
|
max: (option) => {
|
|
7551
7598
|
if (!isNaN(Number(option.value))) {
|
|
@@ -8929,7 +8976,7 @@ let Uploader = class Uploader extends Component {
|
|
|
8929
8976
|
const dataFiles = this.allTypes ? eventArgs.modifiedFilesData :
|
|
8930
8977
|
this.checkExtension(eventArgs.modifiedFilesData);
|
|
8931
8978
|
this.updateSortedFileList(dataFiles);
|
|
8932
|
-
this.filesData = dataFiles;
|
|
8979
|
+
this.filesData = this.filesData.concat(dataFiles);
|
|
8933
8980
|
if (!this.isForm || this.allowUpload()) {
|
|
8934
8981
|
this.checkAutoUpload(dataFiles);
|
|
8935
8982
|
}
|
|
@@ -8984,21 +9031,13 @@ let Uploader = class Uploader extends Component {
|
|
|
8984
9031
|
updateSortedFileList(filesData) {
|
|
8985
9032
|
const previousListClone = this.createElement('div', { id: 'clonewrapper' });
|
|
8986
9033
|
let added = -1;
|
|
8987
|
-
let removedList;
|
|
8988
9034
|
if (this.listParent) {
|
|
8989
9035
|
for (let i = 0; i < this.listParent.querySelectorAll('li').length; i++) {
|
|
8990
9036
|
const liElement = this.listParent.querySelectorAll('li')[i];
|
|
8991
9037
|
previousListClone.appendChild(liElement.cloneNode(true));
|
|
8992
9038
|
}
|
|
8993
|
-
removedList = this.listParent.querySelectorAll('li');
|
|
8994
|
-
for (const item of removedList) {
|
|
8995
|
-
detach(item);
|
|
8996
|
-
}
|
|
8997
9039
|
this.removeActionButtons();
|
|
8998
9040
|
const oldList = [].slice.call(previousListClone.childNodes);
|
|
8999
|
-
detach(this.listParent);
|
|
9000
|
-
this.listParent = null;
|
|
9001
|
-
this.fileList = [];
|
|
9002
9041
|
this.createParentUL();
|
|
9003
9042
|
for (let index = 0; index < filesData.length; index++) {
|
|
9004
9043
|
for (let j = 0; j < this.filesData.length; j++) {
|
|
@@ -9823,7 +9862,7 @@ let Uploader = class Uploader extends Component {
|
|
|
9823
9862
|
templateComplier(uploadTemplate) {
|
|
9824
9863
|
if (uploadTemplate) {
|
|
9825
9864
|
try {
|
|
9826
|
-
if (selectAll(uploadTemplate, document).length) {
|
|
9865
|
+
if (typeof uploadTemplate !== 'function' && selectAll(uploadTemplate, document).length) {
|
|
9827
9866
|
return compile(select(uploadTemplate, document).innerHTML.trim());
|
|
9828
9867
|
}
|
|
9829
9868
|
else {
|
|
@@ -11414,7 +11453,7 @@ let ColorPicker = class ColorPicker extends Component {
|
|
|
11414
11453
|
hsvContainer.appendChild(this.createElement('div', { className: HSVAREA }));
|
|
11415
11454
|
const dragHandler = this.createElement('span', { className: HANDLER, attrs: { 'tabindex': '0' } });
|
|
11416
11455
|
hsvContainer.appendChild(dragHandler);
|
|
11417
|
-
if (this.value === null) {
|
|
11456
|
+
if (this.value === null || this.value === '') {
|
|
11418
11457
|
this.value = '#008000ff';
|
|
11419
11458
|
}
|
|
11420
11459
|
this.rgb = this.hexToRgb(this.value);
|
|
@@ -12756,6 +12795,10 @@ let ColorPicker = class ColorPicker extends Component {
|
|
|
12756
12795
|
preview.style.backgroundColor = this.convertToRgbString(this.hexToRgb(newProp.value));
|
|
12757
12796
|
}
|
|
12758
12797
|
}
|
|
12798
|
+
else if (this.noColor && this.mode === 'Palette' && this.value === '') {
|
|
12799
|
+
const preview = this.splitBtn && select('.' + SPLITPREVIEW, this.splitBtn.element);
|
|
12800
|
+
preview.style.backgroundColor = '';
|
|
12801
|
+
}
|
|
12759
12802
|
else {
|
|
12760
12803
|
this.value = oldProp.value;
|
|
12761
12804
|
}
|
|
@@ -13049,10 +13092,8 @@ let TextBox = class TextBox extends Component {
|
|
|
13049
13092
|
}
|
|
13050
13093
|
break;
|
|
13051
13094
|
case 'showClearButton':
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
this.bindClearEvent();
|
|
13055
|
-
}
|
|
13095
|
+
Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
|
|
13096
|
+
this.bindClearEvent();
|
|
13056
13097
|
break;
|
|
13057
13098
|
case 'enableRtl':
|
|
13058
13099
|
Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);
|
|
@@ -13435,7 +13476,7 @@ let TextBox = class TextBox extends Component {
|
|
|
13435
13476
|
}
|
|
13436
13477
|
}
|
|
13437
13478
|
bindClearEvent() {
|
|
13438
|
-
if (this.showClearButton
|
|
13479
|
+
if (this.showClearButton) {
|
|
13439
13480
|
if (this.enabled) {
|
|
13440
13481
|
EventHandler.add(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
|
|
13441
13482
|
}
|
|
@@ -14951,8 +14992,8 @@ let Rating = class Rating extends Component {
|
|
|
14951
14992
|
return;
|
|
14952
14993
|
}
|
|
14953
14994
|
const previousValue = this.currentValue;
|
|
14954
|
-
this.updateCurrentValue(currValue);
|
|
14955
14995
|
this.triggerChange(e, currValue);
|
|
14996
|
+
this.updateCurrentValue(currValue);
|
|
14956
14997
|
if (this.showTooltip) {
|
|
14957
14998
|
if (element) {
|
|
14958
14999
|
if (Math.ceil(currValue) !== Math.ceil(previousValue)) {
|
|
@@ -14995,11 +15036,11 @@ let Rating = class Rating extends Component {
|
|
|
14995
15036
|
}
|
|
14996
15037
|
if (this.fullTemplate && val === 1) {
|
|
14997
15038
|
spanEle.classList.add(FULLTEMPLATE);
|
|
14998
|
-
|
|
15039
|
+
append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate), spanEle);
|
|
14999
15040
|
}
|
|
15000
15041
|
else if (this.emptyTemplate) {
|
|
15001
15042
|
spanEle.classList.add(EMPTYTEMPLATE);
|
|
15002
|
-
|
|
15043
|
+
append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate), spanEle);
|
|
15003
15044
|
}
|
|
15004
15045
|
else {
|
|
15005
15046
|
addClass([spanEle], ICONCSS.split(' '));
|
|
@@ -15009,7 +15050,7 @@ let Rating = class Rating extends Component {
|
|
|
15009
15050
|
spanEle.classList.remove(FULLTEMPLATE, EMPTYTEMPLATE);
|
|
15010
15051
|
removeClass([spanEle], ICONCSS.split(' '));
|
|
15011
15052
|
if (spanEle.firstChild) {
|
|
15012
|
-
spanEle.
|
|
15053
|
+
spanEle.innerHTML = '';
|
|
15013
15054
|
}
|
|
15014
15055
|
}
|
|
15015
15056
|
updateTooltip() {
|
|
@@ -15093,7 +15134,7 @@ let Rating = class Rating extends Component {
|
|
|
15093
15134
|
}
|
|
15094
15135
|
this.removeItemContent(spanEle);
|
|
15095
15136
|
spanEle.classList.add(FULLTEMPLATE);
|
|
15096
|
-
|
|
15137
|
+
append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate), spanEle);
|
|
15097
15138
|
}
|
|
15098
15139
|
else if (this.emptyTemplate) {
|
|
15099
15140
|
if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
|
|
@@ -15101,7 +15142,7 @@ let Rating = class Rating extends Component {
|
|
|
15101
15142
|
}
|
|
15102
15143
|
this.removeItemContent(spanEle);
|
|
15103
15144
|
spanEle.classList.add(EMPTYTEMPLATE);
|
|
15104
|
-
|
|
15145
|
+
append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate), spanEle);
|
|
15105
15146
|
}
|
|
15106
15147
|
else {
|
|
15107
15148
|
this.removeItemContent(spanEle);
|
|
@@ -15115,23 +15156,30 @@ let Rating = class Rating extends Component {
|
|
|
15115
15156
|
}
|
|
15116
15157
|
let content;
|
|
15117
15158
|
if (this.tooltipTemplate) {
|
|
15159
|
+
content = this.createElement('span', { className: 'e-rating-tooltip-content' });
|
|
15118
15160
|
const templateFunction = this.getTemplateString(this.tooltipTemplate);
|
|
15119
|
-
|
|
15161
|
+
append(templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate), content);
|
|
15162
|
+
this.tooltipObj.setProperties({ content: content }, isChange);
|
|
15120
15163
|
}
|
|
15121
15164
|
else {
|
|
15122
15165
|
content = this.currentValue.toString();
|
|
15166
|
+
this.tooltipObj.setProperties({ content: initializeCSPTemplate(function () { return content; }) }, isChange);
|
|
15123
15167
|
}
|
|
15124
|
-
this.tooltipObj.setProperties({ content: content }, isChange);
|
|
15125
15168
|
this.renderReactTemplates();
|
|
15126
15169
|
}
|
|
15127
15170
|
}
|
|
15128
15171
|
getTemplateString(template) {
|
|
15129
15172
|
let stringContent = '';
|
|
15130
15173
|
try {
|
|
15131
|
-
|
|
15132
|
-
|
|
15133
|
-
|
|
15134
|
-
|
|
15174
|
+
if (typeof template !== 'function') {
|
|
15175
|
+
const tempEle = select(template);
|
|
15176
|
+
if (tempEle) {
|
|
15177
|
+
//Return innerHTML incase of jsrenderer script else outerHTML
|
|
15178
|
+
stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
|
|
15179
|
+
}
|
|
15180
|
+
else {
|
|
15181
|
+
stringContent = template;
|
|
15182
|
+
}
|
|
15135
15183
|
}
|
|
15136
15184
|
else {
|
|
15137
15185
|
stringContent = template;
|
|
@@ -15162,10 +15210,10 @@ let Rating = class Rating extends Component {
|
|
|
15162
15210
|
this.clearTemplate(['ratingLabelTemplate']);
|
|
15163
15211
|
}
|
|
15164
15212
|
if (this.spanLabel.firstChild) {
|
|
15165
|
-
this.spanLabel.
|
|
15213
|
+
this.spanLabel.innerHTML = '';
|
|
15166
15214
|
}
|
|
15167
15215
|
const templateFunction = this.getTemplateString(this.labelTemplate);
|
|
15168
|
-
|
|
15216
|
+
append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate), this.spanLabel);
|
|
15169
15217
|
this.renderReactTemplates();
|
|
15170
15218
|
}
|
|
15171
15219
|
else {
|
|
@@ -15250,7 +15298,7 @@ let Rating = class Rating extends Component {
|
|
|
15250
15298
|
if (this.showTooltip) {
|
|
15251
15299
|
if (!this.tooltipOpen) {
|
|
15252
15300
|
this.updateTooltipContent(false);
|
|
15253
|
-
this.tooltipObj.open(element);
|
|
15301
|
+
this.tooltipObj.open(element);
|
|
15254
15302
|
this.tooltipOpen = true;
|
|
15255
15303
|
}
|
|
15256
15304
|
else if (isChange) {
|