@syncfusion/ej2-inputs 21.2.9 → 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 +22 -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 +142 -109
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +144 -112
- 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 +3 -14
- 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 (var 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(function () {
|
|
87
|
+
Input.calculateWidth(args.element, parent);
|
|
88
|
+
}, 80);
|
|
89
|
+
}
|
|
88
90
|
});
|
|
89
91
|
args.element.addEventListener('blur', function () {
|
|
90
92
|
var 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(function () {
|
|
99
|
+
Input.calculateWidth(args.element, parent);
|
|
100
|
+
}, 80);
|
|
101
|
+
}
|
|
98
102
|
});
|
|
99
103
|
args.element.addEventListener('input', function () {
|
|
100
104
|
checkInputValue(floatType, args.element);
|
|
@@ -300,7 +304,7 @@ var Input;
|
|
|
300
304
|
}
|
|
301
305
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
302
306
|
function wireClearBtnEvents(element, button, container) {
|
|
303
|
-
if (
|
|
307
|
+
if (isBindClearAction === undefined || isBindClearAction) {
|
|
304
308
|
button.addEventListener('click', function (event) {
|
|
305
309
|
if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
|
|
306
310
|
event.preventDefault();
|
|
@@ -381,7 +385,9 @@ var Input;
|
|
|
381
385
|
*/
|
|
382
386
|
function setValue$$1(value, element, floatLabelType, clearButton) {
|
|
383
387
|
element.value = value;
|
|
384
|
-
|
|
388
|
+
if (floatLabelType === 'Auto' && value === '') {
|
|
389
|
+
calculateWidth(element, element.parentElement);
|
|
390
|
+
}
|
|
385
391
|
if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
|
|
386
392
|
validateLabel(element, floatLabelType);
|
|
387
393
|
}
|
|
@@ -1958,8 +1964,12 @@ var NumericTextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1958
1964
|
event.stopPropagation();
|
|
1959
1965
|
clearInterval(this.timeOut);
|
|
1960
1966
|
this.isCalled = false;
|
|
1961
|
-
|
|
1962
|
-
|
|
1967
|
+
if (this.spinUp) {
|
|
1968
|
+
EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
|
|
1969
|
+
}
|
|
1970
|
+
if (this.spinDown) {
|
|
1971
|
+
EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
|
|
1972
|
+
}
|
|
1963
1973
|
};
|
|
1964
1974
|
/**
|
|
1965
1975
|
* Increments the NumericTextBox value with the specified step value.
|
|
@@ -4400,13 +4410,15 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4400
4410
|
Slider.prototype.getThemeInitialization = function () {
|
|
4401
4411
|
this.isMaterial = this.getTheme(this.sliderContainer) === 'material'
|
|
4402
4412
|
|| this.getTheme(this.sliderContainer) === 'material-dark';
|
|
4413
|
+
this.isMaterial3 = this.getTheme(this.sliderContainer) === 'Material3'
|
|
4414
|
+
|| this.getTheme(this.sliderContainer) === 'Material3-dark';
|
|
4403
4415
|
this.isBootstrap = this.getTheme(this.sliderContainer) === 'bootstrap'
|
|
4404
4416
|
|| this.getTheme(this.sliderContainer) === 'bootstrap-dark';
|
|
4405
4417
|
this.isBootstrap4 = this.getTheme(this.sliderContainer) === 'bootstrap4';
|
|
4406
4418
|
this.isTailwind = this.getTheme(this.sliderContainer) === 'tailwind' || this.getTheme(this.sliderContainer) === 'tailwind-dark';
|
|
4407
4419
|
this.isBootstrap5 = this.getTheme(this.sliderContainer) === 'bootstrap5';
|
|
4408
4420
|
this.isFluent = this.getTheme(this.sliderContainer) === 'FluentUI';
|
|
4409
|
-
this.isMaterialTooltip = this.isMaterial && this.type !== 'Range' && this.tooltip.isVisible;
|
|
4421
|
+
this.isMaterialTooltip = (this.isMaterial || this.isMaterial3) && this.type !== 'Range' && this.tooltip.isVisible;
|
|
4410
4422
|
};
|
|
4411
4423
|
Slider.prototype.createRangeBar = function () {
|
|
4412
4424
|
if (this.type !== 'Default') {
|
|
@@ -4560,7 +4572,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4560
4572
|
if (this.type !== 'Default') {
|
|
4561
4573
|
this.rangeBar.style.transition = 'none';
|
|
4562
4574
|
}
|
|
4563
|
-
if (this.isMaterial && this.tooltip.isVisible && this.type === 'Default') {
|
|
4575
|
+
if ((this.isMaterial || this.isMaterial3) && this.tooltip.isVisible && this.type === 'Default') {
|
|
4564
4576
|
this.tooltipElement.style.transition = this.transition.handle;
|
|
4565
4577
|
}
|
|
4566
4578
|
this.tooltipToggle(this.getHandle());
|
|
@@ -4607,9 +4619,6 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4607
4619
|
}
|
|
4608
4620
|
};
|
|
4609
4621
|
Slider.prototype.setHandler = function () {
|
|
4610
|
-
if (this.min > this.max) {
|
|
4611
|
-
this.min = this.max;
|
|
4612
|
-
}
|
|
4613
4622
|
this.createFirstHandle();
|
|
4614
4623
|
if (this.type === 'Range') {
|
|
4615
4624
|
this.createSecondHandle();
|
|
@@ -4760,7 +4769,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4760
4769
|
}
|
|
4761
4770
|
};
|
|
4762
4771
|
Slider.prototype.tooltipCollision = function (position) {
|
|
4763
|
-
if (this.isBootstrap || this.isBootstrap4 || (this.isMaterial && !this.isMaterialTooltip)) {
|
|
4772
|
+
if (this.isBootstrap || this.isBootstrap4 || ((this.isMaterial || this.isMaterial3) && !this.isMaterialTooltip)) {
|
|
4764
4773
|
var tooltipOffsetValue = this.isBootstrap4 ? bootstrap4TooltipOffset : bootstrapTooltipOffset;
|
|
4765
4774
|
switch (position) {
|
|
4766
4775
|
case 'TopCenter':
|
|
@@ -4900,9 +4909,9 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4900
4909
|
};
|
|
4901
4910
|
Slider.prototype.renderTooltip = function () {
|
|
4902
4911
|
this.tooltipObj = new Tooltip({
|
|
4903
|
-
showTipPointer: this.isBootstrap || this.isMaterial || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
|
|
4912
|
+
showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
|
|
4904
4913
|
cssClass: classNames.sliderTooltip,
|
|
4905
|
-
height: this.isMaterial ? 30 : 'auto',
|
|
4914
|
+
height: (this.isMaterial || this.isMaterial3) ? 30 : 'auto',
|
|
4906
4915
|
animation: { open: { effect: 'None' }, close: { effect: 'FadeOut', duration: 500 } },
|
|
4907
4916
|
opensOn: 'Custom',
|
|
4908
4917
|
beforeOpen: this.tooltipBeforeOpen.bind(this),
|
|
@@ -4962,7 +4971,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4962
4971
|
attributes(enabledRTL ? this.firstBtn : this.secondBtn, { 'aria-label': incrementTitle, title: incrementTitle });
|
|
4963
4972
|
};
|
|
4964
4973
|
Slider.prototype.buttonFocusOut = function () {
|
|
4965
|
-
if (this.isMaterial) {
|
|
4974
|
+
if (this.isMaterial || this.isMaterial3) {
|
|
4966
4975
|
this.getHandle().classList.remove('e-large-thumb-size');
|
|
4967
4976
|
}
|
|
4968
4977
|
};
|
|
@@ -5139,7 +5148,12 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5139
5148
|
start = this.makeRoundNumber(start + smallStep, decimalPoints);
|
|
5140
5149
|
}
|
|
5141
5150
|
else {
|
|
5142
|
-
|
|
5151
|
+
if (this.min > this.max) {
|
|
5152
|
+
start = this.makeRoundNumber(start + smallStep, decimalPoints);
|
|
5153
|
+
}
|
|
5154
|
+
else {
|
|
5155
|
+
start = this.makeRoundNumber(start - smallStep, decimalPoints);
|
|
5156
|
+
}
|
|
5143
5157
|
}
|
|
5144
5158
|
left = this.makeRoundNumber(left + smallStep, decimalPoints);
|
|
5145
5159
|
}
|
|
@@ -5382,16 +5396,16 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5382
5396
|
(value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false));
|
|
5383
5397
|
}
|
|
5384
5398
|
else if ((args.keyCode === 36)) {
|
|
5385
|
-
value = parseFloat(this.min.toString());
|
|
5399
|
+
value = parseFloat(this.min < this.max ? this.min.toString() : this.max.toString());
|
|
5386
5400
|
}
|
|
5387
5401
|
else if ((args.keyCode === 35)) {
|
|
5388
|
-
value = parseFloat(this.max.toString());
|
|
5402
|
+
value = parseFloat(this.min < this.max ? this.max.toString() : this.min.toString());
|
|
5389
5403
|
}
|
|
5390
5404
|
if (this.limits.enabled) {
|
|
5391
5405
|
value = this.getLimitCorrectedValues(value);
|
|
5392
5406
|
}
|
|
5393
5407
|
this.changeHandleValue(value);
|
|
5394
|
-
if (this.isMaterial && !this.tooltip.isVisible &&
|
|
5408
|
+
if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
|
|
5395
5409
|
!this.getHandle().classList.contains(classNames.sliderTabHandle)) {
|
|
5396
5410
|
this.materialChange();
|
|
5397
5411
|
}
|
|
@@ -5440,12 +5454,12 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5440
5454
|
}
|
|
5441
5455
|
else {
|
|
5442
5456
|
if (this.type === 'MinRange') {
|
|
5443
|
-
this.rangeBar.style.bottom = '0px';
|
|
5444
|
-
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
|
|
5457
|
+
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
|
|
5458
|
+
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
|
|
5445
5459
|
}
|
|
5446
5460
|
else {
|
|
5447
|
-
this.rangeBar.style.bottom = this.handlePos1 + 'px';
|
|
5448
|
-
setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
|
|
5461
|
+
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
|
|
5462
|
+
setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
|
|
5449
5463
|
}
|
|
5450
5464
|
}
|
|
5451
5465
|
};
|
|
@@ -5466,8 +5480,8 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5466
5480
|
}
|
|
5467
5481
|
}
|
|
5468
5482
|
else {
|
|
5469
|
-
this.limitBarFirst.style.bottom = fromMinPostion + 'px';
|
|
5470
|
-
this.limitBarFirst.style.height = (fromMaxpostion - fromMinPostion) + 'px';
|
|
5483
|
+
this.limitBarFirst.style.bottom = (this.min < this.max ? fromMinPostion : fromMaxpostion) + 'px';
|
|
5484
|
+
this.limitBarFirst.style.height = (this.min < this.max ? (fromMaxpostion - fromMinPostion) : (fromMinPostion - fromMaxpostion)) + 'px';
|
|
5471
5485
|
}
|
|
5472
5486
|
if (this.type === 'Range') {
|
|
5473
5487
|
if (this.orientation === 'Horizontal') {
|
|
@@ -5481,8 +5495,8 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5481
5495
|
}
|
|
5482
5496
|
}
|
|
5483
5497
|
else {
|
|
5484
|
-
this.limitBarSecond.style.bottom = toMinPostion + 'px';
|
|
5485
|
-
this.limitBarSecond.style.height = (toMaxpostion - toMinPostion) + 'px';
|
|
5498
|
+
this.limitBarSecond.style.bottom = (this.min < this.max ? toMinPostion : toMaxpostion) + 'px';
|
|
5499
|
+
this.limitBarSecond.style.height = (this.min < this.max ? (toMaxpostion - toMinPostion) : (toMinPostion - toMaxpostion)) + 'px';
|
|
5486
5500
|
}
|
|
5487
5501
|
}
|
|
5488
5502
|
};
|
|
@@ -5508,13 +5522,13 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5508
5522
|
};
|
|
5509
5523
|
Slider.prototype.getLimitValueAndPosition = function (currentValue, minValue, maxValue, limitBar) {
|
|
5510
5524
|
if (isNullOrUndefined(minValue)) {
|
|
5511
|
-
minValue = this.min;
|
|
5525
|
+
minValue = this.min < this.max ? this.min : this.max;
|
|
5512
5526
|
if (isNullOrUndefined(currentValue) && limitBar) {
|
|
5513
5527
|
currentValue = minValue;
|
|
5514
5528
|
}
|
|
5515
5529
|
}
|
|
5516
5530
|
if (isNullOrUndefined(maxValue)) {
|
|
5517
|
-
maxValue = this.max;
|
|
5531
|
+
maxValue = this.min < this.max ? this.max : this.min;
|
|
5518
5532
|
if (isNullOrUndefined(currentValue) && limitBar) {
|
|
5519
5533
|
currentValue = maxValue;
|
|
5520
5534
|
}
|
|
@@ -5697,10 +5711,14 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5697
5711
|
}
|
|
5698
5712
|
this.handlePos1 = this.checkHandlePosition(this.handleVal1);
|
|
5699
5713
|
this.handlePos2 = this.checkHandlePosition(this.handleVal2);
|
|
5700
|
-
if (this.handlePos1 > this.handlePos2) {
|
|
5714
|
+
if (this.min < this.max && this.handlePos1 > this.handlePos2) {
|
|
5701
5715
|
this.handlePos1 = this.handlePos2;
|
|
5702
5716
|
this.handleVal1 = this.handleVal2;
|
|
5703
5717
|
}
|
|
5718
|
+
if (this.min > this.max && this.handlePos1 < this.handlePos2) {
|
|
5719
|
+
this.handlePos2 = this.handlePos1;
|
|
5720
|
+
this.handleVal2 = this.handleVal1;
|
|
5721
|
+
}
|
|
5704
5722
|
this.preHandlePos1 = this.handlePos1;
|
|
5705
5723
|
this.preHandlePos2 = this.handlePos2;
|
|
5706
5724
|
if (this.limits.enabled) {
|
|
@@ -5737,9 +5755,6 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5737
5755
|
return pos;
|
|
5738
5756
|
};
|
|
5739
5757
|
Slider.prototype.checkHandleValue = function (value) {
|
|
5740
|
-
if (this.min > this.max) {
|
|
5741
|
-
this.min = this.max;
|
|
5742
|
-
}
|
|
5743
5758
|
if (this.min === this.max) {
|
|
5744
5759
|
return (parseFloat(formatUnit(this.max)));
|
|
5745
5760
|
}
|
|
@@ -5800,13 +5815,13 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5800
5815
|
this.materialHandle.style.bottom = this.handlePos1 + "px";
|
|
5801
5816
|
}
|
|
5802
5817
|
if (this.type === 'MinRange') {
|
|
5803
|
-
this.rangeBar.style.bottom = '0px';
|
|
5804
|
-
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
|
|
5818
|
+
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
|
|
5819
|
+
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
|
|
5805
5820
|
}
|
|
5806
5821
|
else if (this.type === 'Range') {
|
|
5807
5822
|
this.secondHandle.style.bottom = this.handlePos2 + "px";
|
|
5808
|
-
this.rangeBar.style.bottom = this.handlePos1 + 'px';
|
|
5809
|
-
setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
|
|
5823
|
+
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
|
|
5824
|
+
setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
|
|
5810
5825
|
}
|
|
5811
5826
|
}
|
|
5812
5827
|
if (this.limits.enabled) {
|
|
@@ -5835,7 +5850,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5835
5850
|
if (!(this.limits.enabled && this.limits.startHandleFixed)) {
|
|
5836
5851
|
this.handleVal1 = this.checkHandleValue(value);
|
|
5837
5852
|
this.handlePos1 = this.checkHandlePosition(this.handleVal1);
|
|
5838
|
-
if (this.type === 'Range' && this.handlePos1 > this.handlePos2) {
|
|
5853
|
+
if (this.type === 'Range' && ((this.handlePos1 > this.handlePos2 && this.min < this.max) || (this.handlePos1 < this.handlePos2 && this.min > this.max))) {
|
|
5839
5854
|
this.handlePos1 = this.handlePos2;
|
|
5840
5855
|
this.handleVal1 = this.handleVal2;
|
|
5841
5856
|
}
|
|
@@ -5849,7 +5864,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5849
5864
|
if (!(this.limits.enabled && this.limits.endHandleFixed)) {
|
|
5850
5865
|
this.handleVal2 = this.checkHandleValue(value);
|
|
5851
5866
|
this.handlePos2 = this.checkHandlePosition(this.handleVal2);
|
|
5852
|
-
if (this.type === 'Range' && this.handlePos2 < this.handlePos1) {
|
|
5867
|
+
if (this.type === 'Range' && ((this.handlePos2 < this.handlePos1 && this.min < this.max) || (this.handlePos2 > this.handlePos1 && this.min > this.max))) {
|
|
5853
5868
|
this.handlePos2 = this.handlePos1;
|
|
5854
5869
|
this.handleVal2 = this.handleVal1;
|
|
5855
5870
|
}
|
|
@@ -5967,7 +5982,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5967
5982
|
}
|
|
5968
5983
|
var handlepos = this.xyToPosition(pos);
|
|
5969
5984
|
var handleVal = this.positionToValue(handlepos);
|
|
5970
|
-
if (this.type === 'Range' && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1)) {
|
|
5985
|
+
if (this.type === 'Range' && (this.min < (this.max) && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1) || (this.min > this.max) && (this.handlePos1 - handlepos) > (handlepos - this.handlePos2))) {
|
|
5971
5986
|
this.activeHandle = 2;
|
|
5972
5987
|
if (!(this.limits.enabled && this.limits.endHandleFixed)) {
|
|
5973
5988
|
if (this.limits.enabled) {
|
|
@@ -6011,7 +6026,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6011
6026
|
behindElement = document.elementFromPoint(eventX, eventY);
|
|
6012
6027
|
}
|
|
6013
6028
|
if (evt.target === handle && behindElement != handle) {
|
|
6014
|
-
if (this.isMaterial && !this.tooltip.isVisible &&
|
|
6029
|
+
if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
|
|
6015
6030
|
!this.getHandle().classList.contains(classNames.sliderTabHandle)) {
|
|
6016
6031
|
this.materialChange();
|
|
6017
6032
|
}
|
|
@@ -6022,7 +6037,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6022
6037
|
if (!this.checkRepeatedValue(handleVal)) {
|
|
6023
6038
|
return;
|
|
6024
6039
|
}
|
|
6025
|
-
var transition = this.isMaterial && this.tooltip.isVisible ?
|
|
6040
|
+
var transition = (this.isMaterial || this.isMaterial3) && this.tooltip.isVisible ?
|
|
6026
6041
|
this.transitionOnMaterialTooltip : this.transition;
|
|
6027
6042
|
this.getHandle().style.transition = transition.handle;
|
|
6028
6043
|
if (this.type !== 'Default') {
|
|
@@ -6074,16 +6089,28 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6074
6089
|
else {
|
|
6075
6090
|
pos = { x: xPostion + this.secondPartRemain, y: yPostion + this.secondPartRemain };
|
|
6076
6091
|
}
|
|
6077
|
-
this.
|
|
6078
|
-
|
|
6092
|
+
if (this.min > this.max) {
|
|
6093
|
+
this.handlePos2 = this.xyToPosition(pos);
|
|
6094
|
+
this.handleVal2 = this.positionToValue(this.handlePos2);
|
|
6095
|
+
}
|
|
6096
|
+
else {
|
|
6097
|
+
this.handlePos1 = this.xyToPosition(pos);
|
|
6098
|
+
this.handleVal1 = this.positionToValue(this.handlePos1);
|
|
6099
|
+
}
|
|
6079
6100
|
if (!this.enableRtl) {
|
|
6080
6101
|
pos = { x: xPostion + this.secondPartRemain, y: yPostion - this.firstPartRemain };
|
|
6081
6102
|
}
|
|
6082
6103
|
else {
|
|
6083
6104
|
pos = { x: xPostion - this.firstPartRemain, y: yPostion - this.firstPartRemain };
|
|
6084
6105
|
}
|
|
6085
|
-
this.
|
|
6086
|
-
|
|
6106
|
+
if (this.min > this.max) {
|
|
6107
|
+
this.handlePos1 = this.xyToPosition(pos);
|
|
6108
|
+
this.handleVal1 = this.positionToValue(this.handlePos1);
|
|
6109
|
+
}
|
|
6110
|
+
else {
|
|
6111
|
+
this.handlePos2 = this.xyToPosition(pos);
|
|
6112
|
+
this.handleVal2 = this.positionToValue(this.handlePos2);
|
|
6113
|
+
}
|
|
6087
6114
|
if (this.limits.enabled) {
|
|
6088
6115
|
var value = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
|
|
6089
6116
|
this.handleVal1 = value[0];
|
|
@@ -6104,11 +6131,11 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6104
6131
|
this.handleValueAdjust(this.handleVal2, this.limits.maxEnd, 2);
|
|
6105
6132
|
}
|
|
6106
6133
|
}
|
|
6107
|
-
if (this.handleVal2 === this.max) {
|
|
6108
|
-
this.handleValueAdjust(this.handleVal2, this.max, 2);
|
|
6134
|
+
if (this.handleVal2 === (this.min > this.max ? this.min : this.max)) {
|
|
6135
|
+
this.handleValueAdjust(this.handleVal2, (this.min > this.max ? this.min : this.max), 2);
|
|
6109
6136
|
}
|
|
6110
|
-
if (this.handleVal1 === this.min) {
|
|
6111
|
-
this.handleValueAdjust(this.handleVal1, this.min, 1);
|
|
6137
|
+
if (this.handleVal1 === (this.min > this.max ? this.max : this.min)) {
|
|
6138
|
+
this.handleValueAdjust(this.handleVal1, (this.min > this.max ? this.max : this.min), 1);
|
|
6112
6139
|
}
|
|
6113
6140
|
}
|
|
6114
6141
|
this.activeHandle = 1;
|
|
@@ -6127,7 +6154,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6127
6154
|
this.secondHandle.classList.remove(classNames.sliderActiveHandle);
|
|
6128
6155
|
}
|
|
6129
6156
|
this.closeTooltip();
|
|
6130
|
-
if (this.isMaterial) {
|
|
6157
|
+
if (this.isMaterial || this.isMaterial3) {
|
|
6131
6158
|
this.getHandle().classList.remove('e-large-thumb-size');
|
|
6132
6159
|
if (this.isMaterialTooltip) {
|
|
6133
6160
|
this.tooltipElement.classList.remove(classNames.materialTooltipActive);
|
|
@@ -6166,7 +6193,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6166
6193
|
if (this.activeHandle === 1) {
|
|
6167
6194
|
this.firstHandle.classList.add(classNames.sliderActiveHandle);
|
|
6168
6195
|
if (!(this.limits.enabled && this.limits.startHandleFixed)) {
|
|
6169
|
-
if (handlepos > this.handlePos2) {
|
|
6196
|
+
if ((this.min < this.max && handlepos > this.handlePos2 || (this.min > this.max && handlepos < this.handlePos2))) {
|
|
6170
6197
|
handlepos = this.handlePos2;
|
|
6171
6198
|
handleVal = this.handleVal2;
|
|
6172
6199
|
}
|
|
@@ -6185,7 +6212,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6185
6212
|
else if (this.activeHandle === 2) {
|
|
6186
6213
|
this.secondHandle.classList.add(classNames.sliderActiveHandle);
|
|
6187
6214
|
if (!(this.limits.enabled && this.limits.endHandleFixed)) {
|
|
6188
|
-
if (handlepos < this.handlePos1) {
|
|
6215
|
+
if ((this.min < this.max && handlepos < this.handlePos1) || (this.min > this.max && handlepos > this.handlePos1)) {
|
|
6189
6216
|
handlepos = this.handlePos1;
|
|
6190
6217
|
handleVal = this.handleVal1;
|
|
6191
6218
|
}
|
|
@@ -6210,7 +6237,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6210
6237
|
this.rangeBar.style.transition = 'none';
|
|
6211
6238
|
}
|
|
6212
6239
|
this.setHandlePosition(evt);
|
|
6213
|
-
if (this.isMaterial && !this.tooltip.isVisible &&
|
|
6240
|
+
if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
|
|
6214
6241
|
!this.getHandle().classList.contains(classNames.sliderTabHandle)) {
|
|
6215
6242
|
this.materialChange();
|
|
6216
6243
|
}
|
|
@@ -6651,7 +6678,9 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6651
6678
|
case 'tooltip':
|
|
6652
6679
|
if (!isNullOrUndefined(newProp.tooltip) && !isNullOrUndefined(oldProp.tooltip)) {
|
|
6653
6680
|
this.setTooltip(prop);
|
|
6654
|
-
this.
|
|
6681
|
+
if (!this.showButtons) {
|
|
6682
|
+
this.wireEvents();
|
|
6683
|
+
}
|
|
6655
6684
|
}
|
|
6656
6685
|
break;
|
|
6657
6686
|
case 'type':
|
|
@@ -6769,7 +6798,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6769
6798
|
this.ul.style.zIndex = (this.zIndex + -7) + '';
|
|
6770
6799
|
this.element.style.zIndex = (this.zIndex + 2) + '';
|
|
6771
6800
|
}
|
|
6772
|
-
if (!this.isMaterial && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
|
|
6801
|
+
if (!this.isMaterial && !this.isMaterial3 && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
|
|
6773
6802
|
this.element.style.zIndex = (this.zIndex + 2) + '';
|
|
6774
6803
|
}
|
|
6775
6804
|
this.firstHandle.style.zIndex = (this.zIndex + 3) + '';
|
|
@@ -7586,7 +7615,17 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
7586
7615
|
this.customPlacement.call(this, this.inputElement, errorElement);
|
|
7587
7616
|
}
|
|
7588
7617
|
else {
|
|
7589
|
-
|
|
7618
|
+
var inputParent = this.inputElement.parentElement;
|
|
7619
|
+
var grandParent = inputParent.parentElement;
|
|
7620
|
+
if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
|
|
7621
|
+
grandParent.insertBefore(errorElement, inputParent.nextSibling);
|
|
7622
|
+
}
|
|
7623
|
+
else if (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper')) {
|
|
7624
|
+
grandParent.parentElement.insertBefore(errorElement, grandParent.nextSibling);
|
|
7625
|
+
}
|
|
7626
|
+
else {
|
|
7627
|
+
inputParent.insertBefore(errorElement, this.inputElement.nextSibling);
|
|
7628
|
+
}
|
|
7590
7629
|
}
|
|
7591
7630
|
errorElement.style.display = 'block';
|
|
7592
7631
|
this.getErrorElement(name);
|
|
@@ -7681,7 +7720,15 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
7681
7720
|
return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];
|
|
7682
7721
|
},
|
|
7683
7722
|
date: function (option) {
|
|
7684
|
-
|
|
7723
|
+
if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
|
|
7724
|
+
var globalize = new Internationalization;
|
|
7725
|
+
var dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
7726
|
+
var dateValue = globalize.parseDate(option.value, dateOptions);
|
|
7727
|
+
return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
|
|
7728
|
+
}
|
|
7729
|
+
else {
|
|
7730
|
+
return !isNaN(new Date(option.value).getTime());
|
|
7731
|
+
}
|
|
7685
7732
|
},
|
|
7686
7733
|
max: function (option) {
|
|
7687
7734
|
if (!isNaN(Number(option.value))) {
|
|
@@ -9120,7 +9167,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
9120
9167
|
var dataFiles = this.allTypes ? eventArgs.modifiedFilesData :
|
|
9121
9168
|
this.checkExtension(eventArgs.modifiedFilesData);
|
|
9122
9169
|
this.updateSortedFileList(dataFiles);
|
|
9123
|
-
this.filesData = dataFiles;
|
|
9170
|
+
this.filesData = this.filesData.concat(dataFiles);
|
|
9124
9171
|
if (!this.isForm || this.allowUpload()) {
|
|
9125
9172
|
this.checkAutoUpload(dataFiles);
|
|
9126
9173
|
}
|
|
@@ -9175,22 +9222,13 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
9175
9222
|
Uploader.prototype.updateSortedFileList = function (filesData) {
|
|
9176
9223
|
var previousListClone = this.createElement('div', { id: 'clonewrapper' });
|
|
9177
9224
|
var added = -1;
|
|
9178
|
-
var removedList;
|
|
9179
9225
|
if (this.listParent) {
|
|
9180
9226
|
for (var i = 0; i < this.listParent.querySelectorAll('li').length; i++) {
|
|
9181
9227
|
var liElement = this.listParent.querySelectorAll('li')[i];
|
|
9182
9228
|
previousListClone.appendChild(liElement.cloneNode(true));
|
|
9183
9229
|
}
|
|
9184
|
-
removedList = this.listParent.querySelectorAll('li');
|
|
9185
|
-
for (var _i = 0, removedList_1 = removedList; _i < removedList_1.length; _i++) {
|
|
9186
|
-
var item = removedList_1[_i];
|
|
9187
|
-
detach(item);
|
|
9188
|
-
}
|
|
9189
9230
|
this.removeActionButtons();
|
|
9190
9231
|
var oldList = [].slice.call(previousListClone.childNodes);
|
|
9191
|
-
detach(this.listParent);
|
|
9192
|
-
this.listParent = null;
|
|
9193
|
-
this.fileList = [];
|
|
9194
9232
|
this.createParentUL();
|
|
9195
9233
|
for (var index = 0; index < filesData.length; index++) {
|
|
9196
9234
|
for (var j = 0; j < this.filesData.length; j++) {
|
|
@@ -10030,7 +10068,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
10030
10068
|
Uploader.prototype.templateComplier = function (uploadTemplate) {
|
|
10031
10069
|
if (uploadTemplate) {
|
|
10032
10070
|
try {
|
|
10033
|
-
if (selectAll(uploadTemplate, document).length) {
|
|
10071
|
+
if (typeof uploadTemplate !== 'function' && selectAll(uploadTemplate, document).length) {
|
|
10034
10072
|
return compile(select(uploadTemplate, document).innerHTML.trim());
|
|
10035
10073
|
}
|
|
10036
10074
|
else {
|
|
@@ -12460,23 +12498,12 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12460
12498
|
};
|
|
12461
12499
|
ColorPicker.prototype.paletteKeyDown = function (e) {
|
|
12462
12500
|
var target = e.target;
|
|
12501
|
+
if (!target.classList.contains(PALETTES)) {
|
|
12502
|
+
return;
|
|
12503
|
+
}
|
|
12463
12504
|
var selectedEle;
|
|
12464
12505
|
var idx;
|
|
12465
12506
|
var tiles = [].slice.call(selectAll('.' + TILE, target));
|
|
12466
|
-
if ((target.classList.contains('e-palette') || target.classList.contains('e-tile')) && (e.keyCode === 9 && !e.shiftKey)) {
|
|
12467
|
-
if (this.modeSwitcher || this.showButtons) {
|
|
12468
|
-
this.getPopupEle().querySelector('.e-btn').focus();
|
|
12469
|
-
e.preventDefault();
|
|
12470
|
-
e.stopPropagation();
|
|
12471
|
-
}
|
|
12472
|
-
}
|
|
12473
|
-
else if ((target.classList.contains('e-palette') || target.classList.contains('e-tile')) && (e.keyCode === 9 && e.shiftKey)) {
|
|
12474
|
-
if (this.splitBtn) {
|
|
12475
|
-
this.splitBtn.element.focus();
|
|
12476
|
-
e.preventDefault();
|
|
12477
|
-
e.stopPropagation();
|
|
12478
|
-
}
|
|
12479
|
-
}
|
|
12480
12507
|
var prevSelectedEle = (tiles.filter(function (tile) { return tile.classList.contains('e-selected'); })).pop();
|
|
12481
12508
|
switch (!e.altKey && e.keyCode) {
|
|
12482
12509
|
case 39:
|
|
@@ -13338,10 +13365,8 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13338
13365
|
}
|
|
13339
13366
|
break;
|
|
13340
13367
|
case 'showClearButton':
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
this.bindClearEvent();
|
|
13344
|
-
}
|
|
13368
|
+
Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
|
|
13369
|
+
this.bindClearEvent();
|
|
13345
13370
|
break;
|
|
13346
13371
|
case 'enableRtl':
|
|
13347
13372
|
Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);
|
|
@@ -13727,7 +13752,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13727
13752
|
}
|
|
13728
13753
|
};
|
|
13729
13754
|
TextBox.prototype.bindClearEvent = function () {
|
|
13730
|
-
if (this.showClearButton
|
|
13755
|
+
if (this.showClearButton) {
|
|
13731
13756
|
if (this.enabled) {
|
|
13732
13757
|
EventHandler.add(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
|
|
13733
13758
|
}
|
|
@@ -15296,8 +15321,8 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15296
15321
|
return;
|
|
15297
15322
|
}
|
|
15298
15323
|
var previousValue = this.currentValue;
|
|
15299
|
-
this.updateCurrentValue(currValue);
|
|
15300
15324
|
this.triggerChange(e, currValue);
|
|
15325
|
+
this.updateCurrentValue(currValue);
|
|
15301
15326
|
if (this.showTooltip) {
|
|
15302
15327
|
if (element) {
|
|
15303
15328
|
if (Math.ceil(currValue) !== Math.ceil(previousValue)) {
|
|
@@ -15341,11 +15366,11 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15341
15366
|
}
|
|
15342
15367
|
if (this.fullTemplate && val === 1) {
|
|
15343
15368
|
spanEle.classList.add(FULLTEMPLATE);
|
|
15344
|
-
|
|
15369
|
+
append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate), spanEle);
|
|
15345
15370
|
}
|
|
15346
15371
|
else if (this.emptyTemplate) {
|
|
15347
15372
|
spanEle.classList.add(EMPTYTEMPLATE);
|
|
15348
|
-
|
|
15373
|
+
append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate), spanEle);
|
|
15349
15374
|
}
|
|
15350
15375
|
else {
|
|
15351
15376
|
addClass([spanEle], ICONCSS.split(' '));
|
|
@@ -15355,7 +15380,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15355
15380
|
spanEle.classList.remove(FULLTEMPLATE, EMPTYTEMPLATE);
|
|
15356
15381
|
removeClass([spanEle], ICONCSS.split(' '));
|
|
15357
15382
|
if (spanEle.firstChild) {
|
|
15358
|
-
spanEle.
|
|
15383
|
+
spanEle.innerHTML = '';
|
|
15359
15384
|
}
|
|
15360
15385
|
};
|
|
15361
15386
|
Rating.prototype.updateTooltip = function () {
|
|
@@ -15440,7 +15465,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15440
15465
|
}
|
|
15441
15466
|
this.removeItemContent(spanEle);
|
|
15442
15467
|
spanEle.classList.add(FULLTEMPLATE);
|
|
15443
|
-
|
|
15468
|
+
append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate), spanEle);
|
|
15444
15469
|
}
|
|
15445
15470
|
else if (this.emptyTemplate) {
|
|
15446
15471
|
if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
|
|
@@ -15448,7 +15473,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15448
15473
|
}
|
|
15449
15474
|
this.removeItemContent(spanEle);
|
|
15450
15475
|
spanEle.classList.add(EMPTYTEMPLATE);
|
|
15451
|
-
|
|
15476
|
+
append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate), spanEle);
|
|
15452
15477
|
}
|
|
15453
15478
|
else {
|
|
15454
15479
|
this.removeItemContent(spanEle);
|
|
@@ -15460,25 +15485,32 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15460
15485
|
if (this.isReact) {
|
|
15461
15486
|
this.clearTemplate(['ratingTooltipTemplate']);
|
|
15462
15487
|
}
|
|
15463
|
-
var
|
|
15488
|
+
var content_1;
|
|
15464
15489
|
if (this.tooltipTemplate) {
|
|
15490
|
+
content_1 = this.createElement('span', { className: 'e-rating-tooltip-content' });
|
|
15465
15491
|
var templateFunction = this.getTemplateString(this.tooltipTemplate);
|
|
15466
|
-
|
|
15492
|
+
append(templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate), content_1);
|
|
15493
|
+
this.tooltipObj.setProperties({ content: content_1 }, isChange);
|
|
15467
15494
|
}
|
|
15468
15495
|
else {
|
|
15469
|
-
|
|
15496
|
+
content_1 = this.currentValue.toString();
|
|
15497
|
+
this.tooltipObj.setProperties({ content: initializeCSPTemplate(function () { return content_1; }) }, isChange);
|
|
15470
15498
|
}
|
|
15471
|
-
this.tooltipObj.setProperties({ content: content }, isChange);
|
|
15472
15499
|
this.renderReactTemplates();
|
|
15473
15500
|
}
|
|
15474
15501
|
};
|
|
15475
15502
|
Rating.prototype.getTemplateString = function (template) {
|
|
15476
15503
|
var stringContent = '';
|
|
15477
15504
|
try {
|
|
15478
|
-
|
|
15479
|
-
|
|
15480
|
-
|
|
15481
|
-
|
|
15505
|
+
if (typeof template !== 'function') {
|
|
15506
|
+
var tempEle = select(template);
|
|
15507
|
+
if (tempEle) {
|
|
15508
|
+
//Return innerHTML incase of jsrenderer script else outerHTML
|
|
15509
|
+
stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
|
|
15510
|
+
}
|
|
15511
|
+
else {
|
|
15512
|
+
stringContent = template;
|
|
15513
|
+
}
|
|
15482
15514
|
}
|
|
15483
15515
|
else {
|
|
15484
15516
|
stringContent = template;
|
|
@@ -15509,10 +15541,10 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15509
15541
|
this.clearTemplate(['ratingLabelTemplate']);
|
|
15510
15542
|
}
|
|
15511
15543
|
if (this.spanLabel.firstChild) {
|
|
15512
|
-
this.spanLabel.
|
|
15544
|
+
this.spanLabel.innerHTML = '';
|
|
15513
15545
|
}
|
|
15514
15546
|
var templateFunction = this.getTemplateString(this.labelTemplate);
|
|
15515
|
-
|
|
15547
|
+
append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate), this.spanLabel);
|
|
15516
15548
|
this.renderReactTemplates();
|
|
15517
15549
|
}
|
|
15518
15550
|
else {
|
|
@@ -15600,7 +15632,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15600
15632
|
if (this.showTooltip) {
|
|
15601
15633
|
if (!this.tooltipOpen) {
|
|
15602
15634
|
this.updateTooltipContent(false);
|
|
15603
|
-
this.tooltipObj.open(element);
|
|
15635
|
+
this.tooltipObj.open(element);
|
|
15604
15636
|
this.tooltipOpen = true;
|
|
15605
15637
|
}
|
|
15606
15638
|
else if (isChange) {
|