@progress/kendo-vue-inputs 3.0.5 → 3.0.6-dev.202202101018

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.
@@ -97,7 +97,6 @@ export interface InputData {
97
97
  autofill?: boolean;
98
98
  currentValue?: string | string[] | number;
99
99
  valueDuringOnChange?: string;
100
- input?: any;
101
100
  inputId?: string;
102
101
  focused?: boolean;
103
102
  }
@@ -106,6 +105,7 @@ export interface InputData {
106
105
  */
107
106
  export interface InputState {
108
107
  inputRef: any;
108
+ _input: any;
109
109
  v3: boolean;
110
110
  }
111
111
  /**
@@ -126,6 +126,7 @@ export interface InputMethods {
126
126
  handleKeypress?: (event: any) => void;
127
127
  handleAutoFill?: (e: any) => void;
128
128
  handleAutoFillEnd?: (e: any) => void;
129
+ inputWrapperClass: () => any;
129
130
  }
130
131
  /**
131
132
  * @hidden
@@ -134,7 +135,6 @@ export interface InputComputed {
134
135
  [key: string]: any;
135
136
  computedValue?: any;
136
137
  spanClassNames?: any;
137
- inputWrapperClass?: any;
138
138
  }
139
139
  /**
140
140
  * @hidden
@@ -19,7 +19,7 @@ import * as Vue from 'vue';
19
19
  var allVue = Vue;
20
20
  var gh = allVue.h;
21
21
  var ref = allVue.ref;
22
- import { guid, noop, validatePackage, kendoThemeMaps } from '@progress/kendo-vue-common';
22
+ import { guid, validatePackage, kendoThemeMaps } from '@progress/kendo-vue-common';
23
23
  import { packageMetadata } from '../package-metadata';
24
24
  import { FloatingLabel } from '@progress/kendo-vue-labels';
25
25
  var InputVue2 = {
@@ -106,7 +106,6 @@ var InputVue2 = {
106
106
  autofill: false,
107
107
  currentValue: '',
108
108
  valueDuringOnChange: '',
109
- input: null,
110
109
  inputId: guid(),
111
110
  focused: false
112
111
  };
@@ -117,7 +116,7 @@ var InputVue2 = {
117
116
  this.$data.currentValue = this.$props.defaultValue;
118
117
  },
119
118
  mounted: function mounted() {
120
- this.$data.input = this.v3 ? this.inputRef : this.$refs.input;
119
+ this._input = this.v3 ? this.inputRef : this.$refs.input;
121
120
  this.$data.hasMounted = true;
122
121
  this.setValidity();
123
122
  },
@@ -143,14 +142,15 @@ var InputVue2 = {
143
142
  label = _a.label,
144
143
  id = _a.id,
145
144
  required = _a.required;
146
- var inputId = id || this.$data.inputId;
145
+ var inputId = id || this._inputId;
147
146
  var textbox = h('input', __assign(__assign({
148
147
  domProps: this.v3 ? null : __assign(__assign({}, this.$attrs), {
149
148
  placeholder: this.$props.placeholder,
150
149
  id: inputId,
151
150
  required: required,
152
151
  value: this.computedValue
153
- })
152
+ }),
153
+ attrs: this.v3 ? undefined : this.$attrs
154
154
  }, this.$attrs), {
155
155
  placeholder: this.$props.placeholder,
156
156
  id: inputId,
@@ -167,7 +167,7 @@ var InputVue2 = {
167
167
  keydown: this.handleKeydown,
168
168
  keyup: this.handleKeyup,
169
169
  keypress: this.handleKeypress,
170
- input: listeners.input || listeners.changemodel ? this.handleInput : noop,
170
+ input: this.handleInput,
171
171
  animationstart: this.handleAutoFill,
172
172
  animationend: this.handleAutoFillEnd
173
173
  },
@@ -182,7 +182,7 @@ var InputVue2 = {
182
182
  onAnimationend: this.handleAutoFillEnd
183
183
  }));
184
184
  var inputWrapper = h("span", {
185
- "class": this.inputWrapperClass
185
+ "class": this.inputWrapperClass()
186
186
  }, [textbox]);
187
187
  return label ? // @ts-ignore function children
188
188
  h(FloatingLabel, {
@@ -225,24 +225,25 @@ var InputVue2 = {
225
225
  this.$emit('keypress', e);
226
226
  },
227
227
  focus: function focus() {
228
- if (this.$data.input) {
229
- this.$data.input.focus();
228
+ if (this._input) {
229
+ this._input.focus();
230
230
  }
231
231
  },
232
232
  validity: function validity() {
233
233
  var result = {
234
- badInput: this.$data.input ? this.$data.input.validity.badInput : false,
235
- patternMismatch: this.$data.input ? this.$data.input.validity.patternMismatch : false,
236
- rangeOverflow: this.$data.input ? this.$data.input.validity.rangeOverflow : false,
237
- rangeUnderflow: this.$data.input ? this.$data.input.validity.rangeUnderflow : false,
238
- stepMismatch: this.$data.input ? this.$data.input.validity.stepMismatch : false,
239
- tooLong: this.$data.input ? this.$data.input.validity.tooLong : false,
240
- typeMismatch: this.$data.input ? this.$data.input.validity.typeMismatch : false,
241
- valueMissing: this.$data.input ? this.$data.input.validity.valueMissing : false
234
+ badInput: this._input ? this._input.validity.badInput : false,
235
+ patternMismatch: this._input ? this._input.validity.patternMismatch : false,
236
+ rangeOverflow: this._input ? this._input.validity.rangeOverflow : false,
237
+ rangeUnderflow: this._input ? this._input.validity.rangeUnderflow : false,
238
+ stepMismatch: this._input ? this._input.validity.stepMismatch : false,
239
+ tooLong: this._input ? this._input.validity.tooLong : false,
240
+ tooShort: this._input ? this._input.validity.tooShort : false,
241
+ typeMismatch: this._input ? this._input.validity.typeMismatch : false,
242
+ valueMissing: this._input ? this._input.validity.valueMissing : false
242
243
  };
243
244
  return __assign(__assign({}, result), {
244
245
  customError: this.$props.validationMessage !== undefined,
245
- valid: this.$props.valid !== undefined ? this.$props.valid : this.$data.input ? !this.isInvalid(result) : true
246
+ valid: this.$props.valid !== undefined ? this.$props.valid : this._input ? !this.isInvalid(result) : true
246
247
  });
247
248
  },
248
249
  isInvalid: function isInvalid(state) {
@@ -257,8 +258,8 @@ var InputVue2 = {
257
258
  return result;
258
259
  },
259
260
  setValidity: function setValidity() {
260
- if (this.$data.input && this.$data.input.setCustomValidity) {
261
- this.$data.input.setCustomValidity(this.validity().valid ? '' : this.$props.validationMessage || '');
261
+ if (this._input && this._input.setCustomValidity) {
262
+ this._input.setCustomValidity(this.validity().valid ? '' : this.$props.validationMessage || '');
262
263
  }
263
264
  },
264
265
  handleInput: function handleInput(event) {
@@ -316,6 +317,19 @@ var InputVue2 = {
316
317
  },
317
318
  name: function name() {
318
319
  return this.$props.name;
320
+ },
321
+ inputWrapperClass: function inputWrapperClass() {
322
+ var _a;
323
+
324
+ var _b = this.$props,
325
+ size = _b.size,
326
+ fillMode = _b.fillMode,
327
+ rounded = _b.rounded;
328
+ var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
329
+ return _a = {
330
+ 'k-textbox': true,
331
+ 'k-input': true
332
+ }, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a;
319
333
  }
320
334
  },
321
335
  computed: {
@@ -332,19 +346,6 @@ var InputVue2 = {
332
346
  };
333
347
  }
334
348
  },
335
- inputWrapperClass: function inputWrapperClass() {
336
- var _a;
337
-
338
- var _b = this.$props,
339
- size = _b.size,
340
- fillMode = _b.fillMode,
341
- rounded = _b.rounded;
342
- var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
343
- return _a = {
344
- 'k-textbox': true,
345
- 'k-input': true
346
- }, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a;
347
- },
348
349
  computedValue: {
349
350
  get: function get() {
350
351
  return this.$data.valueDuringOnChange !== undefined ? this.$data.valueDuringOnChange : this.$props.value !== undefined ? this.$props.value : this.$props.modelValue !== undefined ? this.$props.modelValue : this.$data.currentValue;
@@ -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: 1644395586,
8
+ publishDate: 1644487823,
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
  };
@@ -97,7 +97,6 @@ export interface InputData {
97
97
  autofill?: boolean;
98
98
  currentValue?: string | string[] | number;
99
99
  valueDuringOnChange?: string;
100
- input?: any;
101
100
  inputId?: string;
102
101
  focused?: boolean;
103
102
  }
@@ -106,6 +105,7 @@ export interface InputData {
106
105
  */
107
106
  export interface InputState {
108
107
  inputRef: any;
108
+ _input: any;
109
109
  v3: boolean;
110
110
  }
111
111
  /**
@@ -126,6 +126,7 @@ export interface InputMethods {
126
126
  handleKeypress?: (event: any) => void;
127
127
  handleAutoFill?: (e: any) => void;
128
128
  handleAutoFillEnd?: (e: any) => void;
129
+ inputWrapperClass: () => any;
129
130
  }
130
131
  /**
131
132
  * @hidden
@@ -134,7 +135,6 @@ export interface InputComputed {
134
135
  [key: string]: any;
135
136
  computedValue?: any;
136
137
  spanClassNames?: any;
137
- inputWrapperClass?: any;
138
138
  }
139
139
  /**
140
140
  * @hidden
@@ -117,7 +117,6 @@ var InputVue2 = {
117
117
  autofill: false,
118
118
  currentValue: '',
119
119
  valueDuringOnChange: '',
120
- input: null,
121
120
  inputId: kendo_vue_common_1.guid(),
122
121
  focused: false
123
122
  };
@@ -128,7 +127,7 @@ var InputVue2 = {
128
127
  this.$data.currentValue = this.$props.defaultValue;
129
128
  },
130
129
  mounted: function mounted() {
131
- this.$data.input = this.v3 ? this.inputRef : this.$refs.input;
130
+ this._input = this.v3 ? this.inputRef : this.$refs.input;
132
131
  this.$data.hasMounted = true;
133
132
  this.setValidity();
134
133
  },
@@ -154,14 +153,15 @@ var InputVue2 = {
154
153
  label = _a.label,
155
154
  id = _a.id,
156
155
  required = _a.required;
157
- var inputId = id || this.$data.inputId;
156
+ var inputId = id || this._inputId;
158
157
  var textbox = h('input', __assign(__assign({
159
158
  domProps: this.v3 ? null : __assign(__assign({}, this.$attrs), {
160
159
  placeholder: this.$props.placeholder,
161
160
  id: inputId,
162
161
  required: required,
163
162
  value: this.computedValue
164
- })
163
+ }),
164
+ attrs: this.v3 ? undefined : this.$attrs
165
165
  }, this.$attrs), {
166
166
  placeholder: this.$props.placeholder,
167
167
  id: inputId,
@@ -178,7 +178,7 @@ var InputVue2 = {
178
178
  keydown: this.handleKeydown,
179
179
  keyup: this.handleKeyup,
180
180
  keypress: this.handleKeypress,
181
- input: listeners.input || listeners.changemodel ? this.handleInput : kendo_vue_common_1.noop,
181
+ input: this.handleInput,
182
182
  animationstart: this.handleAutoFill,
183
183
  animationend: this.handleAutoFillEnd
184
184
  },
@@ -193,7 +193,7 @@ var InputVue2 = {
193
193
  onAnimationend: this.handleAutoFillEnd
194
194
  }));
195
195
  var inputWrapper = h("span", {
196
- "class": this.inputWrapperClass
196
+ "class": this.inputWrapperClass()
197
197
  }, [textbox]);
198
198
  return label ? // @ts-ignore function children
199
199
  h(kendo_vue_labels_1.FloatingLabel, {
@@ -236,24 +236,25 @@ var InputVue2 = {
236
236
  this.$emit('keypress', e);
237
237
  },
238
238
  focus: function focus() {
239
- if (this.$data.input) {
240
- this.$data.input.focus();
239
+ if (this._input) {
240
+ this._input.focus();
241
241
  }
242
242
  },
243
243
  validity: function validity() {
244
244
  var result = {
245
- badInput: this.$data.input ? this.$data.input.validity.badInput : false,
246
- patternMismatch: this.$data.input ? this.$data.input.validity.patternMismatch : false,
247
- rangeOverflow: this.$data.input ? this.$data.input.validity.rangeOverflow : false,
248
- rangeUnderflow: this.$data.input ? this.$data.input.validity.rangeUnderflow : false,
249
- stepMismatch: this.$data.input ? this.$data.input.validity.stepMismatch : false,
250
- tooLong: this.$data.input ? this.$data.input.validity.tooLong : false,
251
- typeMismatch: this.$data.input ? this.$data.input.validity.typeMismatch : false,
252
- valueMissing: this.$data.input ? this.$data.input.validity.valueMissing : false
245
+ badInput: this._input ? this._input.validity.badInput : false,
246
+ patternMismatch: this._input ? this._input.validity.patternMismatch : false,
247
+ rangeOverflow: this._input ? this._input.validity.rangeOverflow : false,
248
+ rangeUnderflow: this._input ? this._input.validity.rangeUnderflow : false,
249
+ stepMismatch: this._input ? this._input.validity.stepMismatch : false,
250
+ tooLong: this._input ? this._input.validity.tooLong : false,
251
+ tooShort: this._input ? this._input.validity.tooShort : false,
252
+ typeMismatch: this._input ? this._input.validity.typeMismatch : false,
253
+ valueMissing: this._input ? this._input.validity.valueMissing : false
253
254
  };
254
255
  return __assign(__assign({}, result), {
255
256
  customError: this.$props.validationMessage !== undefined,
256
- valid: this.$props.valid !== undefined ? this.$props.valid : this.$data.input ? !this.isInvalid(result) : true
257
+ valid: this.$props.valid !== undefined ? this.$props.valid : this._input ? !this.isInvalid(result) : true
257
258
  });
258
259
  },
259
260
  isInvalid: function isInvalid(state) {
@@ -268,8 +269,8 @@ var InputVue2 = {
268
269
  return result;
269
270
  },
270
271
  setValidity: function setValidity() {
271
- if (this.$data.input && this.$data.input.setCustomValidity) {
272
- this.$data.input.setCustomValidity(this.validity().valid ? '' : this.$props.validationMessage || '');
272
+ if (this._input && this._input.setCustomValidity) {
273
+ this._input.setCustomValidity(this.validity().valid ? '' : this.$props.validationMessage || '');
273
274
  }
274
275
  },
275
276
  handleInput: function handleInput(event) {
@@ -327,6 +328,19 @@ var InputVue2 = {
327
328
  },
328
329
  name: function name() {
329
330
  return this.$props.name;
331
+ },
332
+ inputWrapperClass: function inputWrapperClass() {
333
+ var _a;
334
+
335
+ var _b = this.$props,
336
+ size = _b.size,
337
+ fillMode = _b.fillMode,
338
+ rounded = _b.rounded;
339
+ var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
340
+ return _a = {
341
+ 'k-textbox': true,
342
+ 'k-input': true
343
+ }, _a["k-input-" + (kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a;
330
344
  }
331
345
  },
332
346
  computed: {
@@ -343,19 +357,6 @@ var InputVue2 = {
343
357
  };
344
358
  }
345
359
  },
346
- inputWrapperClass: function inputWrapperClass() {
347
- var _a;
348
-
349
- var _b = this.$props,
350
- size = _b.size,
351
- fillMode = _b.fillMode,
352
- rounded = _b.rounded;
353
- var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
354
- return _a = {
355
- 'k-textbox': true,
356
- 'k-input': true
357
- }, _a["k-input-" + (kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a;
358
- },
359
360
  computedValue: {
360
361
  get: function get() {
361
362
  return this.$data.valueDuringOnChange !== undefined ? this.$data.valueDuringOnChange : this.$props.value !== undefined ? this.$props.value : this.$props.modelValue !== undefined ? this.$props.modelValue : this.$data.currentValue;
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-inputs',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1644395586,
11
+ publishDate: 1644487823,
12
12
  version: '',
13
13
  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'
14
14
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-inputs",
3
3
  "description": "Kendo UI for Vue Input package",
4
- "version": "3.0.5",
4
+ "version": "3.0.6-dev.202202101018",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -38,21 +38,21 @@
38
38
  "vue": "^2.6.12 || ^3.0.2"
39
39
  },
40
40
  "dependencies": {
41
- "@progress/kendo-vue-buttons": "3.0.5",
42
- "@progress/kendo-vue-common": "3.0.5",
43
- "@progress/kendo-vue-labels": "3.0.5",
44
- "@progress/kendo-vue-popup": "3.0.5"
41
+ "@progress/kendo-vue-buttons": "3.0.6-dev.202202101018",
42
+ "@progress/kendo-vue-common": "3.0.6-dev.202202101018",
43
+ "@progress/kendo-vue-labels": "3.0.6-dev.202202101018",
44
+ "@progress/kendo-vue-popup": "3.0.6-dev.202202101018"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@progress/kendo-data-query": "^1.5.5",
48
48
  "@progress/kendo-date-math": "^1.5.4",
49
49
  "@progress/kendo-drawing": "^1.8.0",
50
50
  "@progress/kendo-licensing": "^1.1.0",
51
- "@progress/kendo-vue-buttons": "3.0.5",
52
- "@progress/kendo-vue-form": "3.0.5",
53
- "@progress/kendo-vue-intl": "3.0.5",
54
- "@progress/kendo-vue-labels": "3.0.5",
55
- "@progress/kendo-vue-tooltip": "3.0.5",
51
+ "@progress/kendo-vue-buttons": "3.0.6-dev.202202101018",
52
+ "@progress/kendo-vue-form": "3.0.6-dev.202202101018",
53
+ "@progress/kendo-vue-intl": "3.0.6-dev.202202101018",
54
+ "@progress/kendo-vue-labels": "3.0.6-dev.202202101018",
55
+ "@progress/kendo-vue-tooltip": "3.0.6-dev.202202101018",
56
56
  "cldr-core": "^34.0.0",
57
57
  "cldr-dates-full": "^34.0.0",
58
58
  "cldr-numbers-full": "^34.0.0"