@progress/kendo-vue-inputs 3.0.5-dev.202202090804 → 3.0.7-dev.202202110648

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,18 +106,18 @@ 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
  };
113
112
  },
114
113
  created: function created() {
115
114
  validatePackage(packageMetadata);
115
+ this._input = undefined;
116
116
  this.$data.valueDuringOnChange = undefined;
117
117
  this.$data.currentValue = this.$props.defaultValue;
118
118
  },
119
119
  mounted: function mounted() {
120
- this.$data.input = this.v3 ? this.inputRef : this.$refs.input;
120
+ this._input = this.v3 ? this.inputRef : this.$refs.input;
121
121
  this.$data.hasMounted = true;
122
122
  this.setValidity();
123
123
  },
@@ -143,14 +143,15 @@ var InputVue2 = {
143
143
  label = _a.label,
144
144
  id = _a.id,
145
145
  required = _a.required;
146
- var inputId = id || this.$data.inputId;
146
+ var inputId = id || this._inputId;
147
147
  var textbox = h('input', __assign(__assign({
148
148
  domProps: this.v3 ? null : __assign(__assign({}, this.$attrs), {
149
149
  placeholder: this.$props.placeholder,
150
150
  id: inputId,
151
151
  required: required,
152
152
  value: this.computedValue
153
- })
153
+ }),
154
+ attrs: this.v3 ? undefined : this.$attrs
154
155
  }, this.$attrs), {
155
156
  placeholder: this.$props.placeholder,
156
157
  id: inputId,
@@ -167,7 +168,7 @@ var InputVue2 = {
167
168
  keydown: this.handleKeydown,
168
169
  keyup: this.handleKeyup,
169
170
  keypress: this.handleKeypress,
170
- input: listeners.input || listeners.changemodel ? this.handleInput : noop,
171
+ input: this.handleInput,
171
172
  animationstart: this.handleAutoFill,
172
173
  animationend: this.handleAutoFillEnd
173
174
  },
@@ -182,7 +183,7 @@ var InputVue2 = {
182
183
  onAnimationend: this.handleAutoFillEnd
183
184
  }));
184
185
  var inputWrapper = h("span", {
185
- "class": this.inputWrapperClass
186
+ "class": this.inputWrapperClass()
186
187
  }, [textbox]);
187
188
  return label ? // @ts-ignore function children
