neo.mjs 4.3.9 → 4.3.11

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 (95) hide show
  1. package/README.md +1 -1
  2. package/apps/covid/view/MainContainerController.mjs +9 -11
  3. package/apps/krausest/view/MainComponent.mjs +3 -4
  4. package/apps/krausest/view/TableComponent.mjs +2 -3
  5. package/apps/realworld/view/HeaderComponent.mjs +7 -10
  6. package/apps/realworld/view/HomeComponent.mjs +16 -24
  7. package/apps/realworld/view/MainContainerController.mjs +3 -3
  8. package/apps/realworld/view/article/CommentComponent.mjs +11 -19
  9. package/apps/realworld/view/article/Component.mjs +20 -36
  10. package/apps/realworld/view/article/CreateCommentComponent.mjs +9 -16
  11. package/apps/realworld/view/article/CreateComponent.mjs +12 -20
  12. package/apps/realworld/view/article/PreviewComponent.mjs +16 -30
  13. package/apps/realworld/view/article/TagListComponent.mjs +4 -5
  14. package/apps/realworld/view/user/ProfileComponent.mjs +14 -21
  15. package/apps/realworld/view/user/SettingsComponent.mjs +9 -16
  16. package/apps/realworld/view/user/SignUpComponent.mjs +6 -9
  17. package/apps/realworld2/view/MainContainerController.mjs +2 -2
  18. package/apps/realworld2/view/article/PreviewComponent.mjs +17 -31
  19. package/apps/realworld2/view/article/PreviewList.mjs +4 -7
  20. package/apps/realworld2/view/article/TagListComponent.mjs +4 -5
  21. package/apps/sharedcovid/view/MainContainerController.mjs +10 -13
  22. package/apps/website/data/blog.json +1 -1
  23. package/apps/website/view/blog/List.mjs +2 -3
  24. package/buildScripts/injectPackageVersion.mjs +43 -0
  25. package/docs/app/view/ApiTreeList.mjs +2 -6
  26. package/docs/app/view/ExamplesTreeList.mjs +2 -6
  27. package/docs/app/view/TutorialsTreeList.mjs +2 -6
  28. package/docs/app/view/classdetails/HeaderComponent.mjs +3 -4
  29. package/docs/app/view/classdetails/HierarchyTreeList.mjs +1 -2
  30. package/docs/app/view/classdetails/MembersList.mjs +4 -6
  31. package/docs/app/view/classdetails/SourceViewComponent.mjs +3 -6
  32. package/docs/app/view/classdetails/TutorialComponent.mjs +4 -5
  33. package/examples/component/coronaGallery/CountryGallery.mjs +36 -59
  34. package/examples/form/field/date/MainContainer.mjs +1 -1
  35. package/examples/tabs/MainContainer.mjs +4 -6
  36. package/examples/todoList/version1/MainComponent.mjs +5 -7
  37. package/examples/todoList/version2/TodoList.mjs +4 -5
  38. package/package.json +8 -7
  39. package/resources/scss/src/draggable/tree/DragZone.scss +3 -1
  40. package/src/DefaultConfig.mjs +9 -1
  41. package/src/button/Base.mjs +18 -27
  42. package/src/button/Split.mjs +3 -4
  43. package/src/calendar/view/MainContainer.mjs +3 -5
  44. package/src/calendar/view/SettingsContainer.mjs +3 -5
  45. package/src/calendar/view/YearComponent.mjs +7 -9
  46. package/src/calendar/view/month/Component.mjs +7 -12
  47. package/src/calendar/view/week/Component.mjs +2 -3
  48. package/src/calendar/view/week/TimeAxisComponent.mjs +0 -3
  49. package/src/component/Base.mjs +37 -55
  50. package/src/component/Carousel.mjs +5 -9
  51. package/src/component/Chip.mjs +6 -12
  52. package/src/component/Circle.mjs +16 -22
  53. package/src/component/Clock.mjs +1 -1
  54. package/src/component/DateSelector.mjs +4 -9
  55. package/src/component/Gallery.mjs +12 -21
  56. package/src/component/Helix.mjs +2 -3
  57. package/src/component/Label.mjs +2 -3
  58. package/src/component/Legend.mjs +6 -9
  59. package/src/container/Base.mjs +5 -9
  60. package/src/container/Panel.mjs +4 -0
  61. package/src/dialog/Base.mjs +40 -42
  62. package/src/dialog/header/Toolbar.mjs +105 -0
  63. package/src/draggable/list/DragZone.mjs +1 -2
  64. package/src/draggable/tree/DragZone.mjs +1 -2
  65. package/src/form/Fieldset.mjs +4 -6
  66. package/src/form/field/CheckBox.mjs +23 -39
  67. package/src/form/field/Color.mjs +2 -3
  68. package/src/form/field/Display.mjs +1 -2
  69. package/src/form/field/Number.mjs +1 -2
  70. package/src/form/field/Picker.mjs +0 -1
  71. package/src/form/field/Text.mjs +40 -57
  72. package/src/form/field/TextArea.mjs +2 -3
  73. package/src/form/field/trigger/Base.mjs +2 -3
  74. package/src/form/field/trigger/SpinUpDown.mjs +3 -4
  75. package/src/form/field/trigger/Time.mjs +3 -4
  76. package/src/grid/View.mjs +2 -2
  77. package/src/grid/header/Toolbar.mjs +1 -2
  78. package/src/layout/Card.mjs +2 -2
  79. package/src/list/Base.mjs +6 -11
  80. package/src/list/plugin/Animate.mjs +5 -12
  81. package/src/plugin/Resizable.mjs +3 -6
  82. package/src/selection/Model.mjs +3 -7
  83. package/src/selection/grid/CellColumnModel.mjs +2 -5
  84. package/src/selection/grid/CellColumnRowModel.mjs +2 -5
  85. package/src/selection/grid/CellRowModel.mjs +4 -13
  86. package/src/selection/table/CellColumnModel.mjs +2 -5
  87. package/src/selection/table/CellColumnRowModel.mjs +2 -5
  88. package/src/selection/table/CellRowModel.mjs +4 -13
  89. package/src/sitemap/Component.mjs +1 -1
  90. package/src/tab/Strip.mjs +8 -11
  91. package/src/tab/header/Toolbar.mjs +2 -3
  92. package/src/table/View.mjs +3 -3
  93. package/src/table/header/Button.mjs +4 -6
  94. package/src/table/header/Toolbar.mjs +3 -5
  95. package/src/tree/List.mjs +6 -9
