@progress/kendo-vue-inputs 3.3.4 → 3.3.5-dev.202206141337
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-vue-inputs.js +1 -1
- package/dist/es/additionalTypes.ts +11 -0
- package/dist/es/checkbox/Checkbox.d.ts +7 -1
- package/dist/es/checkbox/Checkbox.js +8 -0
- package/dist/es/colors/ColorPalette.d.ts +6 -0
- package/dist/es/colors/ColorPalette.js +8 -1
- package/dist/es/colors/ColorPicker.d.ts +6 -0
- package/dist/es/colors/ColorPicker.js +8 -1
- package/dist/es/colors/Picker.d.ts +6 -0
- package/dist/es/colors/Picker.js +8 -1
- package/dist/es/colors/interfaces/ColorPaletteChangeEvent.d.ts +3 -0
- package/dist/es/colors/interfaces/ColorPaletteProps.d.ts +4 -13
- package/dist/es/colors/interfaces/ColorPickerActiveColorClick.d.ts +3 -0
- package/dist/es/colors/interfaces/ColorPickerBlurEvent.d.ts +3 -0
- package/dist/es/colors/interfaces/ColorPickerChangeEvent.d.ts +3 -0
- package/dist/es/colors/interfaces/ColorPickerFocusEvent.d.ts +3 -0
- package/dist/es/colors/interfaces/ColorPickerPaletteSettings.d.ts +3 -0
- package/dist/es/colors/interfaces/ColorPickerPopupSettings.d.ts +3 -0
- package/dist/es/colors/interfaces/ColorPickerProps.d.ts +5 -2
- package/dist/es/colors/interfaces/ColorPickerView.d.ts +3 -0
- package/dist/es/input/Input.d.ts +19 -9
- package/dist/es/input/Input.js +19 -3
- package/dist/es/input-separator/InputSeparator.d.ts +19 -0
- package/dist/es/input-separator/InputSeparator.js +35 -0
- package/dist/es/main.d.ts +1 -0
- package/dist/es/main.js +1 -0
- package/dist/es/maskedtextbox/MaskedTextBox.d.ts +4 -1
- package/dist/es/maskedtextbox/MaskedTextBox.js +95 -20
- package/dist/es/maskedtextbox/MaskedTextBoxProps.d.ts +32 -0
- package/dist/es/numerictextbox/NumericTextBox.d.ts +6 -0
- package/dist/es/numerictextbox/NumericTextBox.js +101 -8
- package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.d.ts +43 -3
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/RadioButton.d.ts +7 -1
- package/dist/es/radiobutton/RadioButton.js +8 -0
- package/dist/es/radiobutton/RadioGroup.d.ts +7 -1
- package/dist/es/radiobutton/RadioGroup.js +8 -0
- package/dist/es/range-slider/RangeSlider.d.ts +8 -0
- package/dist/es/range-slider/RangeSlider.js +10 -0
- package/dist/es/slider/Slider.d.ts +8 -2
- package/dist/es/slider/Slider.js +8 -0
- package/dist/es/slider/SliderLabel.d.ts +8 -0
- package/dist/es/slider/SliderLabel.js +10 -1
- package/dist/es/switch/Switch.d.ts +8 -0
- package/dist/es/switch/Switch.js +10 -1
- package/dist/es/textarea/TextArea.d.ts +36 -0
- package/dist/es/textarea/TextArea.js +113 -28
- package/dist/es/textarea/interfaces/TextAreaProps.d.ts +39 -0
- package/dist/npm/additionalTypes.ts +11 -0
- package/dist/npm/checkbox/Checkbox.d.ts +7 -1
- package/dist/npm/checkbox/Checkbox.js +8 -0
- package/dist/npm/colors/ColorPalette.d.ts +6 -0
- package/dist/npm/colors/ColorPalette.js +8 -1
- package/dist/npm/colors/ColorPicker.d.ts +6 -0
- package/dist/npm/colors/ColorPicker.js +8 -1
- package/dist/npm/colors/Picker.d.ts +6 -0
- package/dist/npm/colors/Picker.js +8 -1
- package/dist/npm/colors/interfaces/ColorPaletteChangeEvent.d.ts +3 -0
- package/dist/npm/colors/interfaces/ColorPaletteProps.d.ts +4 -13
- package/dist/npm/colors/interfaces/ColorPickerActiveColorClick.d.ts +3 -0
- package/dist/npm/colors/interfaces/ColorPickerBlurEvent.d.ts +3 -0
- package/dist/npm/colors/interfaces/ColorPickerChangeEvent.d.ts +3 -0
- package/dist/npm/colors/interfaces/ColorPickerFocusEvent.d.ts +3 -0
- package/dist/npm/colors/interfaces/ColorPickerPaletteSettings.d.ts +3 -0
- package/dist/npm/colors/interfaces/ColorPickerPopupSettings.d.ts +3 -0
- package/dist/npm/colors/interfaces/ColorPickerProps.d.ts +5 -2
- package/dist/npm/colors/interfaces/ColorPickerView.d.ts +3 -0
- package/dist/npm/input/Input.d.ts +19 -9
- package/dist/npm/input/Input.js +19 -3
- package/dist/npm/input-separator/InputSeparator.d.ts +19 -0
- package/dist/npm/input-separator/InputSeparator.js +46 -0
- package/dist/npm/main.d.ts +1 -0
- package/dist/npm/main.js +1 -0
- package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +4 -1
- package/dist/npm/maskedtextbox/MaskedTextBox.js +94 -19
- package/dist/npm/maskedtextbox/MaskedTextBoxProps.d.ts +32 -0
- package/dist/npm/numerictextbox/NumericTextBox.d.ts +6 -0
- package/dist/npm/numerictextbox/NumericTextBox.js +100 -7
- package/dist/npm/numerictextbox/interfaces/NumericTextBoxProps.d.ts +43 -3
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/RadioButton.d.ts +7 -1
- package/dist/npm/radiobutton/RadioButton.js +8 -0
- package/dist/npm/radiobutton/RadioGroup.d.ts +7 -1
- package/dist/npm/radiobutton/RadioGroup.js +8 -0
- package/dist/npm/range-slider/RangeSlider.d.ts +8 -0
- package/dist/npm/range-slider/RangeSlider.js +10 -0
- package/dist/npm/slider/Slider.d.ts +8 -2
- package/dist/npm/slider/Slider.js +8 -0
- package/dist/npm/slider/SliderLabel.d.ts +8 -0
- package/dist/npm/slider/SliderLabel.js +10 -1
- package/dist/npm/switch/Switch.d.ts +8 -0
- package/dist/npm/switch/Switch.js +10 -1
- package/dist/npm/textarea/TextArea.d.ts +36 -0
- package/dist/npm/textarea/TextArea.js +112 -27
- package/dist/npm/textarea/interfaces/TextAreaProps.d.ts +39 -0
- package/package.json +10 -10
- package/dist/es/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +0 -39
- package/dist/es/numerictextbox/interfaces/NumericTextBoxHandle.js +0 -0
- package/dist/npm/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +0 -39
- package/dist/npm/numerictextbox/interfaces/NumericTextBoxHandle.js +0 -5
|
@@ -5,10 +5,10 @@ var gh = allVue.h;
|
|
|
5
5
|
var ref = allVue.ref;
|
|
6
6
|
import { MaskingService } from './masking.service';
|
|
7
7
|
import { defaultRules, maskingChanged, returnFalse } from './utils';
|
|
8
|
-
import { guid,
|
|
8
|
+
import { guid, getTabIndex, validatePackage, kendoThemeMaps, templateDefinition, templateRendering, getListeners, getTemplate } from '@progress/kendo-vue-common';
|
|
9
9
|
import { packageMetadata } from '../package-metadata';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* @hidden
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
var MaskedTextBoxVue2 = {
|
|
@@ -93,7 +93,15 @@ var MaskedTextBoxVue2 = {
|
|
|
93
93
|
validityStyles: {
|
|
94
94
|
type: Boolean,
|
|
95
95
|
default: true
|
|
96
|
-
}
|
|
96
|
+
},
|
|
97
|
+
iconName: String,
|
|
98
|
+
inputPrefix: templateDefinition,
|
|
99
|
+
inputSuffix: templateDefinition,
|
|
100
|
+
showValidationIcon: Boolean,
|
|
101
|
+
showLoadingIcon: Boolean,
|
|
102
|
+
showClearButton: Boolean,
|
|
103
|
+
inputClass: String,
|
|
104
|
+
wrapperClass: String
|
|
97
105
|
},
|
|
98
106
|
data: function data() {
|
|
99
107
|
return {
|
|
@@ -191,15 +199,38 @@ var MaskedTextBoxVue2 = {
|
|
|
191
199
|
},
|
|
192
200
|
spanClassNames: {
|
|
193
201
|
get: function get() {
|
|
202
|
+
var _a;
|
|
203
|
+
|
|
194
204
|
var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
195
|
-
return {
|
|
205
|
+
return _a = {
|
|
196
206
|
'k-floating-label-container': true,
|
|
197
207
|
'k-focus': this.currentFocused,
|
|
198
208
|
'k-empty': !this.computedValue(),
|
|
199
209
|
'k-invalid': !isValid && isValid !== undefined,
|
|
200
|
-
'k-rtl': this.$props.dir === 'rtl'
|
|
201
|
-
|
|
210
|
+
'k-rtl': this.$props.dir === 'rtl',
|
|
211
|
+
'k-loading': this.showLoadingIcon
|
|
212
|
+
}, _a[this.wrapperClass] = this.wrapperClass, _a;
|
|
202
213
|
}
|
|
214
|
+
},
|
|
215
|
+
wrapperSpanClass: function wrapperSpanClass() {
|
|
216
|
+
var _a;
|
|
217
|
+
|
|
218
|
+
var _b = this.$props,
|
|
219
|
+
size = _b.size,
|
|
220
|
+
fillMode = _b.fillMode,
|
|
221
|
+
rounded = _b.rounded;
|
|
222
|
+
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
223
|
+
return _a = {
|
|
224
|
+
'k-maskedtextbox': true,
|
|
225
|
+
'k-input': true
|
|
226
|
+
}, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a['k-loading'] = this.showLoadingIcon, _a[this.wrapperClass] = this.wrapperClass, _a;
|
|
227
|
+
},
|
|
228
|
+
inputInnerClass: function inputInnerClass() {
|
|
229
|
+
var _a;
|
|
230
|
+
|
|
231
|
+
return _a = {
|
|
232
|
+
'k-input-inner': true
|
|
233
|
+
}, _a[this.inputClass] = this.inputClass, _a;
|
|
203
234
|
}
|
|
204
235
|
},
|
|
205
236
|
methods: {
|
|
@@ -251,6 +282,9 @@ var MaskedTextBoxVue2 = {
|
|
|
251
282
|
this.isPasted = true;
|
|
252
283
|
this.currentSelection = [selectionStart || 0, selectionEnd || 0];
|
|
253
284
|
},
|
|
285
|
+
clearClick: function clearClick(event) {
|
|
286
|
+
this.triggerOnChange('', event);
|
|
287
|
+
},
|
|
254
288
|
onChangeHandler: function onChangeHandler(event) {
|
|
255
289
|
var input = event.currentTarget;
|
|
256
290
|
var value = this.inputValue = input.value;
|
|
@@ -338,29 +372,50 @@ var MaskedTextBoxVue2 = {
|
|
|
338
372
|
},
|
|
339
373
|
// @ts-ignore
|
|
340
374
|
render: function render(createElement) {
|
|
341
|
-
var _a;
|
|
342
|
-
|
|
343
375
|
var _this = this;
|
|
344
376
|
|
|
345
377
|
var h = gh || createElement;
|
|
346
378
|
var inputId = this.$props.id || this.inputId;
|
|
347
|
-
var
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
379
|
+
var _a = this.$props,
|
|
380
|
+
iconName = _a.iconName,
|
|
381
|
+
showValidationIcon = _a.showValidationIcon,
|
|
382
|
+
showLoadingIcon = _a.showLoadingIcon,
|
|
383
|
+
showClearButton = _a.showClearButton;
|
|
384
|
+
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
352
385
|
var newValue = this.computedValue();
|
|
353
386
|
var inputValue = this.inputValue;
|
|
354
|
-
var
|
|
387
|
+
var inputPrefixTemplate = templateRendering.call(this, this.$props.inputPrefix, getListeners.call(this));
|
|
388
|
+
var inputSuffixTemplate = templateRendering.call(this, this.$props.inputSuffix, getListeners.call(this));
|
|
389
|
+
var inputPrefix = getTemplate.call(this, {
|
|
390
|
+
h: h,
|
|
391
|
+
template: inputPrefixTemplate,
|
|
392
|
+
additionalProps: {
|
|
393
|
+
value: newValue,
|
|
394
|
+
valid: isValid
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
var inputSuffix = getTemplate.call(this, {
|
|
398
|
+
h: h,
|
|
399
|
+
template: inputSuffixTemplate,
|
|
400
|
+
additionalProps: {
|
|
401
|
+
value: newValue,
|
|
402
|
+
valid: isValid
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
var wrapper = h("span", {
|
|
355
406
|
dir: this.$props.dir,
|
|
356
407
|
attrs: this.v3 ? undefined : {
|
|
357
408
|
dir: this.$props.dir
|
|
358
409
|
},
|
|
359
|
-
"class":
|
|
410
|
+
"class": this.wrapperSpanClass,
|
|
360
411
|
style: !this.$props.label ? {
|
|
361
412
|
width: this.$props.width
|
|
362
413
|
} : undefined
|
|
363
|
-
}, [h("
|
|
414
|
+
}, [iconName && h("span", {
|
|
415
|
+
"class": "k-input-icon k-icon k-i-" + iconName
|
|
416
|
+
}), this.$props.inputPrefix && h("span", {
|
|
417
|
+
"class": "k-input-prefix"
|
|
418
|
+
}, [inputPrefix]), h("input", {
|
|
364
419
|
type: this.$props.type,
|
|
365
420
|
attrs: this.v3 ? undefined : {
|
|
366
421
|
type: this.$props.type,
|
|
@@ -384,7 +439,7 @@ var MaskedTextBoxVue2 = {
|
|
|
384
439
|
autoCorrect: "off",
|
|
385
440
|
autoCapitalize: "off",
|
|
386
441
|
spellCheck: false,
|
|
387
|
-
"class":
|
|
442
|
+
"class": this.inputInnerClass,
|
|
388
443
|
value: this.v3 ? newValue : null,
|
|
389
444
|
domProps: this.v3 ? undefined : {
|
|
390
445
|
"value": newValue
|
|
@@ -417,14 +472,30 @@ var MaskedTextBoxVue2 = {
|
|
|
417
472
|
onBlur: this.blurHandler,
|
|
418
473
|
onDragStart: returnFalse,
|
|
419
474
|
onDrop: returnFalse
|
|
420
|
-
})
|
|
475
|
+
}), this.$props.inputSuffix && h("span", {
|
|
476
|
+
"class": "k-input-suffix"
|
|
477
|
+
}, [inputSuffix]), showValidationIcon && isValid && h("span", {
|
|
478
|
+
"class": "k-input-validation-icon k-icon k-i-check"
|
|
479
|
+
}), showValidationIcon && !isValid && h("span", {
|
|
480
|
+
"class": "k-input-validation-icon k-icon k-i-warning"
|
|
481
|
+
}), showLoadingIcon && h("span", {
|
|
482
|
+
"class": "k-input-loading-icon k-icon k-i-loading"
|
|
483
|
+
}), showClearButton && newValue && h("span", {
|
|
484
|
+
onClick: this.clearClick,
|
|
485
|
+
on: this.v3 ? undefined : {
|
|
486
|
+
"click": this.clearClick
|
|
487
|
+
},
|
|
488
|
+
"class": "k-clear-value"
|
|
489
|
+
}, [h("span", {
|
|
490
|
+
"class": "k-icon k-i-x"
|
|
491
|
+
})])]);
|
|
421
492
|
return this.$props.label ? h("span", {
|
|
422
493
|
"class": this.spanClassNames,
|
|
423
494
|
dir: this.$props.dir,
|
|
424
495
|
attrs: this.v3 ? undefined : {
|
|
425
496
|
dir: this.$props.dir
|
|
426
497
|
}
|
|
427
|
-
}, [
|
|
498
|
+
}, [wrapper, this.$props.label ? inputId ? h("label", {
|
|
428
499
|
"for": inputId,
|
|
429
500
|
attrs: this.v3 ? undefined : {
|
|
430
501
|
"for": inputId
|
|
@@ -432,8 +503,12 @@ var MaskedTextBoxVue2 = {
|
|
|
432
503
|
"class": "k-label"
|
|
433
504
|
}, [this.$props.label]) : h("span", {
|
|
434
505
|
"class": "k-label"
|
|
435
|
-
}, [this.$props.label]) : null]) :
|
|
506
|
+
}, [this.$props.label]) : null]) : wrapper;
|
|
436
507
|
}
|
|
437
508
|
};
|
|
509
|
+
/**
|
|
510
|
+
* @hidden
|
|
511
|
+
*/
|
|
512
|
+
|
|
438
513
|
var MaskedTextBox = MaskedTextBoxVue2;
|
|
439
514
|
export { MaskedTextBox, MaskedTextBoxVue2 };
|
|
@@ -184,4 +184,36 @@ export interface MaskedTextBoxProps extends FormComponentProps {
|
|
|
184
184
|
* The type of the input - 'text' by default
|
|
185
185
|
*/
|
|
186
186
|
type?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Defines a string prop that controls the input icon.
|
|
189
|
+
*/
|
|
190
|
+
iconName?: String;
|
|
191
|
+
/**
|
|
192
|
+
* Defines if the inputPrefix will be shown. Accepts a slot name, a `render` function, or a Vue component.
|
|
193
|
+
*/
|
|
194
|
+
inputPrefix?: Boolean | String | Object | Function;
|
|
195
|
+
/**
|
|
196
|
+
* Defines if the inputSuffix will be shown. Accepts a slot name, a `render` function, or a Vue component.
|
|
197
|
+
*/
|
|
198
|
+
inputSuffix?: Boolean | String | Object | Function;
|
|
199
|
+
/**
|
|
200
|
+
* Defines a boolean prop that controls whether to show the validation icon. Defaults to 'false'.
|
|
201
|
+
*/
|
|
202
|
+
showValidationIcon?: Boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Defines a boolean prop that controls whether to show the loading icon. Defaults to 'false'.
|
|
205
|
+
*/
|
|
206
|
+
showLoadingIcon?: Boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Defines a boolean prop that controls whether to show the clear icon. Defaults to 'false'.
|
|
209
|
+
*/
|
|
210
|
+
showClearButton?: Boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Defines additional class to the inner input element.
|
|
213
|
+
*/
|
|
214
|
+
inputClass?: String;
|
|
215
|
+
/**
|
|
216
|
+
* Defines additional class to the wrapper element.
|
|
217
|
+
*/
|
|
218
|
+
wrapperClass?: String;
|
|
187
219
|
}
|
|
@@ -72,6 +72,12 @@ export interface NumericTextBoxComputed {
|
|
|
72
72
|
*/
|
|
73
73
|
export interface NumericTextBoxAll extends Vue2type, NumericTextBoxMethods, NumericTextBoxComputed, NumericTextBoxState {
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* @hidden
|
|
77
|
+
*/
|
|
75
78
|
declare let NumericTextBoxVue2: ComponentOptions<NumericTextBoxAll, DefaultData<NumericTextBoxData>, DefaultMethods<NumericTextBoxAll>, NumericTextBoxComputed, RecordPropsDefinition<NumericTextBoxProps>>;
|
|
79
|
+
/**
|
|
80
|
+
* @hidden
|
|
81
|
+
*/
|
|
76
82
|
declare const NumericTextBox: DefineComponent<NumericTextBoxProps, any, NumericTextBoxData, NumericTextBoxComputed, NumericTextBoxMethods, {}, {}, {}, string, NumericTextBoxProps, NumericTextBoxProps, {}>;
|
|
77
83
|
export { NumericTextBox, NumericTextBoxVue2 };
|
|
@@ -4,7 +4,7 @@ var allVue = Vue;
|
|
|
4
4
|
var gh = allVue.h;
|
|
5
5
|
var ref = allVue.ref;
|
|
6
6
|
var inject = allVue.inject;
|
|
7
|
-
import { canUseDOM, getDefaultSlots, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
7
|
+
import { canUseDOM, getDefaultSlots, getListeners, getTemplate, kendoThemeMaps, templateDefinition, templateRendering } from '@progress/kendo-vue-common';
|
|
8
8
|
import { provideIntlService, provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
9
9
|
import { guid, validatePackage } from '@progress/kendo-vue-common';
|
|
10
10
|
import { Button as KButton } from '@progress/kendo-vue-buttons';
|
|
@@ -12,6 +12,10 @@ import { messages, numericIncreaseValue, numericDecreaseValue } from './../messa
|
|
|
12
12
|
import { formatValue, sanitizeNumber, rangeValue, increaseValue, decreaseValue, getStateOrPropsValue } from './utils';
|
|
13
13
|
import { packageMetadata } from '../package-metadata';
|
|
14
14
|
var VALIDATION_MESSAGE = 'Please enter a valid value!';
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
|
|
15
19
|
var NumericTextBoxVue2 = {
|
|
16
20
|
model: {
|
|
17
21
|
event: 'changemodel'
|
|
@@ -84,7 +88,15 @@ var NumericTextBoxVue2 = {
|
|
|
84
88
|
type: Boolean,
|
|
85
89
|
default: false
|
|
86
90
|
},
|
|
87
|
-
id: String
|
|
91
|
+
id: String,
|
|
92
|
+
iconName: String,
|
|
93
|
+
inputPrefix: templateDefinition,
|
|
94
|
+
inputSuffix: templateDefinition,
|
|
95
|
+
showValidationIcon: Boolean,
|
|
96
|
+
showLoadingIcon: Boolean,
|
|
97
|
+
showClearButton: Boolean,
|
|
98
|
+
inputClass: String,
|
|
99
|
+
wrapperClass: String
|
|
88
100
|
},
|
|
89
101
|
inject: {
|
|
90
102
|
kendoIntlService: {
|
|
@@ -171,15 +183,17 @@ var NumericTextBoxVue2 = {
|
|
|
171
183
|
},
|
|
172
184
|
spanClassNames: {
|
|
173
185
|
get: function get() {
|
|
186
|
+
var _a;
|
|
187
|
+
|
|
174
188
|
var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
175
189
|
var compValue = this.computedValue;
|
|
176
|
-
return {
|
|
190
|
+
return _a = {
|
|
177
191
|
'k-floating-label-container': true,
|
|
178
192
|
'k-focus': this.$data.focused,
|
|
179
193
|
'k-empty': !(compValue === 0 ? true : compValue || this.$props.placeholder),
|
|
180
194
|
'k-invalid': !isValid && isValid !== undefined,
|
|
181
195
|
'k-rtl': this.$props.dir === 'rtl'
|
|
182
|
-
};
|
|
196
|
+
}, _a[this.inputClass] = this.inputClass, _a;
|
|
183
197
|
}
|
|
184
198
|
},
|
|
185
199
|
wrapperClassNames: function wrapperClassNames() {
|
|
@@ -195,7 +209,14 @@ var NumericTextBoxVue2 = {
|
|
|
195
209
|
return _a = {
|
|
196
210
|
'k-input': true,
|
|
197
211
|
'k-numerictextbox': true
|
|
198
|
-
}, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-invalid'] = !isValid, _a['k-required'] = required, _a['k-disabled'] = disabled, _a;
|
|
212
|
+
}, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-invalid'] = !isValid, _a['k-required'] = required, _a['k-disabled'] = disabled, _a['k-loading'] = this.showLoadingIcon, _a[this.wrapperClass] = this.wrapperClass, _a;
|
|
213
|
+
},
|
|
214
|
+
inputInnerClass: function inputInnerClass() {
|
|
215
|
+
var _a;
|
|
216
|
+
|
|
217
|
+
return _a = {
|
|
218
|
+
'k-input-inner': true
|
|
219
|
+
}, _a[this.inputClass] = this.inputClass, _a;
|
|
199
220
|
}
|
|
200
221
|
},
|
|
201
222
|
methods: {
|
|
@@ -212,6 +233,30 @@ var NumericTextBoxVue2 = {
|
|
|
212
233
|
valueMissing: this.computedValue === null
|
|
213
234
|
};
|
|
214
235
|
},
|
|
236
|
+
clearClick: function clearClick(event) {
|
|
237
|
+
if (this.$props.value !== undefined) {
|
|
238
|
+
// controlled
|
|
239
|
+
this.$data.currentValue = this.$props.value;
|
|
240
|
+
} else if (this.$props.modelValue !== undefined) {
|
|
241
|
+
this.$data.currentValue = this.$props.modelValue;
|
|
242
|
+
} else {
|
|
243
|
+
// uncontrolled
|
|
244
|
+
this.$data.currentValue = null;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
this.$emit('changemodel', null);
|
|
248
|
+
this.$emit('update:modelValue', null);
|
|
249
|
+
this.$emit('change', {
|
|
250
|
+
event: event,
|
|
251
|
+
value: null,
|
|
252
|
+
component: this,
|
|
253
|
+
target: {
|
|
254
|
+
name: this.$props.name,
|
|
255
|
+
value: null
|
|
256
|
+
},
|
|
257
|
+
validity: this.validity()
|
|
258
|
+
});
|
|
259
|
+
},
|
|
215
260
|
focus: function focus() {
|
|
216
261
|
if (this._input) {
|
|
217
262
|
this._input.focus();
|
|
@@ -446,9 +491,15 @@ var NumericTextBoxVue2 = {
|
|
|
446
491
|
var _this = this;
|
|
447
492
|
|
|
448
493
|
var h = gh || createElement;
|
|
494
|
+
var _a = this.$props,
|
|
495
|
+
iconName = _a.iconName,
|
|
496
|
+
showValidationIcon = _a.showValidationIcon,
|
|
497
|
+
showLoadingIcon = _a.showLoadingIcon,
|
|
498
|
+
showClearButton = _a.showClearButton;
|
|
449
499
|
var inputId = this.$props.id || this._inputId;
|
|
450
500
|
var defaultSlot = getDefaultSlots(this);
|
|
451
501
|
var localizationService = provideLocalizationService(this);
|
|
502
|
+
var isValid = this.validity().valid;
|
|
452
503
|
|
|
453
504
|
if (this.$props.value !== undefined && this.$props.value !== this.$data.currentValue) {
|
|
454
505
|
this.$data.currentValue = this.$props.value;
|
|
@@ -457,6 +508,24 @@ var NumericTextBoxVue2 = {
|
|
|
457
508
|
}
|
|
458
509
|
|
|
459
510
|
this._prevLooseValue = this.looseValue;
|
|
511
|
+
var inputPrefixTemplate = templateRendering.call(this, this.$props.inputPrefix, getListeners.call(this));
|
|
512
|
+
var inputSuffixTemplate = templateRendering.call(this, this.$props.inputSuffix, getListeners.call(this));
|
|
513
|
+
var inputPrefix = getTemplate.call(this, {
|
|
514
|
+
h: h,
|
|
515
|
+
template: inputPrefixTemplate,
|
|
516
|
+
additionalProps: {
|
|
517
|
+
value: this.computedValue,
|
|
518
|
+
valid: isValid
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
var inputSuffix = getTemplate.call(this, {
|
|
522
|
+
h: h,
|
|
523
|
+
template: inputSuffixTemplate,
|
|
524
|
+
additionalProps: {
|
|
525
|
+
value: this.computedValue,
|
|
526
|
+
valid: isValid
|
|
527
|
+
}
|
|
528
|
+
});
|
|
460
529
|
var numerictextbox = h("span", {
|
|
461
530
|
dir: this.$props.dir,
|
|
462
531
|
attrs: this.v3 ? undefined : {
|
|
@@ -466,7 +535,11 @@ var NumericTextBoxVue2 = {
|
|
|
466
535
|
"class": this.wrapperClassNames,
|
|
467
536
|
"aria-disabled": this.$props.disabled ? 'true' : undefined,
|
|
468
537
|
style: this.$attrs.style
|
|
469
|
-
}, [h("
|
|
538
|
+
}, [iconName && h("span", {
|
|
539
|
+
"class": "k-input-icon k-icon k-i-" + iconName
|
|
540
|
+
}), this.$props.inputPrefix && h("span", {
|
|
541
|
+
"class": "k-input-prefix"
|
|
542
|
+
}, [inputPrefix]), h("input", {
|
|
470
543
|
tabIndex: this.$props.tabIndex,
|
|
471
544
|
attrs: this.v3 ? undefined : {
|
|
472
545
|
tabIndex: this.$props.tabIndex,
|
|
@@ -494,7 +567,7 @@ var NumericTextBoxVue2 = {
|
|
|
494
567
|
spellCheck: false,
|
|
495
568
|
autoComplete: "off",
|
|
496
569
|
autoCorrect: "off",
|
|
497
|
-
"class":
|
|
570
|
+
"class": this.inputInnerClass,
|
|
498
571
|
id: inputId,
|
|
499
572
|
value: this.v3 ? this.looseValue : null,
|
|
500
573
|
domProps: this.v3 ? undefined : {
|
|
@@ -519,7 +592,23 @@ var NumericTextBoxVue2 = {
|
|
|
519
592
|
ref: this.v3 ? function (el) {
|
|
520
593
|
_this.inputRef = el;
|
|
521
594
|
} : 'input'
|
|
522
|
-
}),
|
|
595
|
+
}), this.$props.inputSuffix && h("span", {
|
|
596
|
+
"class": "k-input-suffix"
|
|
597
|
+
}, [inputSuffix]), showValidationIcon && isValid && h("span", {
|
|
598
|
+
"class": "k-input-validation-icon k-icon k-i-check"
|
|
599
|
+
}), showValidationIcon && !isValid && h("span", {
|
|
600
|
+
"class": "k-input-validation-icon k-icon k-i-warning"
|
|
601
|
+
}), showLoadingIcon && h("span", {
|
|
602
|
+
"class": "k-input-loading-icon k-icon k-i-loading"
|
|
603
|
+
}), showClearButton && this.computedValue !== undefined && this.computedValue !== null && h("span", {
|
|
604
|
+
onClick: this.clearClick,
|
|
605
|
+
on: this.v3 ? undefined : {
|
|
606
|
+
"click": this.clearClick
|
|
607
|
+
},
|
|
608
|
+
"class": "k-clear-value"
|
|
609
|
+
}, [h("span", {
|
|
610
|
+
"class": "k-icon k-i-x"
|
|
611
|
+
})]), defaultSlot, this.$props.spinners && h("span", {
|
|
523
612
|
"class": "k-input-spinner k-spin-button",
|
|
524
613
|
onMousedown: this.spinnersWrapperMouseDown,
|
|
525
614
|
on: this.v3 ? undefined : {
|
|
@@ -587,5 +676,9 @@ var NumericTextBoxVue2 = {
|
|
|
587
676
|
}, [this.$props.label]) : null]) : numerictextbox;
|
|
588
677
|
}
|
|
589
678
|
};
|
|
679
|
+
/**
|
|
680
|
+
* @hidden
|
|
681
|
+
*/
|
|
682
|
+
|
|
590
683
|
var NumericTextBox = NumericTextBoxVue2;
|
|
591
684
|
export { NumericTextBox, NumericTextBoxVue2 };
|
|
@@ -18,11 +18,11 @@ export interface NumericTextBoxProps extends FormComponentProps {
|
|
|
18
18
|
*/
|
|
19
19
|
defaultValue?: number | null;
|
|
20
20
|
/**
|
|
21
|
-
* Specifies the value that is used to increment or decrement the value of the NumericTextBox ([see example]({% slug
|
|
21
|
+
* Specifies the value that is used to increment or decrement the value of the NumericTextBox ([see example]({% slug predefinedsteps_numerictextbox %})).
|
|
22
22
|
*/
|
|
23
23
|
step?: number;
|
|
24
24
|
/**
|
|
25
|
-
* Specifies the number format which is used for formatting the value ([see example]({% slug
|
|
25
|
+
* Specifies the number format which is used for formatting the value ([see example]({% slug formats_numerictextbox %})). If set to `null` or `undefined`, the default format will be used.
|
|
26
26
|
*/
|
|
27
27
|
format?: string | NumberFormatOptions;
|
|
28
28
|
/**
|
|
@@ -87,7 +87,7 @@ export interface NumericTextBoxProps extends FormComponentProps {
|
|
|
87
87
|
*/
|
|
88
88
|
max?: number;
|
|
89
89
|
/**
|
|
90
|
-
* Specifies whether the **Up** and **Down** spin buttons will be rendered ([see example]({% slug
|
|
90
|
+
* Specifies whether the **Up** and **Down** spin buttons will be rendered ([see example]({% slug spinbuttons_numerictextbox %})).
|
|
91
91
|
*/
|
|
92
92
|
spinners?: boolean;
|
|
93
93
|
/**
|
|
@@ -118,6 +118,46 @@ export interface NumericTextBoxProps extends FormComponentProps {
|
|
|
118
118
|
* - `text`
|
|
119
119
|
*/
|
|
120
120
|
inputType?: NumericTextBoxInputType;
|
|
121
|
+
/**
|
|
122
|
+
* If set to `false`, no visual representation of the invalid state of the component will be applied.
|
|
123
|
+
*
|
|
124
|
+
* This property is part of the [FormComponentProps]({% slug api_common_formcomponentprops %}) interface.
|
|
125
|
+
*
|
|
126
|
+
* @default true
|
|
127
|
+
*/
|
|
128
|
+
validityStyles?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Defines a string prop that controls the input icon.
|
|
131
|
+
*/
|
|
132
|
+
iconName?: String;
|
|
133
|
+
/**
|
|
134
|
+
* Defines if the inputPrefix will be shown. Accepts a slot name, a `render` function, or a Vue component.
|
|
135
|
+
*/
|
|
136
|
+
inputPrefix?: Boolean | String | Object | Function;
|
|
137
|
+
/**
|
|
138
|
+
* Defines if the inputSuffix will be shown. Accepts a slot name, a `render` function, or a Vue component.
|
|
139
|
+
*/
|
|
140
|
+
inputSuffix?: Boolean | String | Object | Function;
|
|
141
|
+
/**
|
|
142
|
+
* Defines a boolean prop that controls whether to show the validation icon. Defaults to 'false'.
|
|
143
|
+
*/
|
|
144
|
+
showValidationIcon?: Boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Defines a boolean prop that controls whether to show the loading icon. Defaults to 'false'.
|
|
147
|
+
*/
|
|
148
|
+
showLoadingIcon?: Boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Defines a boolean prop that controls whether to show the clear icon. Defaults to 'false'.
|
|
151
|
+
*/
|
|
152
|
+
showClearButton?: Boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Defines additional class to the wrapper element.
|
|
155
|
+
*/
|
|
156
|
+
wrapperClass?: String;
|
|
157
|
+
/**
|
|
158
|
+
* Defines additional class to the input element.
|
|
159
|
+
*/
|
|
160
|
+
inputClass?: String;
|
|
121
161
|
/**
|
|
122
162
|
* The event handler that will be fired when the changes the selected value.
|
|
123
163
|
*/
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-vue-inputs',
|
|
6
6
|
productName: 'Kendo UI for Vue',
|
|
7
7
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1655213297,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -5,7 +5,7 @@ declare type DefaultMethods<V> = {
|
|
|
5
5
|
};
|
|
6
6
|
import { RadioButtonProps } from './interfaces/RadioButtonProps';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* @hidden
|
|
9
9
|
*/
|
|
10
10
|
export interface RadioButtonHandle {
|
|
11
11
|
input: HTMLInputElement | null;
|
|
@@ -44,6 +44,12 @@ export interface RadioButtonComputed {
|
|
|
44
44
|
*/
|
|
45
45
|
export interface RadioButtonAll extends Vue2type, RadioButtonMethods, RadioButtonComputed, RadioButtonState, RadioButtonData {
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* @hidden
|
|
49
|
+
*/
|
|
47
50
|
declare let RadioButtonVue2: ComponentOptions<RadioButtonAll, DefaultData<RadioButtonData>, DefaultMethods<RadioButtonAll>, RadioButtonComputed, RecordPropsDefinition<RadioButtonProps>>;
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
48
54
|
declare let RadioButton: DefineComponent<RadioButtonProps, any, RadioButtonData, RadioButtonComputed, RadioButtonMethods, {}, {}, {}, string, RadioButtonProps, RadioButtonProps, {}>;
|
|
49
55
|
export { RadioButton, RadioButtonVue2 };
|
|
@@ -7,6 +7,10 @@ var inject = allVue.inject;
|
|
|
7
7
|
import { guid, getTabIndex, getDefaultSlots, templateRendering, getTemplate, getListeners, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
8
8
|
import { validatePackage } from '@progress/kendo-vue-common';
|
|
9
9
|
import { packageMetadata } from '../package-metadata';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
|
|
10
14
|
var RadioButtonVue2 = {
|
|
11
15
|
name: 'KendoRadioButton',
|
|
12
16
|
props: {
|
|
@@ -186,5 +190,9 @@ var RadioButtonVue2 = {
|
|
|
186
190
|
});
|
|
187
191
|
}
|
|
188
192
|
};
|
|
193
|
+
/**
|
|
194
|
+
* @hidden
|
|
195
|
+
*/
|
|
196
|
+
|
|
189
197
|
var RadioButton = RadioButtonVue2;
|
|
190
198
|
export { RadioButton, RadioButtonVue2 };
|
|
@@ -5,7 +5,7 @@ declare type DefaultMethods<V> = {
|
|
|
5
5
|
};
|
|
6
6
|
import { RadioGroupProps } from './interfaces/RadioGroupProps';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* @hidden
|
|
9
9
|
*/
|
|
10
10
|
export interface RadioGroupHandle {
|
|
11
11
|
element: HTMLUListElement | null;
|
|
@@ -46,6 +46,12 @@ export interface RadioGroupComputed {
|
|
|
46
46
|
*/
|
|
47
47
|
export interface RadioGroupAll extends Vue2type, RadioGroupMethods, RadioGroupComputed, RadioGroupState, RadioGroupData {
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
49
52
|
declare let RadioGroupVue2: ComponentOptions<RadioGroupAll, DefaultData<RadioGroupData>, DefaultMethods<RadioGroupAll>, RadioGroupComputed, RecordPropsDefinition<RadioGroupProps>>;
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
50
56
|
declare let RadioGroup: DefineComponent<RadioGroupProps, any, RadioGroupData, RadioGroupComputed, RadioGroupMethods, {}, {}, {}, string, RadioGroupProps, RadioGroupProps, {}>;
|
|
51
57
|
export { RadioGroup, RadioGroupVue2 };
|
|
@@ -7,6 +7,10 @@ var inject = allVue.inject;
|
|
|
7
7
|
import { RadioButton } from './RadioButton';
|
|
8
8
|
import { guid, classNames, focusFirstFocusableChild, validatePackage, isRtl, templateRendering, getListeners } from '@progress/kendo-vue-common';
|
|
9
9
|
import { packageMetadata } from '../package-metadata';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
|
|
10
14
|
var RadioGroupVue2 = {
|
|
11
15
|
name: 'KendoRadioGroup',
|
|
12
16
|
props: {
|
|
@@ -205,5 +209,9 @@ var RadioGroupVue2 = {
|
|
|
205
209
|
}, [radioOptions]);
|
|
206
210
|
}
|
|
207
211
|
};
|
|
212
|
+
/**
|
|
213
|
+
* @hidden
|
|
214
|
+
*/
|
|
215
|
+
|
|
208
216
|
var RadioGroup = RadioGroupVue2;
|
|
209
217
|
export { RadioGroup, RadioGroupVue2 };
|
|
@@ -163,6 +163,14 @@ export interface RangeSliderComputed {
|
|
|
163
163
|
*/
|
|
164
164
|
export interface RangeSliderAll extends Vue2type, RangeSliderMethods, RangeSliderComputed, RangeSliderState, RangeSliderData {
|
|
165
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* @hidden
|
|
168
|
+
*/
|
|
166
169
|
declare let RangeSliderVue2: ComponentOptions<RangeSliderAll, DefaultData<RangeSliderData>, DefaultMethods<RangeSliderAll>, RangeSliderComputed, RecordPropsDefinition<RangeSliderProps>>;
|
|
170
|
+
/**
|
|
171
|
+
* Represents the [Kendo UI for Vue Native RangeSlider component]({% slug overview_rangeslider %}).
|
|
172
|
+
* Accepts properties of type [RangeSliderProps]({% slug api_inputs_rangesliderprops %}).
|
|
173
|
+
* Obtaining the `ref` returns an object of type [RangeSliderHandle]({% slug api_inputs_rangesliderhandle %}).
|
|
174
|
+
*/
|
|
167
175
|
declare const RangeSlider: DefineComponent<RangeSliderProps, any, RangeSliderData, RangeSliderComputed, RangeSliderMethods, {}, {}, {}, string, RangeSliderProps, RangeSliderProps, {}>;
|
|
168
176
|
export { RangeSlider, RangeSliderVue2 };
|
|
@@ -26,6 +26,10 @@ import { messages, sliderDragTitle } from './../messages';
|
|
|
26
26
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
27
27
|
import { rangeReducer, RANGE_ACTION } from './range-raducer';
|
|
28
28
|
import { packageMetadata } from '../package-metadata';
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
|
|
29
33
|
var RangeSliderVue2 = {
|
|
30
34
|
name: 'KendoRangeSlider',
|
|
31
35
|
model: {
|
|
@@ -602,5 +606,11 @@ var RangeSliderVue2 = {
|
|
|
602
606
|
}
|
|
603
607
|
}
|
|
604
608
|
};
|
|
609
|
+
/**
|
|
610
|
+
* Represents the [Kendo UI for Vue Native RangeSlider component]({% slug overview_rangeslider %}).
|
|
611
|
+
* Accepts properties of type [RangeSliderProps]({% slug api_inputs_rangesliderprops %}).
|
|
612
|
+
* Obtaining the `ref` returns an object of type [RangeSliderHandle]({% slug api_inputs_rangesliderhandle %}).
|
|
613
|
+
*/
|
|
614
|
+
|
|
605
615
|
var RangeSlider = RangeSliderVue2;
|
|
606
616
|
export { RangeSlider, RangeSliderVue2 };
|