@progress/kendo-vue-inputs 3.6.4 → 3.6.5-dev.202210181442

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.
Files changed (74) hide show
  1. package/dist/cdn/js/kendo-vue-inputs.js +1 -1
  2. package/dist/es/checkbox/Checkbox.js +17 -35
  3. package/dist/es/colors/ColorContrastLabels.js +0 -2
  4. package/dist/es/colors/ColorContrastSvg.js +6 -20
  5. package/dist/es/colors/ColorGradient.js +2 -28
  6. package/dist/es/colors/ColorInput.js +12 -20
  7. package/dist/es/colors/ColorPalette.js +0 -19
  8. package/dist/es/colors/ColorPicker.js +28 -52
  9. package/dist/es/colors/FlatColorPicker.js +14 -24
  10. package/dist/es/colors/HexInput.js +0 -4
  11. package/dist/es/colors/Picker.js +6 -9
  12. package/dist/es/input/Input.js +15 -29
  13. package/dist/es/input-separator/InputSeparator.js +0 -2
  14. package/dist/es/maskedtextbox/MaskedTextBox.js +13 -32
  15. package/dist/es/numerictextbox/NumericTextBox.js +15 -48
  16. package/dist/es/numerictextbox/utils/main.js +33 -132
  17. package/dist/es/package-metadata.js +1 -1
  18. package/dist/es/radiobutton/RadioButton.js +11 -16
  19. package/dist/es/radiobutton/RadioGroup.js +9 -12
  20. package/dist/es/range-slider/RangeSlider.js +9 -32
  21. package/dist/es/range-slider/range-raducer.js +0 -26
  22. package/dist/es/slider/Slider.js +8 -20
  23. package/dist/es/slider/SliderLabel.js +2 -12
  24. package/dist/es/switch/Switch.js +6 -18
  25. package/dist/es/textarea/TextArea.js +27 -40
  26. package/dist/esm/checkbox/Checkbox.js +17 -35
  27. package/dist/esm/colors/ColorContrastLabels.js +0 -2
  28. package/dist/esm/colors/ColorContrastSvg.js +6 -20
  29. package/dist/esm/colors/ColorGradient.js +2 -28
  30. package/dist/esm/colors/ColorInput.js +12 -20
  31. package/dist/esm/colors/ColorPalette.js +0 -19
  32. package/dist/esm/colors/ColorPicker.js +28 -52
  33. package/dist/esm/colors/FlatColorPicker.js +14 -24
  34. package/dist/esm/colors/HexInput.js +0 -4
  35. package/dist/esm/colors/Picker.js +6 -9
  36. package/dist/esm/input/Input.js +15 -29
  37. package/dist/esm/input-separator/InputSeparator.js +0 -2
  38. package/dist/esm/maskedtextbox/MaskedTextBox.js +13 -32
  39. package/dist/esm/numerictextbox/NumericTextBox.js +15 -48
  40. package/dist/esm/numerictextbox/utils/main.js +33 -132
  41. package/dist/esm/package-metadata.js +1 -1
  42. package/dist/esm/radiobutton/RadioButton.js +11 -16
  43. package/dist/esm/radiobutton/RadioGroup.js +9 -12
  44. package/dist/esm/range-slider/RangeSlider.js +9 -32
  45. package/dist/esm/range-slider/range-raducer.js +0 -26
  46. package/dist/esm/slider/Slider.js +8 -20
  47. package/dist/esm/slider/SliderLabel.js +2 -12
  48. package/dist/esm/switch/Switch.js +6 -18
  49. package/dist/esm/textarea/TextArea.js +27 -40
  50. package/dist/npm/checkbox/Checkbox.js +19 -43
  51. package/dist/npm/colors/ColorContrastLabels.js +2 -9
  52. package/dist/npm/colors/ColorContrastSvg.js +8 -26
  53. package/dist/npm/colors/ColorGradient.js +4 -44
  54. package/dist/npm/colors/ColorInput.js +12 -29
  55. package/dist/npm/colors/ColorPalette.js +2 -29
  56. package/dist/npm/colors/ColorPicker.js +26 -59
  57. package/dist/npm/colors/FlatColorPicker.js +14 -35
  58. package/dist/npm/colors/HexInput.js +2 -11
  59. package/dist/npm/colors/Picker.js +8 -15
  60. package/dist/npm/input/Input.js +15 -34
  61. package/dist/npm/input-separator/InputSeparator.js +2 -8
  62. package/dist/npm/maskedtextbox/MaskedTextBox.js +15 -40
  63. package/dist/npm/numerictextbox/NumericTextBox.js +17 -59
  64. package/dist/npm/numerictextbox/utils/main.js +33 -160
  65. package/dist/npm/package-metadata.js +1 -1
  66. package/dist/npm/radiobutton/RadioButton.js +13 -23
  67. package/dist/npm/radiobutton/RadioGroup.js +11 -19
  68. package/dist/npm/range-slider/RangeSlider.js +7 -38
  69. package/dist/npm/range-slider/range-raducer.js +0 -27
  70. package/dist/npm/slider/Slider.js +10 -30
  71. package/dist/npm/slider/SliderLabel.js +2 -15
  72. package/dist/npm/switch/Switch.js +8 -26
  73. package/dist/npm/textarea/TextArea.js +25 -43
  74. package/package.json +11 -11