@@ -0,0 +1,105 @@
1
+ import Base from '../../toolbar/Base.mjs';
2
+
3
+ /**
4
+ * @class Neo.dialog.header.Toolbar
5
+ * @extends Neo.toolbar.Base
6
+ */
7
+ class Toolbar extends Base {
8
+ /**
9
+ * @member {Object} actionMap
10
+ */
11
+ actionMap = {
12
+ close : () => ({action: 'close', iconCls: 'far fa-window-close'}),
13
+ maximize: () => ({action: 'maximize', iconCls: 'far fa-window-maximize'})
14
+ }
15
+ /**
16
+ * You can define the action order and directly add custom actions.
17
+ * @example
18
+ * {
19
+ * actions: [
20
+ * 'close',
21
+ * 'maximize',
22
+ * {action: 'help', iconCls: 'far fa-circle-question'}
23
+ * ]
24
+ * }
25
+ *
26
+ * You can also extend the actionMap if needed.
27
+ * @member {Object[]|String[]|null} actions=['maximize','close']
28
+ */
29
+ actions = ['maximize', 'close']
30
+
31
+ static getConfig() {return {
32
+ /**
33
+ * @member {String} className='Neo.dialog.header.Toolbar'
34
+ * @protected
35
+ */
36
+ className: 'Neo.dialog.header.Toolbar',
37
+ /**
38
+ * @member {String|null} title=null
39
+ */
40
+ title_: null
41
+ }}
42
+
43
+ /**
44
+ * Triggered after the title config got changed
45
+ * @param {String} value
46
+ * @param {String} oldValue
47
+ * @protected
48
+ */
49
+ afterSetTitle(value, oldValue) {
50
+ oldValue && this.down({flag: 'title-label'})?.set({
51
+ removeDom: !value,
52
+ text : value
53
+ })
54
+ }
55
+
56
+ /**
57
+ *
58
+ */
59
+ createItems() {
60
+ let me = this,
61
+ handler = me.fireAction.bind(me),
62
+ items = me.items || [];
63
+
64
+ items.push({
65
+ ntype : 'label',
66
+ cls : ['neo-panel-header-text', 'neo-label'],
67
+ flag : 'title-label',
68
+ removeDom: !me.title,
69
+ text : me.title
70
+ });
71
+
72
+ if (me.actions) {
73
+ items.push('->');
74
+
75
+ me.actions.forEach(action => {
76
+ if (Neo.typeOf(action) !== 'Object') {
77
+ action = me.actionMap[action]()
78
+ }
79
+
80
+ items.push({handler, ...action})
81
+ })
82
+ }
83
+
84
+ me.items = items;
85
+
86
+ super.createItems();
87
+ }
88
+
89
+ /**
90
+ * @param {Object} data
91
+ */
92
+ fireAction(data) {
93
+ let component = data.component;
94
+
95
+ this.fire('headerAction', {
96
+ action: component.action,
97
+ component,
98
+ scope : this
99
+ })
100
+ }
101
+ }
102
+
103
+ Neo.applyClassConfig(Toolbar);
104
+
105
+ export default Toolbar;
@@ -60,7 +60,6 @@ class DragZone extends BaseDragZone {
60
60
  let me = this,
61
61
  owner = me.owner,
62
62
  store = owner.store,
63
- vdom = owner.vdom,
64
63
  node;
65
64
 
66
65
  store.items.forEach((record, index) => {
@@ -72,7 +71,7 @@ class DragZone extends BaseDragZone {
72
71
  }
73
72
  });
74
73
 
75
- owner.vdom = vdom;
74
+ owner.update();
76
75
  }