188
189
  h(FloatingLabel, {
@@ -225,24 +226,25 @@ var InputVue2 = {
225
226
  this.$emit('keypress', e);
226
227
  },
227
228
  focus: function focus() {
228
- if (this.$data.input) {
229
- this.$data.input.focus();
229
+ if (this._input) {
230
+ this._input.focus();
230
231
  }
231
232
  },
232
233
  validity: function validity() {
233
234
  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
235
+ badInput: this._input ? this._input.validity.badInput : false,
236
+ patternMismatch: this._input ? this._input.validity.patternMismatch : false,
237
+ rangeOverflow: this._input ? this._input.validity.rangeOverflow : false,
238
+ rangeUnderflow: this._input ? this._input.validity.rangeUnderflow : false,
239
+ stepMismatch: this._input ? this._input.validity.stepMismatch : false,
240
+ tooLong: this._input ? this._input.validity.tooLong : false,
241
+ tooShort: this._input ? this._input.validity.tooShort : false,
242
+ typeMismatch: this._input ? this._input.validity.typeMismatch : false,
243
+ valueMissing: this._input ? this._input.validity.valueMissing : false
242
244
  };
243
245
  return __assign(__assign({}, result), {
244
246
  customError: this.$props.validationMessage !== undefined,
245
- valid: this.$props.valid !== undefined ? this.$props.valid : this.$data.input ? !this.isInvalid(result) : true
247
+ valid: this.$props.valid !== undefined ? this.$props.valid : this._input ? !this.isInvalid(result) : true
246
248
  });
247
249
  },
248
250
  isInvalid: function isInvalid(state) {
@@ -257,8 +259,8 @@ var InputVue2 = {
257
259
  return result;
258
260
  },
259
261
  setValidity: function setValidity() {
260
- if (this.$data.input && this.$data.input.setCustomValidity) {
261
- this.$data.input.setCustomValidity(this.validity().valid ? '' : this.$props.validationMessage || '');
262
+ if (this._input && this._input.setCustomValidity) {
263
+ this._input.setCustomValidity(this.validity().valid ? '' : this.$props.validationMessage || '');
262
264
  }
263
265
  },
264
266
  handleInput: function handleInput(event) {
@@ -316,6 +318,19 @@ var InputVue2 = {
316
318
  },
317
319
  name: function name() {
318
320
  return this.$props.name;
321
+ },
322
+ inputWrapperClass: function inputWrapperClass() {
323
+ var _a;
324
+
325
+ var _b = this.$props,
326
+ size = _b.size,
327
+ fillMode = _b.fillMode,
328
+ rounded = _b.rounded;
329
+ var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
330
+ return _a = {
331
+ 'k-textbox': true,
332
+ 'k-input': true
333
+ }, _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
334
  }
320
335
  },
321
336
  computed: {
@@ -332,19 +347,6 @@ var InputVue2 = {
332
347
  };
333
348
  }
334
349
  },
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
350
  computedValue: {
349
351
  get: function get() {
350
352
  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: 1644393431,
8
+ publishDate: 1644561624,
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,18 +117,18 @@ 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
  };
124
123
  },
125
124
  created: function created() {
126
125
  kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
126
+ this._input = undefined;
127
127
  this.$data.valueDuringOnChange = undefined;
128
128
  this.$data.currentValue = this.$props.defaultValue;
129
129
  },
130
130
  mounted: function mounted() {
131
- this.$data.input = this.v3 ? this.inputRef : this.$refs.input;
131
+ this._input = this.v3 ? this.inputRef : this.$refs.input;
132
132
  this.$data.hasMounted = true;
133
133
  this.setValidity();
134
134
  },
@@ -154,14 +154,15 @@ var InputVue2 = {
154
154
  label = _a.label,
155
155
  id = _a.id,
156
156
  required = _a.required;
157
- var inputId = id || this.$data.inputId;
157
+ var inputId = id || this._inputId;
158
158
  var textbox = h('input', __assign(__assign({
159
159
  domProps: this.v3 ? null : __assign(__assign({}, this.$attrs), {
160
160
  placeholder: this.$props.placeholder,
161
161
  id: inputId,
162
162
  required: required,
163
163
  value: this.computedValue
164
- })
164
+ }),
165
+ attrs: this.v3 ? undefined : this.$attrs
165
166
  }, this.$attrs), {
166
167
  placeholder: this.$props.placeholder,
167
168
  id: inputId,
@@ -178,7 +179,7 @@ var InputVue2 = {
178
179
  keydown: this.handleKeydown,
179
180
  keyup: this.handleKeyup,
180
181
  keypress: this.handleKeypress,
181
- input: listeners.input || listeners.changemodel ? this.handleInput : kendo_vue_common_1.noop,
182
+ input: this.handleInput,
182
183
  animationstart: this.handleAutoFill,
183
184
  animationend: this.handleAutoFillEnd
184
185
  },
@@ -193,7 +194,7 @@ var InputVue2 = {
193
194
  onAnimationend: this.handleAutoFillEnd
194
195
  }));
195
196
  var inputWrapper = h("span", {
196
- "class": this.inputWrapperClass
197
+ "class": this.inputWrapperClass()
197
198
  }, [textbox]);
198
199
  return label ? // @ts-ignore function children
199
200
  h(kendo_vue_labels_1.FloatingLabel, {
@@ -236,24 +237,25 @@ var InputVue2 = {
236
237
  this.$emit('keypress', e);
237
238
  },
238
239
  focus: function focus() {
239
- if (this.$data.input) {
240
- this.$data.input.focus();
240
+ if (this._input) {
241
+ this._input.focus();
241
242
  }
242
243
  },
243
244
  validity: function validity() {
244
245
  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
246
+ badInput: this._input ? this._input.validity.badInput : false,
247
+ patternMismatch: this._input ? this._input.validity.patternMismatch : false,
248
+ rangeOverflow: this._input ? this._input.validity.rangeOverflow : false,
249
+ rangeUnderflow: this._input ? this._input.validity.rangeUnderflow : false,
250
+ stepMismatch: this._input ? this._input.validity.stepMismatch : false,
251
+ tooLong: this._input ? this._input.validity.tooLong : false,
252
+ tooShort: this._input ? this._input.validity.tooShort : false,
253
+ typeMismatch: this._input ? this._input.validity.typeMismatch : false,
254
+ valueMissing: this._input ? this._input.validity.valueMissing : false
253
255
  };
254
256
  return __assign(__assign({}, result), {
255
257
  customError: this.$props.validationMessage !== undefined,
256
- valid: this.$props.valid !== undefined ? this.$props.valid : this.$data.input ? !this.isInvalid(result) : true
258
+ valid: this.$props.valid !== undefined ? this.$props.valid : this._input ? !this.isInvalid(result) : true
257
259
  });
258
260
  },
259
261
  isInvalid: function isInvalid(state) {
@@ -268,8 +270,8 @@ var InputVue2 = {
268
270
  return result;
269
271
  },
270
272
  setValidity: function setValidity() {
271
- if (this.$data.input && this.$data.input.setCustomValidity) {
272
- this.$data.input.setCustomValidity(this.validity().valid ? '' : this.$props.validationMessage || '');
273
+ if (this._input && this._input.setCustomValidity) {
274
+ this._input.setCustomValidity(this.validity().valid ? '' : this.$props.validationMessage || '');
273
275
  }
274
276
  },
275
277
  handleInput: function handleInput(event) {
@@ -327,6 +329,19 @@ var InputVue2 = {
327
329
  },
328
330
  name: function name() {
329
331
  return this.$props.name;
332
+ },
333
+ inputWrapperClass: function inputWrapperClass() {
334
+ var _a;
335
+
336
+ var _b = this.$props,
337
+ size = _b.size,
338
+ fillMode = _b.fillMode,
339
+ rounded = _b.rounded;
340
+ var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
341
+ return _a = {
342
+ 'k-textbox': true,
343
+ 'k-input': true
344
+ }, _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
345
  }
331
346
  },
332
347
  computed: {
@@ -343,19 +358,6 @@ var InputVue2 = {
343
358
  };
344
359
  }
345
360
  },
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
361
  computedValue: {
360
362
  get: function get() {
361
363
  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: 1644393431,
11
+ publishDate: 1644561624,
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-dev.202202090804",
4
+ "version": "3.0.7-dev.202202110648",
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-dev.202202090804",
42
- "@progress/kendo-vue-common": "3.0.5-dev.202202090804",
43
- "@progress/kendo-vue-labels": "3.0.5-dev.202202090804",
44
- "@progress/kendo-vue-popup": "3.0.5-dev.202202090804"
41
+ "@progress/kendo-vue-buttons": "3.0.7-dev.202202110648",
42
+ "@progress/kendo-vue-common": "3.0.7-dev.202202110648",
43
+ "@progress/kendo-vue-labels": "3.0.7-dev.202202110648",
44
+ "@progress/kendo-vue-popup": "3.0.7-dev.202202110648"
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-dev.202202090804",
52
- "@progress/kendo-vue-form": "3.0.5-dev.202202090804",
53
- "@progress/kendo-vue-intl": "3.0.5-dev.202202090804",
54
- "@progress/kendo-vue-labels": "3.0.5-dev.202202090804",
55
- "@progress/kendo-vue-tooltip": "3.0.5-dev.202202090804",
51
+ "@progress/kendo-vue-buttons": "3.0.7-dev.202202110648",
52
+ "@progress/kendo-vue-form": "3.0.7-dev.202202110648",
53
+ "@progress/kendo-vue-intl": "3.0.7-dev.202202110648",
54
+ "@progress/kendo-vue-labels": "3.0.7-dev.202202110648",
55
+ "@progress/kendo-vue-tooltip": "3.0.7-dev.202202110648",
56
56
  "cldr-core": "^34.0.0",
57
57
  "cldr-dates-full": "^34.0.0",
58
58
  "cldr-numbers-full": "^34.0.0"