@@ -4,51 +4,35 @@ var __assign = undefined && undefined.__assign || function () {
4
4
  __assign = Object.assign || function (t) {
5
5
  for (var s, i = 1, n = arguments.length; i < n; i++) {
6
6
  s = arguments[i];
7
-
8
7
  for (var p in s) {
9
8
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
10
9
  }
11
10
  }
12
-
13
11
  return t;
14
12
  };
15
-
16
13
  return __assign.apply(this, arguments);
17
14
  };
18
-
19
15
  Object.defineProperty(exports, "__esModule", {
20
16
  value: true
21
17
  });
22
- exports.FlatColorPickerVue2 = exports.FlatColorPicker = void 0; // @ts-ignore
23
-
18
+ exports.FlatColorPickerVue2 = exports.FlatColorPicker = void 0;
19
+ // @ts-ignore
24
20
  var Vue = require("vue");
25
-
26
21
  var allVue = Vue;
27
22
  var gh = allVue.h;
28
23
  var isV3 = allVue.version && allVue.version[0] === '3';
29
-
30
24
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
31
-
32
25
  var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
33
-
34
26
  var ColorPalette_1 = require("./ColorPalette");
35
-
36
27
  var ColorGradient_1 = require("./ColorGradient");
37
-
38
28
  var package_metadata_1 = require("../package-metadata");
39
-
40
29
  var main_1 = require("../messages/main");
41
-
42
30
  var color_parser_1 = require("./utils/color-parser");
43
-
44
31
  var color_cache_1 = require("./utils/color-cache");
45
-
46
32
  var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
47
33
  /**
48
34
  * @hidden
49
35
  */