77
76
 
78
77
  /**
@@ -42,7 +42,6 @@ class DragZone extends BaseDragZone {
42
42
  if (oldValue !== undefined) { // we only need to react to dynamic changes
43
43
  let owner = this.owner,
44
44
  store = owner.store,
45
- vdom = owner.vdom,
46
45
  node;
47
46
 
48
47
  store.items.forEach(record => {
@@ -53,7 +52,7 @@ class DragZone extends BaseDragZone {
53
52
  }
54
53
  });
55
54
 
56
- owner.vdom = vdom;
55
+ owner.update();
57
56
  }
58
57
  }
59
58
 
@@ -80,8 +80,7 @@ class Fieldset extends Container {
80
80
  * @protected
81
81
  */
82
82
  afterSetCollapsed(value, oldValue) {
83
- let me = this,
84
- vdom = me.vdom;
83
+ let me = this;
85
84
 
86
85
  NeoArray[value ? 'add' : 'remove'](me._cls, 'neo-collapsed');
87
86
 
@@ -116,7 +115,7 @@ class Fieldset extends Container {
116
115
  }
117
116
  }
118
117
 
119
- me.vdom = vdom;
118
+ me.update();
120
119
  }
121
120
 
122
121
  /**
@@ -206,8 +205,7 @@ class Fieldset extends Container {
206
205
  updateLegend() {
207
206
  let me = this,
208
207
  iconCls = me.collapsed ? me.iconClsUnchecked : me.iconClsChecked,
209
- title = me.title,
210
- vdom = me.vdom;
208
+ title = me.title;
211
209
 
212
210
  if (iconCls === '' && title === '') {
213
211
  if (me.legend) {
@@ -231,7 +229,7 @@ class Fieldset extends Container {
231
229
  }
232
230
  }
233
231
 
234
- me.vdom = vdom;
232
+ me.update();
235
233
  }
236
234
  }
237
235
 
@@ -88,11 +88,10 @@ class CheckBox extends Base {
88
88
  * @protected
89
89
  */
