@progress/kendo-vue-editor 3.0.0-dev.202201161025 → 3.0.0-dev.202201170830

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.
@@ -23,6 +23,10 @@ var messages_1 = require("./../messages"); // tslint:enable:max-line-length
23
23
 
24
24
  var InsertImageDialogVue2 = {
25
25
  name: 'KendoInsertImageDialog',
26
+ // @ts-ignore
27
+ emits: {
28
+ close: null
29
+ },
26
30
  props: {
27
31
  view: Object,
28
32
  settings: Object,
@@ -39,6 +43,10 @@ var InsertImageDialogVue2 = {
39
43
  this.title = this.v3 ? this.titleRef : this.$refs.title;
40
44
  this.width = this.v3 ? this.widthRef : this.$refs.width;
41
45
  this.height = this.v3 ? this.heightRef : this.$refs.height;
46
+
47
+ if (this.src) {
48
+ this.src.focus();
49
+ }
42
50
  },
43
51
  // @ts-ignore
44
52
  setup: !gh ? undefined : function () {
@@ -92,8 +100,7 @@ var InsertImageDialogVue2 = {
92
100
  type: "text",
93
101
  attrs: this.v3 ? undefined : {
94
102
  type: "text",
95
- id: "k-editor-image-url",
96
- autoFocus: true
103
+ id: "k-editor-image-url"
97
104
  },
98
105
  "class": "k-input-inner",
99
106
  id: "k-editor-image-url",
@@ -103,8 +110,7 @@ var InsertImageDialogVue2 = {
103
110
  },
104
111
  ref: this.v3 ? function (el) {
105
112
  _this.srcRef = el;
106
- } : 'src',
107
- autoFocus: true
113
+ } : 'src'
108
114
  })])]), h("div", {
109
115
  "class": "k-edit-label"
110
116
  }, [h("label", {
@@ -23,6 +23,10 @@ var messages_1 = require("./../messages"); // tslint:enable:max-line-length
23
23
 
24
24
  var InsertLinkDialogVue2 = {
25
25
  name: 'KendoInsertLinkDialog',
26
+ // @ts-ignore
27
+ emits: {
28
+ close: null
29
+ },
26
30
  props: {
27
31
  view: Object,
28
32
  settings: Object,
@@ -44,6 +48,10 @@ var InsertLinkDialogVue2 = {
44
48
  this.href = this.v3 ? this.hrefRef : this.$refs.href;
45
49
  this.title = this.v3 ? this.titleRef : this.$refs.title;
46
50
  this.target = this.v3 ? this.targetRef : this.$refs.target;
51
+
52
+ if (this.href) {
53
+ this.href.focus();
54
+ }
47
55
  },
48
56
  // @ts-ignore
49
57
  render: function render(createElement) {
@@ -82,8 +90,7 @@ var InsertLinkDialogVue2 = {
82
90
  type: "text",
83
91
  attrs: this.v3 ? undefined : {
84
92
  type: "text",
85
- id: "k-editor-link-url",
86
- autoFocus: true
93
+ id: "k-editor-link-url"
87
94
  },
88
95
  "class": "k-input-inner",
89
96
  ref: this.v3 ? function (el) {
@@ -93,8 +100,7 @@ var InsertLinkDialogVue2 = {
93
100
  value: this.v3 ? linkMark && linkMark.attrs.href || undefined : null,
94
101
  domProps: this.v3 ? undefined : {
95
102
  "value": linkMark && linkMark.attrs.href || undefined
96
- },
97
- autoFocus: true
103
+ }
98
104
  })])]), h("div", {
99
105
  "class": "k-edit-label k-editor-link-text-row"
100
106
  }, [h("label", {
@@ -73,10 +73,6 @@ var ViewHtmlDialogVue2 = {
73
73
  value: this.v3 ? kendo_editor_common_1.indentHtml(kendo_editor_common_1.getHtml(view.state)) : null,
74
74
  domProps: this.v3 ? undefined : {
75
75
  "value": kendo_editor_common_1.indentHtml(kendo_editor_common_1.getHtml(view.state))
76
- },
77
- autoFocus: true,
78
- attrs: this.v3 ? undefined : {
79
- autoFocus: true
80
76
  }
81
77
  });
82
78
  var actionButtons = [// @ts-ignore function children
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-editor',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1642328162,
11
+ publishDate: 1642407570,
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
  };
@@ -57,8 +57,6 @@ var kendo_vue_dropdowns_1 = require("@progress/kendo-vue-dropdowns");
57
57
 
58
58
  var kendo_editor_common_1 = require("@progress/kendo-editor-common");
59
59
 
60
- var kendo_vue_common_1 = require("@progress/kendo-vue-common");
61
-
62
60
  var utils_1 = require("./utils");
63
61
 
64
62
  var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
@@ -91,30 +89,6 @@ var FontNameVue2 = {
91
89
  v3: v3
92
90
  };
93
91
  },
94
- data: function data() {
95
- return {
96
- currentValue: null,
97
- currentOpened: false
98
- };
99
- },
100
- computed: {
101
- computedValue: function computedValue() {
102
- var _a = this.$props,
103
- view = _a.view,
104
- settings = _a.settings,
105
- dataItems = _a.dataItems;
106
- var style = settings.style;
107
- var items = dataItems || settings.items;
108
- var styles = view ? kendo_editor_common_1.getInlineStyles(view.state, {
109
- name: style,
110
- value: /^.+$/
111
- }) : [];
112
- var value = new Set(styles).size === 1 ? styles[0] : null;
113
- return this.currentValue ? this.currentValue : value ? items.find(function (i) {
114
- return i.value === value;
115
- }) : value;
116
- }
117
- },
118
92
  // @ts-ignore
119
93
  render: function render(createElement) {
120
94
  var h = gh || createElement;
@@ -127,6 +101,12 @@ var FontNameVue2 = {
127
101
  defaultItemProps = _a.defaultItem,
128
102
  other = __rest(_a, ["view", "render", "dataItems", "settings", "defaultItem"]);
129
103
 
104
+ var style = settings.style;
105
+ var styles = view ? kendo_editor_common_1.getInlineStyles(view.state, {
106
+ name: style,
107
+ value: /^.+$/
108
+ }) : [];
109
+ var value = new Set(styles).size === 1 ? styles[0] : null;
130
110
  var items = dataItems || settings.items;
131
111
  var defaultItem = defaultItemProps || settings.defaultItem;
132
112
  var localization = kendo_vue_intl_1.provideLocalizationService(this);
@@ -137,7 +117,9 @@ var FontNameVue2 = {
137
117
  }
138
118
 
139
119
  var ddlProps = __assign(__assign(__assign({}, other), {
140
- value: this.computedValue,
120
+ value: value ? items.find(function (i) {
121
+ return i.value === value;
122
+ }) : value,
141
123
  dataItems: items,
142
124
  defaultItem: defaultItem,
143
125
  itemRender: this.customItemRender,
@@ -149,12 +131,8 @@ var FontNameVue2 = {
149
131
  var dropdown = h(kendo_vue_dropdowns_1.DropDownList, __assign({
150
132
  onChange: this.onChange,
151
133
  on: this.v3 ? undefined : {
152
- 'change': this.onChange,
153
- 'close': this.onClose,
154
- 'open': this.onOpen
134
+ 'change': this.onChange
155
135
  },
156
- onClose: this.onClose,
157
- onOpen: this.onOpen,
158
136
  style: utils_1.userSelectNone,
159
137
  attrs: this.v3 ? undefined : ddlProps
160
138
  }, ddlProps));
@@ -177,35 +155,19 @@ var FontNameVue2 = {
177
155
  view = _a.view,
178
156
  settings = _a.settings;
179
157
  var style = settings.style;
158
+ var item = e.target.value;
180
159
 
181
- if (!this.currentOpened) {
160
+ if (view) {
182
161
  kendo_editor_common_1.applyInlineStyle({
183
162
  style: style,
184
- value: e.target.value.value
163
+ value: item.value
185
164
  }, settings.commandName)(view.state, view.dispatch);
186
- view.focus();
187
- this.currentValue = null;
188
- } else {
189
- this.currentValue = e.target.value;
190
- }
191
- },
192
- onClose: function onClose(e) {
193
- var _a = this.$props,
194
- view = _a.view,
195
- settings = _a.settings;
196
- var style = settings.style;
165
+ var event_1 = e.event;
197
166
 
198
- if (view && this.computedValue && (e.event.type === 'click' || e.event.keyCode && e.event.keyCode === kendo_vue_common_1.Keys.enter)) {
199
- kendo_editor_common_1.applyInlineStyle({
200
- style: style,
201
- value: this.computedValue.value
202
- }, settings.commandName)(view.state, view.dispatch);
203
- view.focus();
204
- this.currentValue = null;
167
+ if (event_1 && event_1.type === 'click') {
168
+ view.focus();
169
+ }
205
170
  }
206
- },
207
- onOpen: function onOpen() {
208
- this.currentOpened = true;
209
171
  }
210
172
  }
211
173
  };
@@ -57,8 +57,6 @@ var kendo_vue_dropdowns_1 = require("@progress/kendo-vue-dropdowns");
57
57
 
58
58
  var kendo_editor_common_1 = require("@progress/kendo-editor-common");
59
59
 
60
- var kendo_vue_common_1 = require("@progress/kendo-vue-common");
61
-
62
60
  var utils_1 = require("./utils");
63
61
 
64
62
  var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
@@ -84,27 +82,6 @@ var FormatBlockVue2 = {
84
82
  default: null
85
83
  }
86
84
  },
87
- data: function data() {
88
- return {
89
- currentValue: null,
90
- currentOpened: false
91
- };
92
- },
93
- computed: {
94
- computedValue: function computedValue() {
95
- var _a = this.$props,
96
- view = _a.view,
97
- settings = _a.settings,
98
- dataItems = _a.dataItems;
99
- var items = dataItems || settings.items;
100
- var state = view && view.state;
101
- var formats = state ? kendo_editor_common_1.getBlockFormats(state) : [];
102
- var value = new Set(formats).size === 1 ? formats[0] : null;
103
- return this.currentValue ? this.currentValue : value ? items.find(function (i) {
104
- return i.value === value;
105
- }) : value;
106
- }
107
- },
108
85
  // @ts-ignore
109
86
  setup: !gh ? undefined : function () {
110
87
  var v3 = !!gh;
@@ -125,6 +102,9 @@ var FormatBlockVue2 = {
125
102
  other = __rest(_a, ["view", "render", "dataItems", "settings", "defaultItem"]);
126
103
 
127
104
  var items = dataItems || settings.items;
105
+ var state = view && view.state;
106
+ var formats = state ? kendo_editor_common_1.getBlockFormats(state) : [];
107
+ var value = new Set(formats).size === 1 ? formats[0] : null;
128
108
  var defaultItem = defaultItemProps || settings.defaultItem;
129
109
  var localization = kendo_vue_intl_1.provideLocalizationService(this);
130
110
 
@@ -134,24 +114,25 @@ var FormatBlockVue2 = {
134
114
  }
135
115
 
136
116
  var ddlProps = __assign(__assign(__assign({}, other), {
137
- value: this.computedValue,
117
+ value: value ? items.find(function (i) {
118
+ return i.value === value;
119
+ }) : value,
138
120
  dataItems: items,
139
121
  defaultItem: defaultItem,
140
122
  itemRender: this.customItemRender,
141
123
  textField: 'text',
142
124
  dataItemKey: 'value',
143
- leftRightKeysNavigation: false
125
+ leftRightKeysNavigation: false,
126
+ popupSettings: {
127
+ width: '170px'
128
+ }
144
129
  }), settings.props);
145
130
 
146
131
  var dropdown = h(kendo_vue_dropdowns_1.DropDownList, __assign({
147
132
  onChange: this.onChange,
148
133
  on: this.v3 ? undefined : {
149
- 'change': this.onChange,
150
- 'close': this.onClose,
151
- 'open': this.onOpen
134
+ 'change': this.onChange
152
135
  },
153
- onClose: this.onClose,
154
- onOpen: this.onOpen,
155
136
  style: utils_1.userSelectNone,
156
137
  attrs: this.v3 ? undefined : ddlProps
157
138
  }, ddlProps));
@@ -173,29 +154,15 @@ var FormatBlockVue2 = {
173
154
  var _a = this.$props,
174
155
  view = _a.view,
175
156
  settings = _a.settings;
157
+ var item = e.target.value;
176
158
 
177
- if (!this.currentOpened) {
178
- kendo_editor_common_1.formatBlockElements(e.target.value.value, settings.commandName)(view.state, view.dispatch);
179
- view.focus();
180
- this.currentValue = null;
181
- } else {
182
- this.currentValue = e.target.value;
183
- }
184
- },
185
- onClose: function onClose(e) {
186
- var _a = this.$props,
187
- view = _a.view,
188
- settings = _a.settings;
189
- this.currentOpened = false;
159
+ if (view && kendo_editor_common_1.formatBlockElements(item.value, settings.commandName)(view.state, view.dispatch)) {
160
+ var event_1 = e.event;
190
161
 
191
- if (view && this.computedValue && (e.event.type === 'click' || e.event.keyCode && e.event.keyCode === kendo_vue_common_1.Keys.enter)) {
192
- kendo_editor_common_1.formatBlockElements(this.computedValue.value, settings.commandName)(view.state, view.dispatch);
193
- view.focus();
194
- this.currentValue = null;
162
+ if (event_1 && event_1.type === 'click') {
163
+ view.focus();
164
+ }
195
165
  }
196
- },
197
- onOpen: function onOpen() {
198
- this.currentOpened = true;
199
166
  }
200
167
  }
201
168
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-editor",
3
3
  "description": "Kendo UI for Vue Editor package",
4
- "version": "3.0.0-dev.202201161025",
4
+ "version": "3.0.0-dev.202201170830",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -43,21 +43,21 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@progress/kendo-editor-common": "1.6.0",
46
- "@progress/kendo-vue-common": "3.0.0-dev.202201161025"
46
+ "@progress/kendo-vue-common": "3.0.0-dev.202201170830"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@progress/kendo-drawing": "^1.8.0",
50
50
  "@progress/kendo-licensing": "^1.0.1",
51
- "@progress/kendo-vue-buttons": "3.0.0-dev.202201161025",
52
- "@progress/kendo-vue-dialogs": "3.0.0-dev.202201161025",
53
- "@progress/kendo-vue-dropdowns": "3.0.0-dev.202201161025",
54
- "@progress/kendo-vue-form": "3.0.0-dev.202201161025",
55
- "@progress/kendo-vue-inputs": "3.0.0-dev.202201161025",
56
- "@progress/kendo-vue-intl": "3.0.0-dev.202201161025",
57
- "@progress/kendo-vue-layout": "3.0.0-dev.202201161025",
58
- "@progress/kendo-vue-pdf": "3.0.0-dev.202201161025",
59
- "@progress/kendo-vue-popup": "3.0.0-dev.202201161025",
60
- "@progress/kendo-vue-upload": "3.0.0-dev.202201161025"
51
+ "@progress/kendo-vue-buttons": "3.0.0-dev.202201170830",
52
+ "@progress/kendo-vue-dialogs": "3.0.0-dev.202201170830",
53
+ "@progress/kendo-vue-dropdowns": "3.0.0-dev.202201170830",
54
+ "@progress/kendo-vue-form": "3.0.0-dev.202201170830",
55
+ "@progress/kendo-vue-inputs": "3.0.0-dev.202201170830",
56
+ "@progress/kendo-vue-intl": "3.0.0-dev.202201170830",
57
+ "@progress/kendo-vue-layout": "3.0.0-dev.202201170830",
58
+ "@progress/kendo-vue-pdf": "3.0.0-dev.202201170830",
59
+ "@progress/kendo-vue-popup": "3.0.0-dev.202201170830",
60
+ "@progress/kendo-vue-upload": "3.0.0-dev.202201170830"
61
61
  },
62
62
  "@progress": {
63
63
  "friendlyName": "Editor",