50
-
51
-
52
36
  var FlatColorPickerVue2 = {
53
37
  name: 'KendoFlatColorPicker',
54
38
  // @ts-ignore
@@ -163,9 +147,7 @@ var FlatColorPickerVue2 = {
163
147
  // @ts-ignore
164
148
  render: function render(createElement) {
165
149
  var _this2 = this;
166
-
167
150
  var _this = this;
168
-
169
151
  var h = gh || createElement;
170
152
  var localizationService = (0, kendo_vue_intl_1.provideLocalizationService)(this);
171
153
  var gradientMessage = localizationService.toLanguageString(main_1.flatColorPickerGradientBtn, main_1.messages[main_1.flatColorPickerGradientBtn]);
@@ -183,7 +165,6 @@ var FlatColorPickerVue2 = {
183
165
  h: h,
184
166
  template: footerTemplate
185
167
  });
186
-
187
168
  var renderGradiente = function renderGradiente() {
188
169
  return h(ColorGradient_1.ColorGradient, __assign({
189
170
  attrs: this.v3 ? undefined : __assign({
@@ -203,7 +184,6 @@ var FlatColorPickerVue2 = {
203
184
  }
204
185
  }, this.gradientSettings));
205
186
  };
206
-
207
187
  var renderPalette = function renderPalette() {
208
188
  return h(ColorPalette_1.ColorPalette, __assign({
209
189
  on: this.v3 ? undefined : {
@@ -221,7 +201,6 @@ var FlatColorPickerVue2 = {
221
201
  onKeydown: this.gradientKeyDown
222
202
  }, this.paletteSettings));
223
203
  };
224
-
225
204
  return h("div", {
226
205
  tabindex: (0, kendo_vue_common_1.getTabIndex)(this.$props.tabIndex, this.$props.disabled),
227
206
  attrs: this.v3 ? undefined : {
@@ -246,9 +225,11 @@ var FlatColorPickerVue2 = {
246
225
  "class": "k-coloreditor-header k-hstack"
247
226
  }, [this.$props.view === 'combo' && h("div", {
248
227
  "class": "k-coloreditor-header-actions k-hstack"
249
- }, [// @ts-ignore function children
228
+ }, [
229
+ // @ts-ignore function children
250
230
  h(kendo_vue_buttons_1.ButtonGroup, this.v3 ? function () {
251
- return [// @ts-ignore function children
231
+ return [
232
+ // @ts-ignore function children
252
233
  h(kendo_vue_buttons_1.Button, {
253
234
  tabIndex: _this2.computedTabIndex,
254
235
  attrs: _this2.v3 ? undefined : {
@@ -280,7 +261,8 @@ var FlatColorPickerVue2 = {
280
261
  })];
281
262
  } : [h("span", {
282
263
  "class": "k-icon k-i-color-canvas"
283
- })]), // @ts-ignore function children
264
+ })]),
265
+ // @ts-ignore function children
284
266
  h(kendo_vue_buttons_1.Button, {
285
267
  tabIndex: _this2.computedTabIndex,
286
268
  attrs: _this2.v3 ? undefined : {
@@ -379,7 +361,8 @@ var FlatColorPickerVue2 = {
379
361
  "class": "k-spacer"
380
362
  }), h("div", {
381
363
  "class": "k-coloreditor-header-actions k-hstack"
382
- }, [this.$props.showClearButton && // @ts-ignore function children
364
+ }, [this.$props.showClearButton &&
365
+ // @ts-ignore function children
383
366
  h(kendo_vue_buttons_1.Button, {
384
367
  tabIndex: this.computedTabIndex,
385
368
  attrs: this.v3 ? undefined : {
@@ -427,7 +410,8 @@ var FlatColorPickerVue2 = {
427
410
  "class": "k-coloreditor-views k-vstack"
428
411
  }, [this.isColorGradient ? renderGradiente.call(this) : renderPalette.call(this)]), this.$props.showButtons && h("div", {
429
412
  "class": "k-coloreditor-footer k-actions k-actions-end"
430
- }, [// @ts-ignore function children
413
+ }, [
414
+ // @ts-ignore function children
431
415
  h(kendo_vue_buttons_1.Button, {
432
416
  tabIndex: this.computedTabIndex,
433
417
  attrs: this.v3 ? undefined : {
@@ -444,7 +428,8 @@ var FlatColorPickerVue2 = {
444
428
  onClick: this.handleCancelBtnClick
445
429
  }, this.v3 ? function () {
446
430
  return [cancelMessage];
447
- } : [cancelMessage]), // @ts-ignore function children
431
+ } : [cancelMessage]),
432
+ // @ts-ignore function children
448
433
  h(kendo_vue_buttons_1.Button, {
449
434
  tabIndex: this.computedTabIndex,
450
435
  attrs: this.v3 ? undefined : {
@@ -466,7 +451,6 @@ var FlatColorPickerVue2 = {
466
451
  methods: {
467
452
  focus: function focus() {
468
453
  var _this = this;
469
-
470
454
  this.focused = true;
471
455
  setTimeout(function () {
472
456
  (0, kendo_vue_common_1.focusFirstFocusableChild)(_this.$el);
@@ -486,21 +470,18 @@ var FlatColorPickerVue2 = {
486
470
  },
487
471
  handleResetColor: function handleResetColor() {
488
472
  this.colorValue = null;
489
-
490
473
  if (!this.showButtons) {
491
474
  this.triggerChange();
492
475
  }
493
476
  },
494
477
  handleColorChange: function handleColorChange(event) {
495
478
  this.colorValue = event.value;
496
-
497
479
  if (!this.showButtons) {
498
480
  this.triggerChange(event);
499
481
  }
500
482
  },
501
483
  handlePaletteColorChange: function handlePaletteColorChange(event) {
502
484
  this.colorValue = event.value;
503
-
504
485
  if (!this.showButtons) {
505
486
  this.triggerChange(event);
506
487
  }
@@ -524,7 +505,6 @@ var FlatColorPickerVue2 = {
524
505
  },
525
506
  gradientKeyDown: function gradientKeyDown(event) {
526
507
  event.stopPropagation();
527
-
528
508
  if (!this.showButtons && event.keyCode === kendo_vue_common_1.Keys.enter) {
529
509
  this.triggerChange(event);
530
510
  }
@@ -564,6 +544,5 @@ exports.FlatColorPickerVue2 = FlatColorPickerVue2;
564
544
  /**
565
545
  * @hidden
566
546
  */
567
-
568
547
  var FlatColorPicker = FlatColorPickerVue2;
569
548
  exports.FlatColorPicker = FlatColorPicker;
@@ -3,24 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.HexInputVue2 = exports.HexInput = void 0; // @ts-ignore
7
-
6
+ exports.HexInputVue2 = exports.HexInput = void 0;
7
+ // @ts-ignore
8
8
  var Vue = require("vue");
9
-
10
9
  var allVue = Vue;
11
10
  var gh = allVue.h;
12
11
  var isV3 = allVue.version && allVue.version[0] === '3';
13
-
14
12
  var color_parser_1 = require("./utils/color-parser");
15
-
16
13
  var misc_1 = require("./utils/misc");
17
-
18
14
  var Input_1 = require("../input/Input");
19
15
  /**
20
16
  * @hidden
21
17
  */
22
-
23
-
24
18
  var HexInputVue2 = {
25
19
  name: 'KendoHexInput',
26
20
  // @ts-ignore
@@ -92,7 +86,6 @@ var HexInputVue2 = {
92
86
  var hex = event.target.value;
93
87
  var value = (0, color_parser_1.parseColor)(hex, 'rgba');
94
88
  this.currentHex = hex;
95
-
96
89
  if ((0, misc_1.isPresent)(value)) {
97
90
  this.$emit('hexchange', {
98
91
  hex: hex,
@@ -105,7 +98,6 @@ var HexInputVue2 = {
105
98
  if (!(0, misc_1.isPresent)((0, color_parser_1.parseColor)(this.hex, 'rgba'))) {
106
99
  this.currentHex = this.originalHex;
107
100
  }
108
-
109
101
  this.$emit('blur', event);
110
102
  },
111
103
  onFocus: function onFocus(event) {
@@ -117,6 +109,5 @@ exports.HexInputVue2 = HexInputVue2;
117
109
  /**
118
110
  * @hidden
119
111
  */
120
-
121
112
  var HexInput = HexInputVue2;
122
113
  exports.HexInput = HexInput;
@@ -3,32 +3,25 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.PickerVue2 = exports.Picker = void 0; // @ts-ignore
7
-
6
+ exports.PickerVue2 = exports.Picker = void 0;
7
+ // @ts-ignore
8
8
  var Vue = require("vue");
9
-
10
9
  var allVue = Vue;
11
10
  var gh = allVue.h;
12
11
  var isV3 = allVue.version && allVue.version[0] === '3';
13
-
14
12
  var kendo_vue_popup_1 = require("@progress/kendo-vue-popup");
15
-
16
13
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
17
14
  /**
18
15
  * @hidden
19
16
  */
20
-
21
-
22
17
  var ANCHOR_VERTICAL_ALIGN = 'bottom';
23
18
  /**
24
19
  * @hidden
25
20
  */
26
-
27
21
  var POPUP_VERTICAL_ALIGN = 'top';
28
22
  /**
29
23
  * @hidden
30
24
  */
31
-
32
25
  var PickerVue2 = {
33
26
  name: 'KendoPicker',
34
27
  props: {
@@ -67,11 +60,12 @@ var PickerVue2 = {
67
60
  var h = gh || createElement;
68
61
  var defaultSlot = (0, kendo_vue_common_1.getDefaultSlots)(this);
69
62
  var _a = this.$props.popupSettings,
70
- popupClass = _a.popupClass,
71
- appendTo = _a.appendTo,
72
- animate = _a.animate,
73
- className = _a.className;
74
- return (// @ts-ignore function children
63
+ popupClass = _a.popupClass,
64
+ appendTo = _a.appendTo,
65
+ animate = _a.animate,
66
+ className = _a.className;
67
+ return (
68
+ // @ts-ignore function children
75
69
  h(kendo_vue_popup_1.Popup, {
76
70
  id: this.id,
77
71
  attrs: this.v3 ? undefined : {
@@ -116,6 +110,5 @@ exports.PickerVue2 = PickerVue2;
116
110
  /**
117
111
  * @hidden
118
112
  */
119
-
120
113
  var Picker = PickerVue2;
121
114
  exports.Picker = Picker;
@@ -4,40 +4,30 @@ var __assign = undefined && undefined.__assign || function () {
4
4
  __assign = Object.assign || function (t) {
5
5
  for (var s, i = 1, n = arguments.length; i < n; i++) {
6
6
  s = arguments[i];
7
-
8
7
  for (var p in s) {
9
8
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
10
9
  }
11
10
  }
12
-
13
11
  return t;
14
12
  };
15
-
16
13
  return __assign.apply(this, arguments);
17
14
  };
18
-
19
15
  Object.defineProperty(exports, "__esModule", {
20
16
  value: true
21
17
  });
22
- exports.InputVue2 = exports.Input = void 0; // @ts-ignore
23
-
18
+ exports.InputVue2 = exports.Input = void 0;
19
+ // @ts-ignore
24
20
  var Vue = require("vue");
25
-
26
21
  var allVue = Vue;
27
22
  var gh = allVue.h;
28
23
  var isV3 = allVue.version && allVue.version[0] === '3';
29
24
  var ref = allVue.ref;
30
-
31
25
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
32
-
33
26
  var package_metadata_1 = require("../package-metadata");
34
-
35
27
  var kendo_vue_labels_1 = require("@progress/kendo-vue-labels");
36
28
  /**
37
29
  * @hidden
38
30
  */
39
-
40
-
41
31
  var InputVue2 = {
42
32
  model: {
43
33
  event: 'changemodel'
@@ -163,18 +153,17 @@ var InputVue2 = {
163
153
  },
164
154
  render: function render(createElement) {
165
155
  var _this = this;
166
-
167
156
  var h = gh || createElement;
168
157
  var isValid = !this.$props.validityStyles || this.validity().valid;
169
158
  var _a = this.$props,
170
- label = _a.label,
171
- id = _a.id,
172
- required = _a.required,
173
- iconName = _a.iconName,
174
- showValidationIcon = _a.showValidationIcon,
175
- showLoadingIcon = _a.showLoadingIcon,
176
- showClearButton = _a.showClearButton,
177
- tabIndex = _a.tabIndex;
159
+ label = _a.label,
160
+ id = _a.id,
161
+ required = _a.required,
162
+ iconName = _a.iconName,
163
+ showValidationIcon = _a.showValidationIcon,
164
+ showLoadingIcon = _a.showLoadingIcon,
165
+ showClearButton = _a.showClearButton,
166
+ tabIndex = _a.tabIndex;
178
167
  var inputId = id || this._inputId;
179
168
  var textbox = h('input', __assign(__assign({
180
169
  domProps: this.v3 ? null : __assign(__assign({}, this.$attrs), {
@@ -261,7 +250,8 @@ var InputVue2 = {
261
250
  }, [h("span", {
262
251
  "class": "k-icon k-i-x"
263
252
  })])]);
264
- return label ? // @ts-ignore function children
253
+ return label ?
254
+ // @ts-ignore function children
265
255
  h(kendo_vue_labels_1.FloatingLabel, {
266
256
  label: label,
267
257
  attrs: this.v3 ? undefined : {
@@ -331,13 +321,11 @@ var InputVue2 = {
331
321
  },
332
322
  isInvalid: function isInvalid(state) {
333
323
  var result = false;
334
-
335
324
  for (var prop in state) {
336
325
  if (state.hasOwnProperty(prop)) {
337
326
  result = result || state[prop];
338
327
  }
339
328
  }
340
-
341
329
  return result;
342
330
  },
343
331
  setValidity: function setValidity() {
@@ -353,11 +341,9 @@ var InputVue2 = {
353
341
  },
354
342
  emitUpdate: function emitUpdate(event, eventName, value) {
355
343
  var that = this;
356
-
357
344
  if (this.disabled) {
358
345
  return;
359
346
  }
360
-
361
347
  this.$data.currentValue = value;
362
348
  this.$data.valueDuringOnChange = value;
363
349
  this.$nextTick(function () {
@@ -376,7 +362,6 @@ var InputVue2 = {
376
362
  handleAutoFill: function handleAutoFill(e) {
377
363
  if (e.animationName === 'autoFillStart') {
378
364
  var parent_1 = e.target.parentNode;
379
-
380
365
  if (parent_1 && parent_1.classList.contains('k-empty')) {
381
366
  this.$data.autofill = true;
382
367
  parent_1.classList.remove('k-empty');
@@ -386,7 +371,6 @@ var InputVue2 = {
386
371
  handleAutoFillEnd: function handleAutoFillEnd(e) {
387
372
  if (e.animationName === 'autoFillEnd') {
388
373
  var parent_2 = e.target.parentNode;
389
-
390
374
  if (parent_2) {
391
375
  this.$data.autofill = false;
392
376
  }
@@ -397,11 +381,10 @@ var InputVue2 = {
397
381
  },
398
382
  inputWrapperClass: function inputWrapperClass() {
399
383
  var _a;
400
-
401
384
  var _b = this.$props,
402
- size = _b.size,
403
- fillMode = _b.fillMode,
404
- rounded = _b.rounded;
385
+ size = _b.size,
386
+ fillMode = _b.fillMode,
387
+ rounded = _b.rounded;
405
388
  var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
406
389
  return _a = {
407
390
  'k-textbox': true,
@@ -425,7 +408,6 @@ var InputVue2 = {
425
408
  },
426
409
  inputInnerClass: function inputInnerClass() {
427
410
  var _a;
428
-
429
411
  return _a = {
430
412
  'k-input-inner': true
431
413
  }, _a[this.inputClass] = this.inputClass, _a;
@@ -441,6 +423,5 @@ exports.InputVue2 = InputVue2;
441
423
  /**
442
424
  * @hidden
443
425
  */
444
-
445
426
  var Input = InputVue2;
446
427
  exports.Input = Input;
@@ -3,22 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.InputSeparatorVue2 = exports.InputSeparator = void 0; // @ts-ignore
7
-
6
+ exports.InputSeparatorVue2 = exports.InputSeparator = void 0;
7
+ // @ts-ignore
8
8
  var Vue = require("vue");
9
-
10
9
  var allVue = Vue;
11
10
  var gh = allVue.h;
12
11
  var isV3 = allVue.version && allVue.version[0] === '3';
13
-
14
12
  var package_metadata_1 = require("../package-metadata");
15
-
16
13
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
17
14
  /**
18
15
  * @hidden
19
16
  */
20
-
21
-
22
17
  var InputSeparatorVue2 = {
23
18
  created: function created() {
24
19
  (0, kendo_vue_common_1.validatePackage)(package_metadata_1.packageMetadata);
@@ -48,6 +43,5 @@ exports.InputSeparatorVue2 = InputSeparatorVue2;
48
43
  * </template>
49
44
  * ```
50
45
  */
51
-
52
46
  var InputSeparator = InputSeparatorVue2;
53
47
  exports.InputSeparator = InputSeparator;
@@ -3,27 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.MaskedTextBoxVue2 = exports.MaskedTextBox = void 0; // @ts-ignore
7
-
6
+ exports.MaskedTextBoxVue2 = exports.MaskedTextBox = void 0;
7
+ // @ts-ignore
8
8
  var Vue = require("vue");
9
-
10
9
  var allVue = Vue;
11
10
  var gh = allVue.h;
12
11
  var isV3 = allVue.version && allVue.version[0] === '3';
13
12
  var ref = allVue.ref;
14
-
15
13
  var masking_service_1 = require("./masking.service");
16
-
17
14
  var utils_1 = require("./utils");
18
-
19
15
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
20
-
21
16
  var package_metadata_1 = require("../package-metadata");
22
17
  /**
23
18
  * @hidden
24
19
  */
25
-
26
-
27
20
  var MaskedTextBoxVue2 = {
28
21
  model: {
29
22
  event: 'changemodel'
@@ -142,8 +135,8 @@ var MaskedTextBoxVue2 = {
142
135
  };
143
136
  },
144
137
  mounted: function mounted() {
145
- this.hasMounted = true; // @ts-ignore
146
-
138
+ this.hasMounted = true;
139
+ // @ts-ignore
147
140
  this.element = this.input = this.v3 ? this.inputRef : this.$refs.input;
148
141
  this.updateService();
149
142
  this.setValidity();
@@ -175,21 +168,18 @@ var MaskedTextBoxVue2 = {
175
168
  if (this.element && this.currentFocused) {
176
169
  // && this.prevCurrentFocused
177
170
  var _a = this.currentSelection,
178
- start = _a[0],
179
- end = _a[1];
171
+ start = _a[0],
172
+ end = _a[1];
180
173
  var prevSelection = this.prevSelection;
181
174
  var nextSelection = this.$props.selection;
182
-
183
175
  if (!prevSelection && nextSelection || prevSelection && nextSelection && (prevSelection.start !== nextSelection.start || prevSelection.end !== nextSelection.end)) {
184
176
  start = nextSelection.start;
185
177
  end = nextSelection.end;
186
178
  }
187
-
188
179
  if (start !== null && end !== null) {
189
180
  this.element.setSelectionRange(start, end);
190
181
  }
191
182
  }
192
-
193
183
  var prevProps = {
194
184
  includeLiterals: this.prevIncludeLiterals,
195
185
  mask: this.prevMask,
@@ -197,11 +187,9 @@ var MaskedTextBoxVue2 = {
197
187
  promptPlaceholder: this.prevPromptPlaceholder,
198
188
  rules: this.prevRules
199
189
  };
200
-
201
190
  if ((0, utils_1.maskingChanged)(prevProps, this.$props)) {
202
191
  this.updateService();
203
192
  }
204
-
205
193
  this.setValidity();
206
194
  },
207
195
  computed: {
@@ -213,7 +201,6 @@ var MaskedTextBoxVue2 = {
213
201
  spanClassNames: {
214
202
  get: function get() {
215
203
  var _a;
216
-
217
204
  var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
218
205
  return _a = {
219
206
  'k-floating-label-container': true,
@@ -227,11 +214,10 @@ var MaskedTextBoxVue2 = {
227
214
  },
228
215
  wrapperSpanClass: function wrapperSpanClass() {
229
216
  var _a;
230
-
231
217
  var _b = this.$props,
232
- size = _b.size,
233
- fillMode = _b.fillMode,
234
- rounded = _b.rounded;
218
+ size = _b.size,
219
+ fillMode = _b.fillMode,
220
+ rounded = _b.rounded;
235
221
  var isValid = !this.$props.validityStyles || this.validity().valid;
236
222
  return _a = {
237
223
  'k-maskedtextbox': true,
@@ -240,7 +226,6 @@ var MaskedTextBoxVue2 = {
240
226
  },
241
227
  inputInnerClass: function inputInnerClass() {
242
228
  var _a;
243
-
244
229
  return _a = {
245
230
  'k-input-inner': true
246
231
  }, _a[this.inputClass] = this.inputClass, _a;
@@ -254,7 +239,6 @@ var MaskedTextBoxVue2 = {
254
239
  },
255
240
  computedValue: function computedValue() {
256
241
  var value;
257
-
258
242
  if (this.valueDuringOnChange !== undefined) {
259
243
  value = this.valueDuringOnChange;
260
244
  } else if (this.$props.value !== undefined) {
@@ -266,7 +250,6 @@ var MaskedTextBoxVue2 = {
266
250
  } else if (this.$props.defaultValue !== undefined) {
267
251
  value = this.$props.defaultValue;
268
252
  }
269
-
270
253
  return value || '';
271
254
  },
272
255
  rawValue: function rawValue() {
@@ -285,13 +268,11 @@ var MaskedTextBoxVue2 = {
285
268
  },
286
269
  pasteHandler: function pasteHandler(event) {
287
270
  var _a = event.target,
288
- selectionStart = _a.selectionStart,
289
- selectionEnd = _a.selectionEnd;
290
-
271
+ selectionStart = _a.selectionStart,
272
+ selectionEnd = _a.selectionEnd;
291
273
  if (selectionEnd === selectionStart) {
292
274
  return;
293
275
  }
294
-
295
276
  this.isPasted = true;
296
277
  this.currentSelection = [selectionStart || 0, selectionEnd || 0];
297
278
  },
@@ -303,17 +284,14 @@ var MaskedTextBoxVue2 = {
303
284
  var value = this.inputValue = input.value;
304
285
  var start = this.currentSelection[0] || 0;
305
286
  var end = this.currentSelection[1] || 0;
306
-
307
287
  if (!this.$props.mask) {
308
288
  this.isPasted = false;
309
289
  this.currentSelection = [null, null];
310
290
  this.triggerOnChange(value, event);
311
291
  return;
312
292
  }
313
-
314
293
  var maskedValue = this.computedValue();
315
294
  var result;
316
-
317
295
  if (this.isPasted) {
318
296
  this.isPasted = false;
319
297
  var rightPart = maskedValue.length - end;
@@ -322,7 +300,6 @@ var MaskedTextBoxVue2 = {
322
300
  } else {
323
301
  result = this.service.maskInput(value, maskedValue, input.selectionStart || 0);
324
302
  }
325
-
326
303
  this.currentSelection = [result.selection, result.selection];
327
304
  this.triggerOnChange(result.value, event);
328
305
  this.inputValue = undefined;
@@ -374,7 +351,6 @@ var MaskedTextBoxVue2 = {
374
351
  promptPlaceholder: this.$props.promptPlaceholder,
375
352
  rules: this.$props.rules
376
353
  }, extra); // tslint:disable-line:align
377
-
378
354
  this.service.update(config);
379
355
  },
380
356
  setValidity: function setValidity() {
@@ -388,10 +364,10 @@ var MaskedTextBoxVue2 = {
388
364
  var h = gh || createElement;
389
365
  var inputId = this.$props.id || this.inputId;
390
366
  var _a = this.$props,
391
- iconName = _a.iconName,
392
- showValidationIcon = _a.showValidationIcon,
393
- showLoadingIcon = _a.showLoadingIcon,
394
- showClearButton = _a.showClearButton;
367
+ iconName = _a.iconName,
368
+ showValidationIcon = _a.showValidationIcon,
369
+ showLoadingIcon = _a.showLoadingIcon,
370
+ showClearButton = _a.showClearButton;
395
371
  var isValid = !this.$props.validityStyles || this.validity().valid;
396
372
  var newValue = this.computedValue();
397
373
  var inputValue = this.inputValue;
@@ -519,6 +495,5 @@ exports.MaskedTextBoxVue2 = MaskedTextBoxVue2;
519
495
  /**
520
496
  * @hidden
521
497
  */
522
-
523
498
  var MaskedTextBox = MaskedTextBoxVue2;
524
499
  exports.MaskedTextBox = MaskedTextBox;