90
90
  afterSetChecked(value, oldValue) {
91
- let me = this,
92
- vdom = me.vdom;
91
+ let me = this;
93
92
 
94
- vdom.cn[1].checked = value;
95
- me.vdom = vdom;
93
+ me.vdom.cn[1].checked = value;
94
+ me.update();
96
95
 
97
96
  if (oldValue !== undefined) {
98
97
  me.fire('change', {
@@ -111,8 +110,7 @@ class CheckBox extends Base {
111
110
  */
112
111
  afterSetEnableLabelClicks(value, oldValue) {
113
112
  let me = this,
114
- vdom = me.vdom,
115
- label = vdom.cn[2];
113
+ label = me.vdom.cn[2];
116
114
 
117
115
  if (value) {
118
116
  label.for = me.getInputElId();
@@ -120,7 +118,7 @@ class CheckBox extends Base {
120
118
  delete label.for;
121
119
  }
122
120
 
123
- me.vdom = vdom;
121
+ me.update();
124
122
  }
125
123
 
126
124
  /**
@@ -130,10 +128,8 @@ class CheckBox extends Base {
130
128
  * @protected
131
129
  */
132
130
  afterSetHideLabel(value, oldValue) {
133
- let vdom = this.vdom;
134
-
135
- vdom.cn[0].removeDom = value;
136
- this.vdom = vdom;
131
+ this.vdom.cn[0].removeDom = value;
132
+ this.update();
137
133
  }
138
134
 
139
135
  /**
@@ -143,10 +139,8 @@ class CheckBox extends Base {
143
139
  * @protected
144
140
  */
145
141
  afterSetHideValueLabel(value, oldValue) {
146
- let vdom = this.vdom;
147
-
148
- vdom.cn[2].removeDom = value;
149
- this.vdom = vdom;
142
+ this.vdom.cn[2].removeDom = value;
143
+ this.update();
150
144
  }
151
145
 
152
146
  /**
@@ -174,10 +168,8 @@ class CheckBox extends Base {
174
168
  * @protected
175
169
  */
176
170
  afterSetInputType(value, oldValue) {
177
- let vdom = this.vdom;
178
-
179
- vdom.cn[1].type = value;
180
- this.vdom = vdom;
171
+ this.vdom.cn[1].type = value;
172
+ this.update();
181
173
  }
182
174
 
183
175
  /**
@@ -187,10 +179,8 @@ class CheckBox extends Base {
187
179
  * @protected
188
180
  */
189
181
  afterSetLabelText(value, oldValue) {
190
- let vdom = this.vdom;
191
-
192
- vdom.cn[0].innerHTML = value;
193
- this.vdom = vdom;
182
+ this.vdom.cn[0].innerHTML = value;
183
+ this.update();
194
184
  }
195
185
 
196
186
  /**
@@ -200,12 +190,11 @@ class CheckBox extends Base {
200
190
  * @protected
201
191
  */
202
192
  afterSetLabelWidth(value, oldValue) {
203
- let me = this,
204
- vdom = me.vdom;
193
+ let me = this;
205
194
 
206
195
  if (!me.hideLabel) {
207
- vdom.cn[0].width = value;
208
- me.vdom = vdom;
196
+ me.vdom.cn[0].width = value;
197
+ me.update();
209
198
  }
210
199
  }
211
200
 
@@ -216,10 +205,8 @@ class CheckBox extends Base {
216
205
  * @protected
217
206
  */
218
207
  afterSetName(value, oldValue) {
219
- let vdom = this.vdom;
220
-
221
- vdom.cn[1].name = value;
222
- this.vdom = vdom;
208
+ this.vdom.cn[1].name = value;
209
+ this.update();
223
210
  }
224
211
 
225
212
  /**
@@ -230,10 +217,8 @@ class CheckBox extends Base {
230
217
  */
231
218
  afterSetValue(value, oldValue) {
232
219
  if (value) {
233
- let vdom = this.vdom;
234
-
235
- vdom.cn[1].value = value;
236
- this.vdom = vdom;
220
+ this.vdom.cn[1].value = value;
221
+ this.update();
237
222
  }
238
223
 
239
224
  super.afterSetValue(value, oldValue);
@@ -246,12 +231,11 @@ class CheckBox extends Base {
246
231
  * @protected
247
232
  */
248
233
  afterSetValueLabelText(value, oldValue) {
249
- let me = this,
250
- vdom = me.vdom;
234
+ let me = this;
251
235
 
252
236
  if (!me.hideValueLabel) {
253
- vdom.cn[2].innerHTML = value;
254
- me.vdom = vdom;
237
+ me.vdom.cn[2].innerHTML = value;
238
+ me.update();
255
239
  }
256
240
  }
257
241
 
@@ -51,8 +51,7 @@ class Color extends Select {
51
51
  super.construct(config);
52
52
 
53
53
  let me = this,
54
- vdom = me.vdom,
55
- inputWrapper = VDomUtil.findVdomChild(vdom, {id: me.getInputWrapperId()});
54
+ inputWrapper = VDomUtil.findVdomChild(me.vdom, {id: me.getInputWrapperId()});
56
55
 
57
56
  inputWrapper.vdom.cn.unshift({
58
57
  cls : 'neo-color',
@@ -62,7 +61,7 @@ class Color extends Select {
62
61
  }
63
62
  });
64
63
 
65
- me.vdom = vdom;
64
+ me.update();
66
65
  }
67
66
 
68
67
  /**
@@ -35,13 +35,12 @@ class Display extends Text {
35
35
  super.construct(config);
36
36
 
37
37
  let me = this,
38
- vdom = me.vdom,
39
38
  inputEl = me.getInputEl();
40
39
 
41
40
  inputEl.readonly = 'readonly';
42
41
  inputEl.tabindex = '-1';
43
42
 
44
- me.vdom = vdom;
43
+ me.update();
45
44
  }
46
45
  }
47
46
 
@@ -79,7 +79,6 @@ class Number extends Text {
79
79
  */
80
80
  afterSetInputEditable(value, oldValue) {
81
81
  let me = this,
82
- vdom = me.vdom,
83
82
  inputEl = me.getInputEl(),
84
83
  style = inputEl.style || {};
85
84
 
@@ -89,7 +88,7 @@ class Number extends Text {
89
88
  style.pointerEvents = 'none';
90
89
  }
91
90
 
92
- me.vdom = vdom;
91
+ me.update();
93
92
  }
94
93
 
95
94
  /**
@@ -183,7 +183,6 @@ class Picker extends Text {
183
183
  me.pickerIsMounted = false;
184
184
 
185
185
  if (silent) {
186
- me._vdom = vdom;
187
186
  picker.mounted = false;
188
187
  } else {
189
188
  me.promiseVdomUpdate().then(data => {
@@ -244,11 +244,9 @@ class Text extends Base {
244
244
  */
245
245
  afterSetHideLabel(value, oldValue) {
246
246
  let me = this,
247
- vdom = me.vdom;
248
-
249
- vdom.cn[0].removeDom = value;
250
- me._vdom = vdom; // silent update
247
+ node = me.labelPosition === 'inline' ? me.getCenterBorderEl() : me.vdom.cn[0];
251
248
 
249
+ node.removeDom = value;
252
250
  me.updateInputWidth();
253
251
  }
254
252
 
@@ -312,18 +310,15 @@ class Text extends Base {
312
310
 
313
311
  vdom.cn[0] = me.getLabelEl(); // remove the wrapper
314
312
 
315
- vdom.cn[0].width = me.labelWidth;
316
-
317
- me._vdom = vdom; // silent update
313
+ vdom.cn[0].removeDom = me.hideLabel;
314
+ vdom.cn[0].width = me.labelWidth;
318
315
  me.updateInputWidth();
319
316
  } else if (value === 'inline') {
320
317
  centerBorderElCls = ['neo-center-border'];
321
318
  isEmpty = me.isEmpty();
322
319
  vdom = me.vdom;
323
320
 
324
- if (!isEmpty) {
325
- centerBorderElCls.push('neo-float-above');
326
- }
321
+ !isEmpty && centerBorderElCls.push('neo-float-above');
327
322
 
328
323
  delete vdom.cn[0].width;
329
324
 
@@ -332,21 +327,19 @@ class Text extends Base {
332
327
  cn : [{
333
328
  cls: ['neo-left-border']
334
329
  }, {
335
- cls: centerBorderElCls,
336
- cn : [vdom.cn[0]]
330
+ cls : centerBorderElCls,
331
+ cn : [vdom.cn[0]],
332
+ removeDom: me.hideLabel
337
333
  }, {
338
334
  cls: ['neo-right-border']
339
335
  }]
340
336
  };
341
337
 
342
- me._vdom = vdom; // silent update
343
338
  me.updateInputWidth();
344
339
 
345
- if (!isEmpty) {
346
- setTimeout(() => {
347
- me.updateCenterBorderElWidth(false);
348
- }, 20);
349
- }
340
+ !isEmpty && setTimeout(() => {
341
+ me.updateCenterBorderElWidth(false);
342
+ }, 20);
350
343
  } else {
351
344
  // changes from e.g. left to top
352
345
  me.updateInputWidth();
@@ -361,24 +354,21 @@ class Text extends Base {
361
354
  */
362
355
  afterSetLabelText(value, oldValue) {
363
356
  let me = this,
364
- isEmpty = me.isEmpty(),
365
- vdom = me.vdom;
357
+ isEmpty = me.isEmpty();
366
358
 
367
359
  me.getLabelEl().innerHTML = value;
368
360
 
369
- if (me.hideLabel) {
370
- me._vdom = vdom; // silent update
371
- } else {
361
+ if (!me.hideLabel) {
372
362
  if (me.labelPosition === 'inline') {
373
363
  if (!isEmpty) {
374
364
  delete me.getCenterBorderEl().width;
375
365
  }
376
366
 
377
- me.promiseVdomUpdate(vdom).then(() => {
367
+ me.promiseVdomUpdate().then(() => {
378
368
  me.updateCenterBorderElWidth(isEmpty);
379
369
  });
380
370
  } else {
381
- me.vdom = vdom;
371
+ me.update();
382
372
  }
383
373
  }
384
374
  }
@@ -396,9 +386,6 @@ class Text extends Base {
396
386
  label = vdom.cn[0];
397
387
 
398
388
  label.width = value;
399
-
400
- me._vdom = vdom; // silent update
401
-
402
389
  !me.hideLabel && me.updateInputWidth();
403
390
  }
404
391
  }
@@ -560,9 +547,10 @@ class Text extends Base {
560
547
  * @protected
561
548
  */
562
549
  afterSetValue(value, oldValue) {
563
- let me = this,
564
- cls = me.cls,
565
- vdom = me.vdom;
550
+ let me = this,
551
+ cls = me.cls;
552
+
553
+ me.silentVdomUpdate = true;
566
554
 
567
555
  me.getInputEl().value = value;
568
556
 
@@ -571,10 +559,13 @@ class Text extends Base {
571
559
  }
572
560
 
573
561
  NeoArray[me.originalConfig.value !== value ? 'add' : 'remove'](cls, 'neo-is-dirty');
562
+ me.cls = cls;
563
+
574
564
  me.validate(); // silent
575
565
 
576
- me.cls = cls;
577
- me.vdom = vdom;
566
+ me.silentVdomUpdate = false;
567
+
568
+ me.update();
578
569
 
579
570
  super.afterSetValue(value, oldValue); // fires the change event
580
571
  }
@@ -676,8 +667,7 @@ class Text extends Base {
676
667
  * @param {Array|Number|Object|String|null} value
677
668
  */
678
669
  changeInputElKey(key, value) {
679
- let me = this,
680
- vdom = me.vdom;
670
+ let me = this;
681
671
 
682
672
  if (value || Neo.isBoolean(value) || value === 0) {
683
673
  me.getInputEl()[key] = value;
@@ -685,7 +675,7 @@ class Text extends Base {
685
675
  delete me.getInputEl()[key];
686
676
  }
687
677
 
688
- me.vdom = vdom;
678
+ me.update();
689
679
  }
690
680
 
691
681
  /**
@@ -873,17 +863,15 @@ class Text extends Base {
873
863
  */
874
864
  onFocusEnter(data) {
875
865
  let me = this,
876
- cls = me.cls,
877
- vdom;
866
+ cls = me.cls;
878
867
 
879
868
  NeoArray.add(cls, 'neo-focus');
880
869
  me.cls = cls;
881
870
 
882
871
  if (me.labelPosition === 'inline') {
883
872
  if (me.centerBorderElWidth) {
884
- vdom = me.vdom;
885
873
  me.getCenterBorderEl().width = me.centerBorderElWidth;
886
- me.vdom = vdom;
874
+ me.update();
887
875
  } else {
888
876
  me.updateCenterBorderElWidth(false);
889
877
  }
@@ -898,8 +886,7 @@ class Text extends Base {
898
886
  onFocusLeave(data) {
899
887
  let me = this,
900
888
  centerBorderEl = me.getCenterBorderEl(), // labelPosition: 'inline'
901
- cls = me.cls,
902
- vdom = me.vdom;
889
+ cls = me.cls;
903
890
 
904
891
  me.validate(); // silent
905
892
 
@@ -910,7 +897,7 @@ class Text extends Base {
910
897
  delete centerBorderEl.width;
911
898
  }
912
899
 
913
- me.vdom = vdom;
900
+ me.update();
914
901
  }
915
902
 
916
903
  /**
@@ -1002,10 +989,8 @@ class Text extends Base {
1002
989
  me.centerBorderElWidth = Math.round(data.width * .7) + 8;
1003
990
 
1004
991
  if (!silent) {
1005
- let vdom = me.vdom;
1006
-
1007
992
  me.getCenterBorderEl().width = me.centerBorderElWidth;
1008
- me.vdom = vdom;
993
+ me.update();
1009
994
  }
1010
995
  });
1011
996
  }
@@ -1015,8 +1000,8 @@ class Text extends Base {
1015
1000
  @param {Boolean} silent=false
1016
1001
  */
1017
1002
  updateError(value, silent=false) {
1018
- let me = this,
1019
- vdom = me.vdom,
1003
+ let me = this,
1004
+ cls = me.cls,
1020
1005
  errorNode, isValid;
1021
1006
 
1022
1007
  if (!(me.validBeforeMount && !me.mounted)) {
@@ -1024,7 +1009,8 @@ class Text extends Base {
1024
1009
 
1025
1010
  isValid = !value || value === '';
1026
1011
 
1027
- NeoArray[!isValid ? 'add' : 'remove'](me._cls, 'neo-invalid');
1012
+ NeoArray[!isValid ? 'add' : 'remove'](cls, 'neo-invalid');
1013
+ me.cls = cls; // todo: silent update
1028
1014
 
1029
1015
  errorNode = VDomUtil.findVdomChild(this.vdom, {cls: 'neo-textfield-error'}).vdom;
1030
1016
 
@@ -1036,9 +1022,7 @@ class Text extends Base {
1036
1022
 
1037
1023
  errorNode.removeDom = isValid;
1038
1024
 
1039
- if (!silent) {
1040
- me.vdom = vdom;
1041
- }
1025
+ !silent && me.update();
1042
1026
  }
1043
1027
  }
1044
1028
 
@@ -1048,16 +1032,15 @@ class Text extends Base {
1048
1032
  */
1049
1033
  updateInputWidth() {
1050
1034
  let me = this,
1051
- inputWidth = me.getInputWidth(),
1052
- vdom = me.vdom;
1035
+ inputWidth = me.getInputWidth();
1053
1036
 
1054
1037
  if (inputWidth !== null && inputWidth !== me.width) {
1055
- vdom.cn[1].width = inputWidth;
1038
+ me.vdom.cn[1].width = inputWidth;
1056
1039
  } else {
1057
- delete vdom.cn[1].width;
1040
+ delete me.vdom.cn[1].width;
1058
1041
  }
1059
1042
 
1060
- me.vdom = vdom;
1043
+ me.update();
1061
1044
  }
1062
1045
 
1063
1046
  /**
@@ -97,11 +97,10 @@ class TextArea extends Text {
97
97
  */
98
98
  afterSetResizable(value, oldValue) {
99
99
  let me = this,
100
- style = this.getInputEl().style,
101
- vdom = me.vdom;
100
+ style = this.getInputEl().style;
102
101
 
103
102
  style.resize = value ? null : 'none';
104
- me.vdom = vdom;
103
+ me.update();
105
104
  }
106
105
 
107
106
  /**
@@ -119,11 +119,10 @@ class Base extends Component {
119
119
  * @protected
120
120
  */
121
121
  afterSetHidden(value, oldValue) {
122
- let vdom = this.vdom,
123
- style = vdom.style || {};
122
+ let style = this.style;
124
123
 
125
124
  style.display = value ? 'none' : 'inline-block';
126
- this.vdom = vdom;
125
+ this.style = style;
127
126
  }
128
127
 
129
128
  /**
@@ -41,15 +41,14 @@ class SpinUpDown extends Base {
41
41
  *
42
42
  */
43
43
  onConstructed() {
44
- let me = this,
45
- vdom = me.vdom;
44
+ let me = this;
46
45
 
47
- vdom.cn = [
46
+ me.vdom.cn = [
48
47
  {cls: ['neo-spin-button', 'neo-up', me.spinButtonUpIconCls]},
49
48
  {cls: ['neo-spin-button', 'neo-down', me.spinButtonDownIconCls]}
50
49
  ];
51
50
 
52
- me.vdom = vdom;
51
+ me.update();
53
52
 
54
53
  super.onConstructed();
55
54
  }