@progress/kendo-vue-inputs 3.4.5 → 3.5.0

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.
@@ -9,7 +9,7 @@ import { packageMetadata } from '../package-metadata';
9
9
  import { Slider } from './../main';
10
10
  import { fitIntoBounds, isPresent } from './utils/misc';
11
11
  import { getColorFromHue, parseColor, getHSV, getColorFromHSV, getRGBA, getColorFromRGBA } from './utils/color-parser';
12
- import { removeCachedColor, getCachedHsva, getCachedRgba, getCachedHex } from './utils/color-cache';
12
+ import { removeCachedColor } from './utils/color-cache';
13
13
  import { ColorInput } from './ColorInput';
14
14
  import { ColorContrastLabels } from './ColorContrastLabels';
15
15
  import { ColorContrastSvg } from './ColorContrastSvg';
@@ -66,8 +66,11 @@ var ColorGradientVue2 = {
66
66
  this.guid = guid();
67
67
  },
68
68
  computed: {
69
+ valueSet: function valueSet() {
70
+ return this.value || this.modelValue || this.modelRgbaValue;
71
+ },
69
72
  computedValue: function computedValue() {
70
- var value = this.value || this.defaultValue || this.modelValue || this.modelRgbaValue || this.currentValue || parseColor(DEFAULT_SELECTED_COLOR, FORMAT);
73
+ var value = this.valueSet || this.currentValue || this.defaultValue || parseColor(DEFAULT_SELECTED_COLOR, FORMAT);
71
74
 
72
75
  if (!isPresent(parseColor(value, 'hex', this.opacity))) {
73
76
  // Validate/sanitize the input.
@@ -77,13 +80,13 @@ var ColorGradientVue2 = {
77
80
  return value;
78
81
  },
79
82
  hsva: function hsva() {
80
- return this.currentHsva || getCachedHsva(this.guid, this.computedValue) || getHSV(this.computedValue);
83
+ return this.valueSet ? getHSV(this.computedValue) : this.currentHsva || getHSV(this.computedValue);
81
84
  },
82
85
  rgba: function rgba() {
83
- return this.currentRgba || getCachedRgba(this.guid, this.computedValue) || getRGBA(this.computedValue);
86
+ return this.valueSet ? getRGBA(this.computedValue) : this.currentRgba;
84
87
  },
85
88
  hex: function hex() {
86
- return this.currentHex || getCachedHex(this.guid, this.computedValue) || parseColor(this.computedValue, 'hex', this.opacity);
89
+ return this.valueSet ? parseColor(this.computedValue, 'hex', this.opacity) : this.currentHex;
87
90
  },
88
91
  computedBgColor: function computedBgColor() {
89
92
  return this.currentBgColor || getColorFromHue(this.hsva.h);
@@ -44,7 +44,12 @@ var ColorInputVue2 = {
44
44
  },
45
45
  props: {
46
46
  tabIndex: Number,
47
- rgba: Object,
47
+ rgba: {
48
+ type: Object,
49
+ default: function _default() {
50
+ return {};
51
+ }
52
+ },
48
53
  hex: String,
49
54
  opacity: Boolean,
50
55
  disabled: Boolean
@@ -234,7 +234,7 @@ var ColorPickerVue2 = {
234
234
  on: this.v3 ? undefined : {
235
235
  'keydown': this.onKeyDownHandler,
236
236
  'change': this.onFlatChangeHandler,
237
- 'blur': this.onBlurHandler,
237
+ 'focusout': this.onBlurHandler,
238
238
  'viewchange': this.onViewChange
239
239
  },
240
240
  ref: setRef(this, 'flatcolorpicker'),
@@ -255,7 +255,7 @@ var ColorPickerVue2 = {
255
255
  gradientSettings: this.gradientSettings
256
256
  }, this.flatColorPickerSettings),
257
257
  onChange: this.onFlatChangeHandler,
258
- onBlur: this.onBlurHandler,
258
+ onFocusout: this.onBlurHandler,
259
259
  onViewchange: this.onViewChange,
260
260
  paletteSettings: this.paletteSettings,
261
261
  gradientSettings: this.gradientSettings
@@ -431,8 +431,11 @@ var ColorPickerVue2 = {
431
431
  isViewFocused: function isViewFocused() {
432
432
  return !!(document.activeElement && document.activeElement.closest("#" + this._popupId));
433
433
  },
434
- onButtonBlur: function onButtonBlur() {
434
+ onButtonBlur: function onButtonBlur(event) {
435
435
  this.focused = this.isViewFocused();
436
+ this.$emit('blur', {
437
+ event: event
438
+ });
436
439
  },
437
440
  onFocusHandler: function onFocusHandler(event) {
438
441
  if (this.blurTimeoutRef) {
@@ -460,14 +463,11 @@ var ColorPickerVue2 = {
460
463
  this.focused = viewIsFocused;
461
464
  this.blurTimeoutRef = undefined;
462
465
  },
463
- onBlurHandler: function onBlurHandler(event) {
466
+ onBlurHandler: function onBlurHandler() {
464
467
  clearTimeout(this.blurTimeoutRef);
465
468
  this.palette = getRef(this, 'palette');
466
469
  this.gradient = getRef(this, 'gradient');
467
470
  this.blurTimeoutRef = setTimeout(this.onBlurTimeout, 200);
468
- this.$emit('blur', {
469
- event: event
470
- });
471
471
  },
472
472
  onViewChange: function onViewChange(event) {
473
473
  this.$emit('viewchange', event);
@@ -8,7 +8,7 @@ import { FlatColorPickerViewChangeEvent } from './interfaces/FlatColorPickerView
8
8
  import { ColorGradientProps } from './interfaces/ColorGradientProps';
9
9
  import { ColorPickerPaletteSettings } from './interfaces/ColorPickerPaletteSettings';
10
10
  /**
11
- * Represents the properties of [FlatColorPicker](% slug api_inputs_flatcolorpicker %) component.
11
+ * Represents the properties of [FlatColorPicker](% slug api_inputs_flatcolorpickerprops %) component.
12
12
  */
13
13
  export interface FlatColorPickerProps {
14
14
  /**
@@ -42,6 +42,7 @@ var FlatColorPickerVue2 = {
42
42
  'update:modelRgbaValue': null,
43
43
  'focus': null,
44
44
  'blur': null,
45
+ 'focusout': null,
45
46
  'keydown': null,
46
47
  'change': null
47
48
  },
@@ -214,9 +215,11 @@ var FlatColorPickerVue2 = {
214
215
  on: this.v3 ? undefined : {
215
216
  "focus": this.onFocus,
216
217
  "blur": this.onBlur,
218
+ "focusout": this.onFocusout,
217
219
  "keydown": this.onKeyDownHandler
218
220
  },
219
221
  onBlur: this.onBlur,
222
+ onFocusout: this.onFocusout,
220
223
  onKeydown: this.onKeyDownHandler,
221
224
  "class": classNames('k-flatcolorpicker k-coloreditor', {
222
225
  'k-disabled': this.$props.disabled
@@ -519,6 +522,12 @@ var FlatColorPickerVue2 = {
519
522
  event: event,
520
523
  target: this
521
524
  });
525
+ },
526
+ onFocusout: function onFocusout(event) {
527
+ this.$emit('focusout', {
528
+ event: event,
529
+ target: this
530
+ });
522
531
  }
523
532
  }
524
533
  };
@@ -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: 1659330724,
8
+ publishDate: 1659428896,
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
  };
@@ -86,8 +86,11 @@ var ColorGradientVue2 = {
86
86
  this.guid = kendo_vue_common_1.guid();
87
87
  },
88
88
  computed: {
89
+ valueSet: function valueSet() {
90
+ return this.value || this.modelValue || this.modelRgbaValue;
91
+ },
89
92
  computedValue: function computedValue() {
90
- var value = this.value || this.defaultValue || this.modelValue || this.modelRgbaValue || this.currentValue || color_parser_1.parseColor(DEFAULT_SELECTED_COLOR, FORMAT);
93
+ var value = this.valueSet || this.currentValue || this.defaultValue || color_parser_1.parseColor(DEFAULT_SELECTED_COLOR, FORMAT);
91
94
 
92
95
  if (!misc_1.isPresent(color_parser_1.parseColor(value, 'hex', this.opacity))) {
93
96
  // Validate/sanitize the input.
@@ -97,13 +100,13 @@ var ColorGradientVue2 = {
97
100
  return value;
98
101
  },
99
102
  hsva: function hsva() {
100
- return this.currentHsva || color_cache_1.getCachedHsva(this.guid, this.computedValue) || color_parser_1.getHSV(this.computedValue);
103
+ return this.valueSet ? color_parser_1.getHSV(this.computedValue) : this.currentHsva || color_parser_1.getHSV(this.computedValue);
101
104
  },
102
105
  rgba: function rgba() {
103
- return this.currentRgba || color_cache_1.getCachedRgba(this.guid, this.computedValue) || color_parser_1.getRGBA(this.computedValue);
106
+ return this.valueSet ? color_parser_1.getRGBA(this.computedValue) : this.currentRgba;
104
107
  },
105
108
  hex: function hex() {
106
- return this.currentHex || color_cache_1.getCachedHex(this.guid, this.computedValue) || color_parser_1.parseColor(this.computedValue, 'hex', this.opacity);
109
+ return this.valueSet ? color_parser_1.parseColor(this.computedValue, 'hex', this.opacity) : this.currentHex;
107
110
  },
108
111
  computedBgColor: function computedBgColor() {
109
112
  return this.currentBgColor || color_parser_1.getColorFromHue(this.hsva.h);
@@ -59,7 +59,12 @@ var ColorInputVue2 = {
59
59
  },
60
60
  props: {
61
61
  tabIndex: Number,
62
- rgba: Object,
62
+ rgba: {
63
+ type: Object,
64
+ default: function _default() {
65
+ return {};
66
+ }
67
+ },
63
68
  hex: String,
64
69
  opacity: Boolean,
65
70
  disabled: Boolean
@@ -247,7 +247,7 @@ var ColorPickerVue2 = {
247
247
  on: this.v3 ? undefined : {
248
248
  'keydown': this.onKeyDownHandler,
249
249
  'change': this.onFlatChangeHandler,
250
- 'blur': this.onBlurHandler,
250
+ 'focusout': this.onBlurHandler,
251
251
  'viewchange': this.onViewChange
252
252
  },
253
253
  ref: kendo_vue_common_1.setRef(this, 'flatcolorpicker'),
@@ -268,7 +268,7 @@ var ColorPickerVue2 = {
268
268
  gradientSettings: this.gradientSettings
269
269
  }, this.flatColorPickerSettings),
270
270
  onChange: this.onFlatChangeHandler,
271
- onBlur: this.onBlurHandler,
271
+ onFocusout: this.onBlurHandler,
272
272
  onViewchange: this.onViewChange,
273
273
  paletteSettings: this.paletteSettings,
274
274
  gradientSettings: this.gradientSettings
@@ -444,8 +444,11 @@ var ColorPickerVue2 = {
444
444
  isViewFocused: function isViewFocused() {
445
445
  return !!(document.activeElement && document.activeElement.closest("#" + this._popupId));
446
446
  },
447
- onButtonBlur: function onButtonBlur() {
447
+ onButtonBlur: function onButtonBlur(event) {
448
448
  this.focused = this.isViewFocused();
449
+ this.$emit('blur', {
450
+ event: event
451
+ });
449
452
  },
450
453
  onFocusHandler: function onFocusHandler(event) {
451
454
  if (this.blurTimeoutRef) {
@@ -473,14 +476,11 @@ var ColorPickerVue2 = {
473
476
  this.focused = viewIsFocused;
474
477
  this.blurTimeoutRef = undefined;
475
478
  },
476
- onBlurHandler: function onBlurHandler(event) {
479
+ onBlurHandler: function onBlurHandler() {
477
480
  clearTimeout(this.blurTimeoutRef);
478
481
  this.palette = kendo_vue_common_1.getRef(this, 'palette');
479
482
  this.gradient = kendo_vue_common_1.getRef(this, 'gradient');
480
483
  this.blurTimeoutRef = setTimeout(this.onBlurTimeout, 200);
481
- this.$emit('blur', {
482
- event: event
483
- });
484
484
  },
485
485
  onViewChange: function onViewChange(event) {
486
486
  this.$emit('viewchange', event);
@@ -8,7 +8,7 @@ import { FlatColorPickerViewChangeEvent } from './interfaces/FlatColorPickerView
8
8
  import { ColorGradientProps } from './interfaces/ColorGradientProps';
9
9
  import { ColorPickerPaletteSettings } from './interfaces/ColorPickerPaletteSettings';
10
10
  /**
11
- * Represents the properties of [FlatColorPicker](% slug api_inputs_flatcolorpicker %) component.
11
+ * Represents the properties of [FlatColorPicker](% slug api_inputs_flatcolorpickerprops %) component.
12
12
  */
13
13
  export interface FlatColorPickerProps {
14
14
  /**
@@ -59,6 +59,7 @@ var FlatColorPickerVue2 = {
59
59
  'update:modelRgbaValue': null,
60
60
  'focus': null,
61
61
  'blur': null,
62
+ 'focusout': null,
62
63
  'keydown': null,
63
64
  'change': null
64
65
  },
@@ -231,9 +232,11 @@ var FlatColorPickerVue2 = {
231
232
  on: this.v3 ? undefined : {
232
233
  "focus": this.onFocus,
233
234
  "blur": this.onBlur,
235
+ "focusout": this.onFocusout,
234
236
  "keydown": this.onKeyDownHandler
235
237
  },
236
238
  onBlur: this.onBlur,
239
+ onFocusout: this.onFocusout,
237
240
  onKeydown: this.onKeyDownHandler,
238
241
  "class": kendo_vue_common_1.classNames('k-flatcolorpicker k-coloreditor', {
239
242
  'k-disabled': this.$props.disabled
@@ -536,6 +539,12 @@ var FlatColorPickerVue2 = {
536
539
  event: event,
537
540
  target: this
538
541
  });
542
+ },
543
+ onFocusout: function onFocusout(event) {
544
+ this.$emit('focusout', {
545
+ event: event,
546
+ target: this
547
+ });
539
548
  }
540
549
  }
541
550
  };
@@ -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: 1659330724,
11
+ publishDate: 1659428896,
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.4.5",
4
+ "version": "3.5.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -38,22 +38,22 @@
38
38
  "vue": "^2.6.12 || ^3.0.2"
39
39
  },
40
40
  "dependencies": {
41
- "@progress/kendo-vue-buttons": "3.4.5",
42
- "@progress/kendo-vue-common": "3.4.5",
43
- "@progress/kendo-vue-labels": "3.4.5",
44
- "@progress/kendo-vue-popup": "3.4.5"
41
+ "@progress/kendo-vue-buttons": "3.5.0",
42
+ "@progress/kendo-vue-common": "3.5.0",
43
+ "@progress/kendo-vue-labels": "3.5.0",
44
+ "@progress/kendo-vue-popup": "3.5.0"
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.4.5",
52
- "@progress/kendo-vue-dropdowns": "3.4.5",
53
- "@progress/kendo-vue-form": "3.4.5",
54
- "@progress/kendo-vue-intl": "3.4.5",
55
- "@progress/kendo-vue-labels": "3.4.5",
56
- "@progress/kendo-vue-tooltip": "3.4.5",
51
+ "@progress/kendo-vue-buttons": "3.5.0",
52
+ "@progress/kendo-vue-dropdowns": "3.5.0",
53
+ "@progress/kendo-vue-form": "3.5.0",
54
+ "@progress/kendo-vue-intl": "3.5.0",
55
+ "@progress/kendo-vue-labels": "3.5.0",
56
+ "@progress/kendo-vue-tooltip": "3.5.0",
57
57
  "cldr-core": "^41.0.0",
58
58
  "cldr-dates-full": "^41.0.0",
59
59
  "cldr-numbers-full": "^41.0.0"