@progress/kendo-react-inputs 5.4.0-dev.202205250548 → 5.4.0-dev.202206081230
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/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/dist/es/checkbox/Checkbox.d.ts +1 -1
- package/dist/es/checkbox/Checkbox.js +9 -7
- package/dist/es/checkbox/interfaces/CheckboxBlurEvent.js +1 -0
- package/dist/es/checkbox/interfaces/CheckboxChangeEvent.js +1 -0
- package/dist/es/checkbox/interfaces/CheckboxFocusEvent.js +1 -0
- package/dist/es/checkbox/interfaces/CheckboxProps.js +1 -0
- package/dist/es/colors/ColorContrastLabels.js +6 -4
- package/dist/es/colors/ColorContrastSvg.js +3 -1
- package/dist/es/colors/ColorGradient.d.ts +3 -3
- package/dist/es/colors/ColorGradient.js +11 -5
- package/dist/es/colors/ColorInput.js +3 -1
- package/dist/es/colors/ColorPalette.d.ts +6 -3
- package/dist/es/colors/ColorPalette.js +15 -6
- package/dist/es/colors/ColorPicker.d.ts +1 -1
- package/dist/es/colors/ColorPicker.js +4 -4
- package/dist/es/colors/FlatColorPicker.d.ts +1 -1
- package/dist/es/colors/FlatColorPicker.js +25 -24
- package/dist/es/colors/HexInput.d.ts +1 -1
- package/dist/es/colors/HexInput.js +3 -1
- package/dist/es/colors/Picker.js +1 -1
- package/dist/es/colors/interfaces/ColorGradientChangeEvent.js +1 -0
- package/dist/es/colors/interfaces/ColorGradientProps.js +1 -0
- package/dist/es/colors/interfaces/ColorPaletteChangeEvent.js +1 -0
- package/dist/es/colors/interfaces/ColorPaletteProps.js +1 -0
- package/dist/es/colors/interfaces/ColorPickerActiveColorClick.js +1 -0
- package/dist/es/colors/interfaces/ColorPickerBlurEvent.js +1 -0
- package/dist/es/colors/interfaces/ColorPickerChangeEvent.js +1 -0
- package/dist/es/colors/interfaces/ColorPickerFocusEvent.js +1 -0
- package/dist/es/colors/interfaces/ColorPickerGradientSettings.js +1 -0
- package/dist/es/colors/interfaces/ColorPickerPaletteSettings.js +1 -0
- package/dist/es/colors/interfaces/ColorPickerPopupSettings.js +1 -0
- package/dist/es/colors/interfaces/ColorPickerProps.js +1 -0
- package/dist/es/colors/interfaces/ColorPickerView.js +1 -0
- package/dist/es/colors/interfaces/PickerPopupSettings.js +1 -0
- package/dist/es/colors/interfaces/PickerProps.js +1 -0
- package/dist/es/colors/models/hsva.js +1 -0
- package/dist/es/colors/models/output-format.js +1 -0
- package/dist/es/colors/models/rgb.js +1 -0
- package/dist/es/colors/models/rgba.js +1 -0
- package/dist/es/colors/models/table-cell.js +1 -0
- package/dist/es/colors/models/tile-size.js +1 -0
- package/dist/es/colors/utils/color-parser.d.ts +1 -1
- package/dist/es/colors/utils/color-parser.js +2 -2
- package/dist/es/colors/utils/misc.d.ts +1 -1
- package/dist/es/colors/utils/svg-calc.js +4 -4
- package/dist/es/common/SliderTooltip.js +3 -3
- package/dist/es/common/SwitchController.d.ts +3 -3
- package/dist/es/common/SwitchController.js +7 -3
- package/dist/es/common/SwitchModel.d.ts +1 -1
- package/dist/es/input/Input.d.ts +5 -5
- package/dist/es/input/Input.js +15 -10
- package/dist/es/input/interfaces/InputChangeEvent.js +1 -0
- package/dist/es/interfaces/Direction.js +1 -0
- package/dist/es/interfaces/ToggleBaseProps.js +1 -0
- package/dist/es/main.js +31 -0
- package/dist/es/maskedtextbox/MaskedTextBox.d.ts +15 -15
- package/dist/es/maskedtextbox/MaskedTextBox.js +19 -16
- package/dist/es/maskedtextbox/MaskedTextBoxProps.js +1 -0
- package/dist/es/maskedtextbox/masking.service.d.ts +4 -4
- package/dist/es/maskedtextbox/masking.service.js +4 -4
- package/dist/es/maskedtextbox/parsing/parsers.d.ts +2 -2
- package/dist/es/maskedtextbox/parsing/parsers.js +28 -32
- package/dist/es/maskedtextbox/parsing/result.js +1 -1
- package/dist/es/messages/index.d.ts +22 -22
- package/dist/es/numerictextbox/NumericTextBox.d.ts +1 -1
- package/dist/es/numerictextbox/NumericTextBox.js +3 -3
- package/dist/es/numerictextbox/interfaces/NumericTextBoxBlurEvent.js +1 -0
- package/dist/es/numerictextbox/interfaces/NumericTextBoxChangeEvent.js +1 -0
- package/dist/es/numerictextbox/interfaces/NumericTextBoxFocusEvent.js +1 -0
- package/dist/es/numerictextbox/interfaces/NumericTextBoxHandle.js +1 -0
- package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.js +1 -0
- package/dist/es/numerictextbox/interfaces/NumericTextBoxState.js +1 -0
- package/dist/es/numerictextbox/utils/index.d.ts +7 -7
- package/dist/es/numerictextbox/utils/index.js +5 -5
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/RadioButton.d.ts +1 -1
- package/dist/es/radiobutton/RadioButton.js +5 -3
- package/dist/es/radiobutton/RadioGroup.d.ts +1 -1
- package/dist/es/radiobutton/RadioGroup.js +1 -1
- package/dist/es/radiobutton/interfaces/RadioButtonBlurEvent.js +1 -0
- package/dist/es/radiobutton/interfaces/RadioButtonChangeEvent.js +1 -0
- package/dist/es/radiobutton/interfaces/RadioButtonFocusEvent.js +1 -0
- package/dist/es/radiobutton/interfaces/RadioButtonProps.js +1 -0
- package/dist/es/radiobutton/interfaces/RadioGroupChangeEvent.js +1 -0
- package/dist/es/radiobutton/interfaces/RadioGroupFocusEvent.js +1 -0
- package/dist/es/radiobutton/interfaces/RadioGroupProps.js +1 -0
- package/dist/es/range-slider/RangeSlider.d.ts +1 -1
- package/dist/es/range-slider/RangeSlider.js +8 -8
- package/dist/es/range-slider/range-raducer.js +12 -12
- package/dist/es/rating/Rating.d.ts +1 -1
- package/dist/es/rating/Rating.js +16 -13
- package/dist/es/rating/RatingItem.d.ts +1 -1
- package/dist/es/rating/models/index.d.ts +4 -0
- package/dist/es/rating/models/index.js +1 -0
- package/dist/es/rating/utils/index.d.ts +1 -1
- package/dist/es/slider/Slider.d.ts +3 -3
- package/dist/es/slider/Slider.js +7 -3
- package/dist/es/slider/SliderLabel.js +2 -2
- package/dist/es/switch/Switch.d.ts +13 -13
- package/dist/es/switch/Switch.js +18 -13
- package/dist/es/textarea/TextArea.d.ts +1 -1
- package/dist/es/textarea/TextArea.js +9 -7
- package/dist/es/textarea/interfaces/TextAreaBlurEvent.js +1 -0
- package/dist/es/textarea/interfaces/TextAreaChangeEvent.js +1 -0
- package/dist/es/textarea/interfaces/TextAreaFocusEvent.js +1 -0
- package/dist/es/textarea/interfaces/TextAreaProps.js +1 -0
- package/dist/es/utils.js +10 -1
- package/dist/npm/checkbox/Checkbox.d.ts +1 -1
- package/dist/npm/checkbox/Checkbox.js +20 -17
- package/dist/npm/colors/ColorContrastLabels.js +10 -7
- package/dist/npm/colors/ColorContrastSvg.js +10 -7
- package/dist/npm/colors/ColorGradient.d.ts +3 -3
- package/dist/npm/colors/ColorGradient.js +42 -35
- package/dist/npm/colors/ColorInput.js +6 -4
- package/dist/npm/colors/ColorPalette.d.ts +6 -3
- package/dist/npm/colors/ColorPalette.js +25 -15
- package/dist/npm/colors/ColorPicker.d.ts +1 -1
- package/dist/npm/colors/ColorPicker.js +14 -13
- package/dist/npm/colors/FlatColorPicker.d.ts +1 -1
- package/dist/npm/colors/FlatColorPicker.js +28 -26
- package/dist/npm/colors/HexInput.d.ts +1 -1
- package/dist/npm/colors/HexInput.js +6 -4
- package/dist/npm/colors/Picker.js +4 -2
- package/dist/npm/colors/models/palette-presets.js +1 -0
- package/dist/npm/colors/utils/color-cache.js +1 -0
- package/dist/npm/colors/utils/color-palette.service.js +7 -6
- package/dist/npm/colors/utils/color-parser.d.ts +1 -1
- package/dist/npm/colors/utils/color-parser.js +47 -36
- package/dist/npm/colors/utils/misc.d.ts +1 -1
- package/dist/npm/colors/utils/misc.js +6 -3
- package/dist/npm/colors/utils/svg-calc.js +13 -8
- package/dist/npm/common/SliderTooltip.js +7 -5
- package/dist/npm/common/SwitchController.d.ts +3 -3
- package/dist/npm/common/SwitchController.js +7 -3
- package/dist/npm/common/SwitchModel.d.ts +1 -1
- package/dist/npm/input/Input.d.ts +5 -5
- package/dist/npm/input/Input.js +21 -15
- package/dist/npm/main.js +69 -26
- package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +15 -15
- package/dist/npm/maskedtextbox/MaskedTextBox.js +26 -22
- package/dist/npm/maskedtextbox/masking.service.d.ts +4 -4
- package/dist/npm/maskedtextbox/masking.service.js +24 -23
- package/dist/npm/maskedtextbox/parsing/combinators.js +5 -2
- package/dist/npm/maskedtextbox/parsing/parsers.d.ts +2 -2
- package/dist/npm/maskedtextbox/parsing/parsers.js +41 -37
- package/dist/npm/maskedtextbox/parsing/result.js +2 -1
- package/dist/npm/maskedtextbox/parsing/stream.js +1 -0
- package/dist/npm/maskedtextbox/utils.js +1 -0
- package/dist/npm/messages/index.d.ts +22 -22
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/numerictextbox/NumericTextBox.d.ts +1 -1
- package/dist/npm/numerictextbox/NumericTextBox.js +32 -31
- package/dist/npm/numerictextbox/utils/index.d.ts +7 -7
- package/dist/npm/numerictextbox/utils/index.js +118 -89
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/radiobutton/RadioButton.d.ts +1 -1
- package/dist/npm/radiobutton/RadioButton.js +15 -12
- package/dist/npm/radiobutton/RadioGroup.d.ts +1 -1
- package/dist/npm/radiobutton/RadioGroup.js +12 -11
- package/dist/npm/range-slider/RangeSlider.d.ts +1 -1
- package/dist/npm/range-slider/RangeSlider.js +18 -17
- package/dist/npm/range-slider/range-raducer.js +15 -13
- package/dist/npm/rating/Rating.d.ts +1 -1
- package/dist/npm/rating/Rating.js +37 -33
- package/dist/npm/rating/RatingItem.d.ts +1 -1
- package/dist/npm/rating/RatingItem.js +3 -2
- package/dist/npm/rating/models/index.d.ts +4 -0
- package/dist/npm/rating/rating-reducer.js +7 -5
- package/dist/npm/rating/utils/index.d.ts +1 -1
- package/dist/npm/rating/utils/index.js +18 -11
- package/dist/npm/slider/Slider.d.ts +3 -3
- package/dist/npm/slider/Slider.js +15 -10
- package/dist/npm/slider/SliderLabel.js +6 -4
- package/dist/npm/switch/Switch.d.ts +13 -13
- package/dist/npm/switch/Switch.js +29 -23
- package/dist/npm/textarea/TextArea.d.ts +1 -1
- package/dist/npm/textarea/TextArea.js +18 -15
- package/dist/npm/utils.js +11 -1
- package/dist/systemjs/kendo-react-inputs.js +1 -1
- package/package.json +15 -15
- package/dist/es/switch/util.d.ts +0 -8
- package/dist/es/switch/util.js +0 -46
- package/dist/npm/switch/util.d.ts +0 -8
- package/dist/npm/switch/util.js +0 -48
|
@@ -15,6 +15,10 @@ var SwitchController = /** @class */ (function () {
|
|
|
15
15
|
if (updateView === void 0) { updateView = noop; }
|
|
16
16
|
if (onChange === void 0) { onChange = noop; }
|
|
17
17
|
var _this = this;
|
|
18
|
+
this._checked = false;
|
|
19
|
+
this.reverse = false;
|
|
20
|
+
this.lastPressX = 0;
|
|
21
|
+
this.originalPressX = 0;
|
|
18
22
|
this.overrideChecked = function (checked) {
|
|
19
23
|
_this._checked = checked;
|
|
20
24
|
};
|
|
@@ -91,7 +95,7 @@ var SwitchController = /** @class */ (function () {
|
|
|
91
95
|
get: function () {
|
|
92
96
|
return this._checked;
|
|
93
97
|
},
|
|
94
|
-
enumerable:
|
|
98
|
+
enumerable: false,
|
|
95
99
|
configurable: true
|
|
96
100
|
});
|
|
97
101
|
SwitchController.prototype.updateModel = function (position, animate) {
|
|
@@ -103,14 +107,14 @@ var SwitchController = /** @class */ (function () {
|
|
|
103
107
|
get: function () {
|
|
104
108
|
return this.wrapperOffset - this.handleOffset - this.handleMargin;
|
|
105
109
|
},
|
|
106
|
-
enumerable:
|
|
110
|
+
enumerable: false,
|
|
107
111
|
configurable: true
|
|
108
112
|
});
|
|
109
113
|
Object.defineProperty(SwitchController.prototype, "checked", {
|
|
110
114
|
get: function () {
|
|
111
115
|
return this._checked;
|
|
112
116
|
},
|
|
113
|
-
enumerable:
|
|
117
|
+
enumerable: false,
|
|
114
118
|
configurable: true
|
|
115
119
|
});
|
|
116
120
|
return SwitchController;
|
package/dist/es/input/Input.d.ts
CHANGED
|
@@ -77,23 +77,23 @@ export declare class InputWithoutContext extends React.Component<InputProps, Inp
|
|
|
77
77
|
/**
|
|
78
78
|
* Gets the native input element of the Input component.
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
get element(): HTMLInputElement | null;
|
|
81
81
|
/**
|
|
82
82
|
* Gets the value of the Input.
|
|
83
83
|
*/
|
|
84
|
-
|
|
84
|
+
get value(): string | string[] | number | undefined;
|
|
85
85
|
/**
|
|
86
86
|
* Gets the `name` property of the Input.
|
|
87
87
|
*/
|
|
88
|
-
|
|
88
|
+
get name(): string | undefined;
|
|
89
89
|
/**
|
|
90
90
|
* Represents the validity state into which the Input is set.
|
|
91
91
|
*/
|
|
92
|
-
|
|
92
|
+
get validity(): FormComponentValidity;
|
|
93
93
|
/**
|
|
94
94
|
* @hidden
|
|
95
95
|
*/
|
|
96
|
-
protected
|
|
96
|
+
protected get validityStyles(): boolean;
|
|
97
97
|
/**
|
|
98
98
|
* @hidden
|
|
99
99
|
*/
|
package/dist/es/input/Input.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -27,8 +29,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
29
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
30
|
t[p] = s[p];
|
|
29
31
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
31
|
-
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
32
36
|
return t;
|
|
33
37
|
};
|
|
34
38
|
import * as React from 'react';
|
|
@@ -42,6 +46,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
42
46
|
__extends(InputWithoutContext, _super);
|
|
43
47
|
function InputWithoutContext(props) {
|
|
44
48
|
var _this = _super.call(this, props) || this;
|
|
49
|
+
_this._input = null;
|
|
45
50
|
_this._inputId = guid();
|
|
46
51
|
/**
|
|
47
52
|
* @hidden
|
|
@@ -55,7 +60,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
55
60
|
var result = false;
|
|
56
61
|
for (var prop in state) {
|
|
57
62
|
if (state.hasOwnProperty(prop)) {
|
|
58
|
-
result = result || state[prop];
|
|
63
|
+
result = result || Boolean(state[prop]);
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
66
|
return result;
|
|
@@ -112,7 +117,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
112
117
|
get: function () {
|
|
113
118
|
return this._input;
|
|
114
119
|
},
|
|
115
|
-
enumerable:
|
|
120
|
+
enumerable: false,
|
|
116
121
|
configurable: true
|
|
117
122
|
});
|
|
118
123
|
Object.defineProperty(InputWithoutContext.prototype, "value", {
|
|
@@ -126,7 +131,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
126
131
|
? this.props.value
|
|
127
132
|
: this.state.value;
|
|
128
133
|
},
|
|
129
|
-
enumerable:
|
|
134
|
+
enumerable: false,
|
|
130
135
|
configurable: true
|
|
131
136
|
});
|
|
132
137
|
Object.defineProperty(InputWithoutContext.prototype, "name", {
|
|
@@ -136,7 +141,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
136
141
|
get: function () {
|
|
137
142
|
return this.props.name;
|
|
138
143
|
},
|
|
139
|
-
enumerable:
|
|
144
|
+
enumerable: false,
|
|
140
145
|
configurable: true
|
|
141
146
|
});
|
|
142
147
|
Object.defineProperty(InputWithoutContext.prototype, "validity", {
|
|
@@ -156,13 +161,13 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
156
161
|
typeMismatch: this._input ? this._input.validity.typeMismatch : false,
|
|
157
162
|
valueMissing: this._input ? this._input.validity.valueMissing : false
|
|
158
163
|
};
|
|
159
|
-
return __assign({}, result, { customError: this.props.validationMessage !== undefined, valid: this.props.valid !== undefined
|
|
164
|
+
return __assign(__assign({}, result), { customError: this.props.validationMessage !== undefined, valid: this.props.valid !== undefined
|
|
160
165
|
? this.props.valid
|
|
161
166
|
: this._input
|
|
162
167
|
? !this.isInvalid(result)
|
|
163
168
|
: true });
|
|
164
169
|
},
|
|
165
|
-
enumerable:
|
|
170
|
+
enumerable: false,
|
|
166
171
|
configurable: true
|
|
167
172
|
});
|
|
168
173
|
Object.defineProperty(InputWithoutContext.prototype, "validityStyles", {
|
|
@@ -174,7 +179,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
174
179
|
? this.props.validityStyles
|
|
175
180
|
: InputWithoutContext.defaultProps.validityStyles;
|
|
176
181
|
},
|
|
177
|
-
enumerable:
|
|
182
|
+
enumerable: false,
|
|
178
183
|
configurable: true
|
|
179
184
|
});
|
|
180
185
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/es/main.js
CHANGED
|
@@ -1,17 +1,48 @@
|
|
|
1
1
|
export { ColorGradient, ColorGradientPropsContext } from './colors/ColorGradient';
|
|
2
2
|
export { ColorPalette, ColorPalettePropsContext } from './colors/ColorPalette';
|
|
3
3
|
export * from './colors/ColorPicker';
|
|
4
|
+
export * from './colors/interfaces/ColorGradientChangeEvent';
|
|
5
|
+
export * from './colors/interfaces/ColorGradientProps';
|
|
6
|
+
export * from './colors/interfaces/ColorPaletteChangeEvent';
|
|
7
|
+
export * from './colors/interfaces/ColorPaletteProps';
|
|
8
|
+
export * from './colors/interfaces/ColorPickerBlurEvent';
|
|
9
|
+
export * from './colors/interfaces/ColorPickerChangeEvent';
|
|
10
|
+
export * from './colors/interfaces/ColorPickerFocusEvent';
|
|
11
|
+
export * from './colors/interfaces/ColorPickerGradientSettings';
|
|
12
|
+
export * from './colors/interfaces/ColorPickerPaletteSettings';
|
|
13
|
+
export * from './colors/interfaces/ColorPickerPopupSettings';
|
|
14
|
+
export * from './colors/interfaces/ColorPickerProps';
|
|
4
15
|
export * from './colors/FlatColorPicker';
|
|
5
16
|
export { Input, InputPropsContext } from './input/Input';
|
|
6
17
|
export { MaskedTextBox, MaskedTextBoxPropsContext } from './maskedtextbox/MaskedTextBox';
|
|
18
|
+
export * from './maskedtextbox/MaskedTextBoxProps';
|
|
7
19
|
export * from './numerictextbox/NumericTextBox';
|
|
20
|
+
export * from './numerictextbox/interfaces/NumericTextBoxHandle';
|
|
21
|
+
export * from './numerictextbox/interfaces/NumericTextBoxChangeEvent';
|
|
22
|
+
export * from './numerictextbox/interfaces/NumericTextBoxBlurEvent';
|
|
23
|
+
export * from './numerictextbox/interfaces/NumericTextBoxFocusEvent';
|
|
24
|
+
export * from './numerictextbox/interfaces/NumericTextBoxProps';
|
|
8
25
|
export { Slider, SliderPropsContext } from './slider/Slider';
|
|
9
26
|
export * from './slider/SliderLabel';
|
|
10
27
|
export * from './range-slider/RangeSlider';
|
|
28
|
+
export * from './interfaces/ToggleBaseProps';
|
|
11
29
|
export { Switch, SwitchPropsContext } from './switch/Switch';
|
|
30
|
+
export * from './checkbox/interfaces/CheckboxProps';
|
|
31
|
+
export * from './checkbox/interfaces/CheckboxChangeEvent';
|
|
32
|
+
export * from './checkbox/interfaces/CheckboxFocusEvent';
|
|
12
33
|
export * from './checkbox/Checkbox';
|
|
13
34
|
export * from './radiobutton/RadioGroup';
|
|
35
|
+
export * from './radiobutton/interfaces/RadioGroupProps';
|
|
36
|
+
export * from './radiobutton/interfaces/RadioGroupChangeEvent';
|
|
37
|
+
export * from './radiobutton/interfaces/RadioGroupFocusEvent';
|
|
14
38
|
export * from './radiobutton/RadioButton';
|
|
39
|
+
export * from './radiobutton/interfaces/RadioButtonProps';
|
|
40
|
+
export * from './radiobutton/interfaces/RadioButtonChangeEvent';
|
|
41
|
+
export * from './radiobutton/interfaces/RadioButtonFocusEvent';
|
|
15
42
|
export * from './textarea/TextArea';
|
|
43
|
+
export * from './textarea/interfaces/TextAreaProps';
|
|
44
|
+
export * from './textarea/interfaces/TextAreaChangeEvent';
|
|
45
|
+
export * from './textarea/interfaces/TextAreaFocusEvent';
|
|
16
46
|
export * from './rating/Rating';
|
|
17
47
|
export * from './rating/RatingItem';
|
|
48
|
+
export * from './rating/models/index';
|
|
@@ -36,7 +36,7 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
|
|
|
36
36
|
includeLiterals: PropTypes.Requireable<boolean>;
|
|
37
37
|
maskValidation: PropTypes.Requireable<boolean>;
|
|
38
38
|
mask: PropTypes.Requireable<string>;
|
|
39
|
-
rules: (props: MaskedTextBoxProps, propName: string, componentName: string) => Error;
|
|
39
|
+
rules: (props: MaskedTextBoxProps, propName: string, componentName: string) => Error | null;
|
|
40
40
|
selection: PropTypes.Requireable<PropTypes.InferProps<{
|
|
41
41
|
start: PropTypes.Validator<number>;
|
|
42
42
|
end: PropTypes.Validator<number>;
|
|
@@ -48,9 +48,9 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
|
|
|
48
48
|
valid: PropTypes.Requireable<boolean>;
|
|
49
49
|
validityStyles: PropTypes.Requireable<boolean>;
|
|
50
50
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
-
size: PropTypes.Requireable<"small" | "medium" | "large">;
|
|
52
|
-
rounded: PropTypes.Requireable<"small" | "medium" | "
|
|
53
|
-
fillMode: PropTypes.Requireable<"
|
|
51
|
+
size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
|
|
52
|
+
rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
|
|
53
|
+
fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
56
|
* @hidden
|
|
@@ -65,9 +65,9 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
|
|
|
65
65
|
};
|
|
66
66
|
required: boolean;
|
|
67
67
|
validityStyles: boolean;
|
|
68
|
-
size: "small" | "medium" | "large";
|
|
69
|
-
rounded: "small" | "medium" | "
|
|
70
|
-
fillMode: "
|
|
68
|
+
size: "small" | "medium" | "large" | null | undefined;
|
|
69
|
+
rounded: "small" | "medium" | "full" | "large" | null | undefined;
|
|
70
|
+
fillMode: "flat" | "outline" | "solid" | null | undefined;
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
73
73
|
* @hidden
|
|
@@ -115,31 +115,31 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
|
|
|
115
115
|
* );
|
|
116
116
|
* ```
|
|
117
117
|
*/
|
|
118
|
-
|
|
118
|
+
get element(): HTMLInputElement | null;
|
|
119
119
|
/**
|
|
120
120
|
* Gets the value with the mask of the MaskedTextBox.
|
|
121
121
|
*/
|
|
122
|
-
|
|
122
|
+
get value(): string;
|
|
123
123
|
/**
|
|
124
124
|
* Gets the raw value without the mask of the MaskedTextBox.
|
|
125
125
|
*/
|
|
126
|
-
|
|
126
|
+
get rawValue(): string;
|
|
127
127
|
/**
|
|
128
128
|
* Represents the validity state into which the MaskedTextBox is set.
|
|
129
129
|
*/
|
|
130
|
-
|
|
130
|
+
get validity(): FormComponentValidity;
|
|
131
131
|
/**
|
|
132
132
|
* @hidden
|
|
133
133
|
*/
|
|
134
|
-
protected
|
|
134
|
+
protected get validityStyles(): boolean;
|
|
135
135
|
/**
|
|
136
136
|
* @hidden
|
|
137
137
|
*/
|
|
138
|
-
protected
|
|
138
|
+
protected get required(): boolean;
|
|
139
139
|
/**
|
|
140
140
|
* Gets the `name` property of the MaskedTextBox.
|
|
141
141
|
*/
|
|
142
|
-
|
|
142
|
+
get name(): string | undefined;
|
|
143
143
|
/**
|
|
144
144
|
* @hidden
|
|
145
145
|
*/
|
|
@@ -158,7 +158,7 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
|
|
|
158
158
|
private blurHandler;
|
|
159
159
|
private triggerOnChange;
|
|
160
160
|
private updateService;
|
|
161
|
-
private
|
|
161
|
+
private get rules();
|
|
162
162
|
private setValidity;
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -39,7 +41,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
39
41
|
* @hidden
|
|
40
42
|
*/
|
|
41
43
|
_this.state = {};
|
|
42
|
-
_this._inputId = "k-"
|
|
44
|
+
_this._inputId = "k-".concat(guid());
|
|
43
45
|
_this._service = new MaskingService();
|
|
44
46
|
_this._isPasted = false;
|
|
45
47
|
_this._selection = [null, null];
|
|
@@ -154,7 +156,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
154
156
|
get: function () {
|
|
155
157
|
return this._input;
|
|
156
158
|
},
|
|
157
|
-
enumerable:
|
|
159
|
+
enumerable: false,
|
|
158
160
|
configurable: true
|
|
159
161
|
});
|
|
160
162
|
Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "value", {
|
|
@@ -176,7 +178,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
176
178
|
}
|
|
177
179
|
return '';
|
|
178
180
|
},
|
|
179
|
-
enumerable:
|
|
181
|
+
enumerable: false,
|
|
180
182
|
configurable: true
|
|
181
183
|
});
|
|
182
184
|
Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "rawValue", {
|
|
@@ -186,7 +188,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
186
188
|
get: function () {
|
|
187
189
|
return this._service.rawValue(this.value);
|
|
188
190
|
},
|
|
189
|
-
enumerable:
|
|
191
|
+
enumerable: false,
|
|
190
192
|
configurable: true
|
|
191
193
|
});
|
|
192
194
|
Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "validity", {
|
|
@@ -206,7 +208,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
206
208
|
valueMissing: !value
|
|
207
209
|
};
|
|
208
210
|
},
|
|
209
|
-
enumerable:
|
|
211
|
+
enumerable: false,
|
|
210
212
|
configurable: true
|
|
211
213
|
});
|
|
212
214
|
Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "validityStyles", {
|
|
@@ -218,7 +220,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
218
220
|
? this.props.validityStyles
|
|
219
221
|
: MaskedTextBoxWithoutContext.defaultProps.validityStyles;
|
|
220
222
|
},
|
|
221
|
-
enumerable:
|
|
223
|
+
enumerable: false,
|
|
222
224
|
configurable: true
|
|
223
225
|
});
|
|
224
226
|
Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "required", {
|
|
@@ -230,7 +232,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
230
232
|
? this.props.required
|
|
231
233
|
: MaskedTextBoxWithoutContext.defaultProps.required;
|
|
232
234
|
},
|
|
233
|
-
enumerable:
|
|
235
|
+
enumerable: false,
|
|
234
236
|
configurable: true
|
|
235
237
|
});
|
|
236
238
|
Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "name", {
|
|
@@ -240,7 +242,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
240
242
|
get: function () {
|
|
241
243
|
return this.props.name;
|
|
242
244
|
},
|
|
243
|
-
enumerable:
|
|
245
|
+
enumerable: false,
|
|
244
246
|
configurable: true
|
|
245
247
|
});
|
|
246
248
|
/**
|
|
@@ -277,16 +279,16 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
277
279
|
* @hidden
|
|
278
280
|
*/
|
|
279
281
|
MaskedTextBoxWithoutContext.prototype.render = function () {
|
|
280
|
-
var _this = this;
|
|
281
282
|
var _a;
|
|
283
|
+
var _this = this;
|
|
282
284
|
var _b = this.props, _c = _b.size, size = _c === void 0 ? MaskedTextBoxWithoutContext.defaultProps.size : _c, _d = _b.fillMode, fillMode = _d === void 0 ? MaskedTextBoxWithoutContext.defaultProps.fillMode : _d, _e = _b.rounded, rounded = _e === void 0 ? MaskedTextBoxWithoutContext.defaultProps.rounded : _e;
|
|
283
285
|
var inputId = this.props.id || this._inputId;
|
|
284
286
|
var isValid = !this.validityStyles || this.validity.valid;
|
|
285
287
|
var style = this.props.style || {};
|
|
286
288
|
var component = (React.createElement("span", { dir: this.props.dir, className: classNames('k-maskedtextbox k-input', (_a = {},
|
|
287
|
-
_a["k-input-"
|
|
288
|
-
_a["k-input-"
|
|
289
|
-
_a["k-rounded-"
|
|
289
|
+
_a["k-input-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
290
|
+
_a["k-input-".concat(fillMode)] = fillMode,
|
|
291
|
+
_a["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
290
292
|
_a['k-invalid'] = !isValid,
|
|
291
293
|
_a['k-required'] = this.required,
|
|
292
294
|
_a['k-disabled'] = this.props.disabled,
|
|
@@ -303,14 +305,15 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
303
305
|
});
|
|
304
306
|
if (this.props.onChange) {
|
|
305
307
|
this._valueDuringOnChange = maskedValue;
|
|
306
|
-
|
|
308
|
+
var ev = {
|
|
307
309
|
syntheticEvent: event,
|
|
308
310
|
nativeEvent: event.nativeEvent,
|
|
309
311
|
selectionStart: this._selection[0],
|
|
310
312
|
selectionEnd: this._selection[1],
|
|
311
313
|
target: this,
|
|
312
314
|
value: this.value
|
|
313
|
-
}
|
|
315
|
+
};
|
|
316
|
+
this.props.onChange.call(undefined, ev);
|
|
314
317
|
this._valueDuringOnChange = undefined;
|
|
315
318
|
}
|
|
316
319
|
};
|
|
@@ -328,7 +331,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
328
331
|
get: function () {
|
|
329
332
|
return Object.assign({}, defaultRules, this.props.rules);
|
|
330
333
|
},
|
|
331
|
-
enumerable:
|
|
334
|
+
enumerable: false,
|
|
332
335
|
configurable: true
|
|
333
336
|
});
|
|
334
337
|
MaskedTextBoxWithoutContext.displayName = 'MaskedTextBox';
|
|
@@ -25,16 +25,16 @@ export declare class MaskingService {
|
|
|
25
25
|
private maskRemoved;
|
|
26
26
|
private adjustPosition;
|
|
27
27
|
private maskInserted;
|
|
28
|
-
protected
|
|
28
|
+
protected get maskTokenCreator(): {
|
|
29
29
|
[key: string]: Function;
|
|
30
30
|
};
|
|
31
|
-
protected
|
|
31
|
+
protected get unmaskTokenCreator(): {
|
|
32
32
|
[key: string]: Function;
|
|
33
33
|
};
|
|
34
|
-
protected
|
|
34
|
+
protected get rawTokenCreator(): {
|
|
35
35
|
[key: string]: Function;
|
|
36
36
|
};
|
|
37
|
-
protected
|
|
37
|
+
protected get validationTokenCreator(): {
|
|
38
38
|
[key: string]: Function;
|
|
39
39
|
};
|
|
40
40
|
private tokenize;
|
|
@@ -142,7 +142,7 @@ var MaskingService = /** @class */ (function () {
|
|
|
142
142
|
mask: function (rule) { return maskParser({ prompt: prompt, promptPlaceholder: promptPlaceholder })(rule); }
|
|
143
143
|
};
|
|
144
144
|
},
|
|
145
|
-
enumerable:
|
|
145
|
+
enumerable: false,
|
|
146
146
|
configurable: true
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(MaskingService.prototype, "unmaskTokenCreator", {
|
|
@@ -153,7 +153,7 @@ var MaskingService = /** @class */ (function () {
|
|
|
153
153
|
mask: function (rule) { return unmask(_this.prompt)(rule); }
|
|
154
154
|
};
|
|
155
155
|
},
|
|
156
|
-
enumerable:
|
|
156
|
+
enumerable: false,
|
|
157
157
|
configurable: true
|
|
158
158
|
});
|
|
159
159
|
Object.defineProperty(MaskingService.prototype, "rawTokenCreator", {
|
|
@@ -164,7 +164,7 @@ var MaskingService = /** @class */ (function () {
|
|
|
164
164
|
mask: function (_) { return rawMask({ prompt: prompt, promptPlaceholder: promptPlaceholder }); }
|
|
165
165
|
};
|
|
166
166
|
},
|
|
167
|
-
enumerable:
|
|
167
|
+
enumerable: false,
|
|
168
168
|
configurable: true
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(MaskingService.prototype, "validationTokenCreator", {
|
|
@@ -175,7 +175,7 @@ var MaskingService = /** @class */ (function () {
|
|
|
175
175
|
mask: function (_) { return rawMask({ prompt: prompt, promptPlaceholder: '' }); }
|
|
176
176
|
};
|
|
177
177
|
},
|
|
178
|
-
enumerable:
|
|
178
|
+
enumerable: false,
|
|
179
179
|
configurable: true
|
|
180
180
|
});
|
|
181
181
|
MaskingService.prototype.tokenize = function () {
|
|
@@ -14,7 +14,7 @@ export declare class Parser {
|
|
|
14
14
|
/**
|
|
15
15
|
* @hidden
|
|
16
16
|
*/
|
|
17
|
-
export declare const mask: (
|
|
17
|
+
export declare const mask: (args: {
|
|
18
18
|
prompt: any;
|
|
19
19
|
promptPlaceholder: any;
|
|
20
20
|
}) => (rule: any) => Parser;
|
|
@@ -37,7 +37,7 @@ export declare const token: (rules: any, creator: any) => Parser;
|
|
|
37
37
|
/**
|
|
38
38
|
* @hidden
|
|
39
39
|
*/
|
|
40
|
-
export declare const rawMask: (
|
|
40
|
+
export declare const rawMask: (args: {
|
|
41
41
|
prompt: any;
|
|
42
42
|
promptPlaceholder: any;
|
|
43
43
|
}) => Parser;
|
|
@@ -37,29 +37,27 @@ export { Parser };
|
|
|
37
37
|
/**
|
|
38
38
|
* @hidden
|
|
39
39
|
*/
|
|
40
|
-
export var mask = function (
|
|
41
|
-
var prompt =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return new Result(prompt, stream, ResultType.Mask);
|
|
48
|
-
}
|
|
49
|
-
if (rule.test(char)) {
|
|
50
|
-
stream.eat();
|
|
51
|
-
return new Result(char, stream, ResultType.Mask);
|
|
52
|
-
}
|
|
53
|
-
if (char === promptPlaceholder) {
|
|
54
|
-
stream.eat();
|
|
55
|
-
return new Result(prompt, stream, ResultType.Mask);
|
|
56
|
-
}
|
|
57
|
-
stream.eat_input();
|
|
40
|
+
export var mask = function (args) { return function (rule) { return new Parser(function (stream) {
|
|
41
|
+
var prompt = args.prompt, promptPlaceholder = args.promptPlaceholder;
|
|
42
|
+
while (!stream.eof()) {
|
|
43
|
+
var _a = stream.peek(), char = _a.char, control = _a.control;
|
|
44
|
+
if (char === control && control === prompt) {
|
|
45
|
+
stream.eat();
|
|
46
|
+
return new Result(prompt, stream, ResultType.Mask);
|
|
58
47
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
48
|
+
if (rule.test(char)) {
|
|
49
|
+
stream.eat();
|
|
50
|
+
return new Result(char, stream, ResultType.Mask);
|
|
51
|
+
}
|
|
52
|
+
if (char === promptPlaceholder) {
|
|
53
|
+
stream.eat();
|
|
54
|
+
return new Result(prompt, stream, ResultType.Mask);
|
|
55
|
+
}
|
|
56
|
+
stream.eat_input();
|
|
57
|
+
}
|
|
58
|
+
stream.eat();
|
|
59
|
+
return new Result(prompt, stream, ResultType.Mask);
|
|
60
|
+
}); }; };
|
|
63
61
|
/**
|
|
64
62
|
* @hidden
|
|
65
63
|
*/
|
|
@@ -132,16 +130,14 @@ export var token = function (rules, creator) { return new Parser(function (strea
|
|
|
132
130
|
/**
|
|
133
131
|
* @hidden
|
|
134
132
|
*/
|
|
135
|
-
export var rawMask = function (
|
|
136
|
-
var prompt =
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
});
|
|
144
|
-
};
|
|
133
|
+
export var rawMask = function (args) { return new Parser(function (stream) {
|
|
134
|
+
var prompt = args.prompt, promptPlaceholder = args.promptPlaceholder;
|
|
135
|
+
var char = stream.next().char;
|
|
136
|
+
if (char === prompt) {
|
|
137
|
+
return new Result(promptPlaceholder, stream);
|
|
138
|
+
}
|
|
139
|
+
return new Result(char, stream);
|
|
140
|
+
}); };
|
|
145
141
|
/**
|
|
146
142
|
* @hidden
|
|
147
143
|
*/
|
|
@@ -32,7 +32,7 @@ var Result = /** @class */ (function () {
|
|
|
32
32
|
return this.map(function (vs, _) { return r.chain(function (v, __) { return vs.concat([v]); }); });
|
|
33
33
|
};
|
|
34
34
|
Result.prototype.toString = function () {
|
|
35
|
-
return "Result({ value: '"
|
|
35
|
+
return "Result({ value: '".concat(this.value, "', rest: ").concat(this.rest, " })");
|
|
36
36
|
};
|
|
37
37
|
return Result;
|
|
38
38
|
}());
|
|
@@ -90,26 +90,26 @@ export declare const colorPickerDropdownButtonAriaLabel = "colorPicker.dropdownB
|
|
|
90
90
|
* @hidden
|
|
91
91
|
*/
|
|
92
92
|
export declare const messages: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
93
|
+
"numerictextbox.increment": string;
|
|
94
|
+
"numerictextbox.decrement": string;
|
|
95
|
+
"slider.increment": string;
|
|
96
|
+
"slider.decrement": string;
|
|
97
|
+
"slider.dragTitle": string;
|
|
98
|
+
"colorGradient.r": string;
|
|
99
|
+
"colorGradient.g": string;
|
|
100
|
+
"colorGradient.b": string;
|
|
101
|
+
"colorGradient.a": string;
|
|
102
|
+
"colorGradient.hex": string;
|
|
103
|
+
"colorGradient.contrastRatio": string;
|
|
104
|
+
"colorGradient.colorGradientAALevel": string;
|
|
105
|
+
"colorGradient.colorGradientAAALevel": string;
|
|
106
|
+
"colorGradient.colorGradientPass": string;
|
|
107
|
+
"colorGradient.colorGradientFail": string;
|
|
108
|
+
"flatColorPicker.cancelBtn": string;
|
|
109
|
+
"flatColorPicker.applyBtn": string;
|
|
110
|
+
"checkbox.validation": string;
|
|
111
|
+
"checkbox.optionalText": string;
|
|
112
|
+
"radioButton.validation": string;
|
|
113
|
+
"switch.validation": string;
|
|
114
|
+
"colorPicker.dropdownButtonAriaLabel": string;
|
|
115
115
|
};
|