neo.mjs 4.3.8 → 4.3.10

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 (86) hide show
  1. package/apps/covid/view/MainContainerController.mjs +9 -11
  2. package/apps/krausest/view/MainComponent.mjs +3 -4
  3. package/apps/krausest/view/TableComponent.mjs +2 -3
  4. package/apps/realworld/view/HeaderComponent.mjs +7 -10
  5. package/apps/realworld/view/HomeComponent.mjs +16 -24
  6. package/apps/realworld/view/MainContainerController.mjs +3 -3
  7. package/apps/realworld/view/article/CommentComponent.mjs +11 -19
  8. package/apps/realworld/view/article/Component.mjs +20 -36
  9. package/apps/realworld/view/article/CreateCommentComponent.mjs +9 -16
  10. package/apps/realworld/view/article/CreateComponent.mjs +12 -20
  11. package/apps/realworld/view/article/PreviewComponent.mjs +16 -30
  12. package/apps/realworld/view/article/TagListComponent.mjs +4 -5
  13. package/apps/realworld/view/user/ProfileComponent.mjs +14 -21
  14. package/apps/realworld/view/user/SettingsComponent.mjs +9 -16
  15. package/apps/realworld/view/user/SignUpComponent.mjs +6 -9
  16. package/apps/realworld2/view/MainContainerController.mjs +2 -2
  17. package/apps/realworld2/view/article/PreviewComponent.mjs +17 -31
  18. package/apps/realworld2/view/article/PreviewList.mjs +4 -7
  19. package/apps/realworld2/view/article/TagListComponent.mjs +4 -5
  20. package/apps/sharedcovid/view/MainContainerController.mjs +10 -13
  21. package/apps/website/view/blog/List.mjs +2 -3
  22. package/docs/app/view/ApiTreeList.mjs +2 -6
  23. package/docs/app/view/ExamplesTreeList.mjs +2 -6
  24. package/docs/app/view/TutorialsTreeList.mjs +2 -6
  25. package/docs/app/view/classdetails/HeaderComponent.mjs +3 -4
  26. package/docs/app/view/classdetails/HierarchyTreeList.mjs +1 -2
  27. package/docs/app/view/classdetails/MembersList.mjs +4 -6
  28. package/docs/app/view/classdetails/SourceViewComponent.mjs +3 -6
  29. package/docs/app/view/classdetails/TutorialComponent.mjs +4 -5
  30. package/examples/tabs/MainContainer.mjs +4 -6
  31. package/examples/todoList/version1/MainComponent.mjs +5 -7
  32. package/examples/todoList/version2/TodoList.mjs +4 -5
  33. package/package.json +3 -3
  34. package/resources/scss/src/form/field/Text.scss +4 -3
  35. package/src/button/Base.mjs +14 -24
  36. package/src/button/Split.mjs +3 -4
  37. package/src/calendar/view/MainContainer.mjs +3 -5
  38. package/src/calendar/view/SettingsContainer.mjs +3 -5
  39. package/src/calendar/view/YearComponent.mjs +7 -9
  40. package/src/calendar/view/month/Component.mjs +7 -12
  41. package/src/calendar/view/week/Component.mjs +2 -3
  42. package/src/calendar/view/week/TimeAxisComponent.mjs +0 -3
  43. package/src/component/Base.mjs +26 -27
  44. package/src/component/Carousel.mjs +5 -9
  45. package/src/component/Chip.mjs +6 -12
  46. package/src/component/Circle.mjs +16 -22
  47. package/src/component/Clock.mjs +1 -1
  48. package/src/component/DateSelector.mjs +4 -9
  49. package/src/component/Gallery.mjs +12 -21
  50. package/src/component/Helix.mjs +2 -3
  51. package/src/component/Label.mjs +2 -3
  52. package/src/component/Legend.mjs +6 -9
  53. package/src/container/Base.mjs +5 -9
  54. package/src/dialog/Base.mjs +2 -3
  55. package/src/draggable/list/DragZone.mjs +1 -2
  56. package/src/draggable/tree/DragZone.mjs +1 -2
  57. package/src/form/Fieldset.mjs +4 -6
  58. package/src/form/field/CheckBox.mjs +23 -39
  59. package/src/form/field/Color.mjs +2 -3
  60. package/src/form/field/Display.mjs +1 -2
  61. package/src/form/field/Number.mjs +1 -2
  62. package/src/form/field/Picker.mjs +0 -1
  63. package/src/form/field/Text.mjs +34 -52
  64. package/src/form/field/TextArea.mjs +2 -3
  65. package/src/form/field/trigger/Base.mjs +2 -3
  66. package/src/form/field/trigger/SpinUpDown.mjs +3 -4
  67. package/src/form/field/trigger/Time.mjs +3 -4
  68. package/src/grid/header/Toolbar.mjs +1 -2
  69. package/src/layout/Card.mjs +2 -2
  70. package/src/list/Base.mjs +6 -11
  71. package/src/list/plugin/Animate.mjs +5 -12
  72. package/src/plugin/Resizable.mjs +3 -6
  73. package/src/selection/Model.mjs +3 -7
  74. package/src/selection/grid/CellColumnModel.mjs +2 -5
  75. package/src/selection/grid/CellColumnRowModel.mjs +2 -5
  76. package/src/selection/grid/CellRowModel.mjs +4 -13
  77. package/src/selection/table/CellColumnModel.mjs +2 -5
  78. package/src/selection/table/CellColumnRowModel.mjs +2 -5
  79. package/src/selection/table/CellRowModel.mjs +4 -13
  80. package/src/sitemap/Component.mjs +1 -1
  81. package/src/tab/Strip.mjs +8 -11
  82. package/src/tab/header/Toolbar.mjs +2 -3
  83. package/src/table/header/Button.mjs +4 -6
  84. package/src/table/header/Toolbar.mjs +3 -5
  85. package/src/tree/List.mjs +6 -9
  86. package/src/vdom/Helper.mjs +1 -1
@@ -110,8 +110,7 @@ class PreviewComponent extends Component {
110
110
  node.html = value;
111
111
 
112
112
  VDomUtil.getByFlag(vdom, 'userImageLink').href = href;
113
-
114
- this.vdom = vdom;
113
+ this.update();
115
114
  }
116
115
 
117
116
  /**
@@ -121,15 +120,13 @@ class PreviewComponent extends Component {
121
120
  * @protected
122
121
  */
123
122
  afterSetCreatedAt(value, oldValue) {
124
- let vdom = this.vdom;
125
-
126
- VDomUtil.getByFlag(vdom, 'createdAt').html = new Intl.DateTimeFormat('en-US', {
123
+ VDomUtil.getByFlag(this.vdom, 'createdAt').html = new Intl.DateTimeFormat('en-US', {
127
124
  day : 'numeric',
128
125
  month: 'long',
129
126
  year : 'numeric'
130
127
  }).format(new Date(value));
131
128
 
132
- this.vdom = vdom;
129
+ this.update();
133
130
  }
134
131
 
135
132
  /**
@@ -139,10 +136,8 @@ class PreviewComponent extends Component {
139
136
  * @protected
140
137
  */
141
138
  afterSetDescription(value, oldValue) {
142
- let vdom = this.vdom;
143
-
144
- VDomUtil.getByFlag(vdom, 'description').html = value;
145
- this.vdom = vdom;
139
+ VDomUtil.getByFlag(this.vdom, 'description').html = value;
140
+ this.update();
146
141
  }
147
142
 
148
143
  /**
@@ -153,13 +148,12 @@ class PreviewComponent extends Component {
153
148
  */
154
149
  afterSetFavorited(value, oldValue) {
155
150
  let me = this,
156
- vdom = me.vdom,
157
- button = vdom.cn[0].cn[2];
151
+ button = me.vdom.cn[0].cn[2];
158
152
 
159
153
  NeoArray.add(button.cls, value ? 'btn-primary' : 'btn-outline-primary');
160
154
  NeoArray.remove(button.cls, value ? 'btn-outline-primary' : 'btn-primary');
161
155
 
162
- me.vdom = vdom;
156
+ me.update();
163
157
 
164
158
  // ignore the initial setter call
165
159
  if (Neo.isBoolean(oldValue)) {
@@ -174,10 +168,8 @@ class PreviewComponent extends Component {
174
168
  * @protected
175
169
  */
176
170
  afterSetFavoritesCount(value, oldValue) {
177
- let vdom = this.vdom;
178
-
179
- VDomUtil.getByFlag(vdom, 'favoritesCount').html = ' ' + value;
180
- this.vdom = vdom;
171
+ VDomUtil.getByFlag(this.vdom, 'favoritesCount').html = ' ' + value;
172
+ this.update();
181
173
  }
182
174
 
183
175
  /**
@@ -187,10 +179,8 @@ class PreviewComponent extends Component {
187
179
  * @protected
188
180
  */
189
181
  afterSetSlug(value, oldValue) {
190
- let vdom = this.vdom;
191
-
192
- VDomUtil.getByFlag(vdom, 'preview-link').href = '#/article/' + value;
193
- this.vdom = vdom;
182
+ VDomUtil.getByFlag(this.vdom, 'preview-link').href = '#/article/' + value;
183
+ this.update();
194
184
  }
195
185
 
196
186
  /**
@@ -226,7 +216,7 @@ class PreviewComponent extends Component {
226
216
 
227
217
  vdom.cn[1].cn.push(tagList);
228
218
 
229
- me.vdom = vdom;
219
+ me.update();
230
220
  }
231
221
  }
232
222
 
@@ -237,10 +227,8 @@ class PreviewComponent extends Component {
237
227
  * @protected
238
228
  */
239
229
  afterSetTitle(value, oldValue) {
240
- let vdom = this.vdom;
241
-
242
- VDomUtil.getByFlag(vdom, 'title').html = value;
243
- this.vdom = vdom;
230
+ VDomUtil.getByFlag(this.vdom, 'title').html = value;
231
+ this.update();
244
232
  }
245
233
 
246
234
  /**
@@ -250,10 +238,8 @@ class PreviewComponent extends Component {
250
238
  * @protected
251
239
  */
252
240
  afterSetUserImage(value, oldValue) {
253
- let vdom = this.vdom;
254
-
255
- VDomUtil.getByFlag(vdom, 'userImageLink').cn[0].src = value;
256
- this.vdom = vdom;
241
+ VDomUtil.getByFlag(this.vdom, 'userImageLink').cn[0].src = value;
242
+ this.update();
257
243
  }
258
244
 
259
245
  /**
@@ -88,14 +88,13 @@ class TagListComponent extends Component {
88
88
  * @protected
89
89
  */
90
90
  afterSetTags(value, oldValue) {
91
- let me = this,
92
- vdom = me.vdom;
91
+ let me = this;
93
92
 
94
- vdom.cn[0].cn[1].cn = [];
93
+ me.vdom.cn[0].cn[1].cn = [];
95
94
 
96
95
  if (Array.isArray(value)) {
97
96
  value.forEach(item => {
98
- vdom.cn[0].cn[1].cn.push({
97
+ me.vdom.cn[0].cn[1].cn.push({
99
98
  tag : 'a',
100
99
  cls : ['tag-pill', 'tag-default'],
101
100
  href: '',
@@ -104,7 +103,7 @@ class TagListComponent extends Component {
104
103
  });
105
104
  });
106
105
 
107
- me.vdom = vdom;
106
+ me.update();
108
107
  }
109
108
  }
110
109
 
@@ -126,8 +126,7 @@ class ProfileComponent extends Component {
126
126
  */
127
127
  afterSetArticlePreviews(value, oldValue) {
128
128
  let me = this,
129
- vdom = me.vdom,
130
- container = VDomUtil.getByFlag(vdom, 'feed-container'),
129
+ container = VDomUtil.getByFlag(me.vdom, 'feed-container'),
131
130
  config;
132
131
 
133
132
  container.cn = [container.cn.shift()];
@@ -160,7 +159,7 @@ class ProfileComponent extends Component {
160
159
  });
161
160
  }
162
161
 
163
- me.vdom = vdom;
162
+ me.update();
164
163
  }
165
164
 
166
165
  /**
@@ -171,10 +170,8 @@ class ProfileComponent extends Component {
171
170
  */
172
171
  afterSetBio(value, oldValue) {
173
172
  if (value) {
174
- let vdom = this.vdom;
175
-
176
- VDomUtil.getByFlag(vdom, 'bio').html = value;
177
- this.vdom = vdom;
173
+ VDomUtil.getByFlag(this.vdom, 'bio').html = value;
174
+ this.update();
178
175
  }
179
176
  }
180
177
 
@@ -186,8 +183,7 @@ class ProfileComponent extends Component {
186
183
  */
187
184
  afterSetFollowing(value, oldValue) {
188
185
  if (Neo.isBoolean(value)) {
189
- let vdom = this.vdom,
190
- node = VDomUtil.getByFlag(vdom, 'following');
186
+ let node = VDomUtil.getByFlag(this.vdom, 'following');
191
187
 
192
188
  // tobiu: did not see this one in the specs, but the react & vue app do it
193
189
  NeoArray.remove(node.cls, value ? 'btn-outline-secondary' : 'btn-secondary');
@@ -195,7 +191,7 @@ class ProfileComponent extends Component {
195
191
 
196
192
  node.cn[0].cls = [value ? 'ion-minus-round' : 'ion-plus-round'];
197
193
  node.cn[1].html = value ? ' Unfollow ' : ' Follow ';
198
- this.vdom = vdom;
194
+ this.update();
199
195
  }
200
196
  }
201
197
 
@@ -206,10 +202,8 @@ class ProfileComponent extends Component {
206
202
  * @protected
207
203
  */
208
204
  afterSetImage(value, oldValue) {
209
- let vdom = this.vdom;
210
-
211
- VDomUtil.getByFlag(vdom, 'image').src = value;
212
- this.vdom = vdom;
205
+ VDomUtil.getByFlag(this.vdom, 'image').src = value;
206
+ this.update();
213
207
  }
214
208
 
215
209
  /**
@@ -224,7 +218,7 @@ class ProfileComponent extends Component {
224
218
 
225
219
  VDomUtil.getByFlag(vdom, 'edit-profile').removeDom = !value;
226
220
  VDomUtil.getByFlag(vdom, 'following') .removeDom = value;
227
- this.vdom = vdom;
221
+ this.update();
228
222
  }
229
223
  }
230
224
 
@@ -239,7 +233,7 @@ class ProfileComponent extends Component {
239
233
 
240
234
  VDomUtil.getByFlag(vdom, 'following').cn[2].html = value;
241
235
  VDomUtil.getByFlag(vdom, 'username').html = value;
242
- this.vdom = vdom;
236
+ this.update();
243
237
  }
244
238
 
245
239
  /**
@@ -274,9 +268,8 @@ class ProfileComponent extends Component {
274
268
  */
275
269
  onNavLinkClick(data) {
276
270
  let me = this,
277
- vdom = me.vdom,
278
- el = VDomUtil.findVdomChild(vdom, data.path[0].id),
279
- feedHeader = VDomUtil.getByFlag(vdom, 'feed-header'),
271
+ el = VDomUtil.findVdomChild(me.vdom, data.path[0].id),
272
+ feedHeader = VDomUtil.getByFlag(me.vdom, 'feed-header'),
280
273
  params = {};
281
274
 
282
275
  if (!el.vdom.cls.includes('disabled')) {
@@ -297,7 +290,7 @@ class ProfileComponent extends Component {
297
290
  NeoArray[item.id === el.parentNode.id ? 'add' : 'remove'](item.cn[0].cls, 'active');
298
291
  });
299
292
 
300
- me.vdom = vdom;
293
+ me.update();
301
294
 
302
295
  me.getArticles({
303
296
  ...params,
@@ -310,7 +303,7 @@ class ProfileComponent extends Component {
310
303
  /**
311
304
  * @param {Object} configs
312
305
  */
313
- update(configs) {
306
+ updateContent(configs) {
314
307
  let me = this,
315
308
  username = configs.username;
316
309
 
@@ -103,7 +103,7 @@ class SettingsComponent extends Component {
103
103
  let vdom = this.vdom;
104
104
 
105
105
  VDomUtil.getByFlag(vdom, 'bio').value = value;
106
- this.vdom = vdom;
106
+ this.update();
107
107
  }
108
108
 
109
109
  /**
@@ -113,10 +113,8 @@ class SettingsComponent extends Component {
113
113
  * @protected
114
114
  */
115
115
  afterSetEmail(value, oldValue) {
116
- let vdom = this.vdom;
117
-
118
- VDomUtil.getByFlag(vdom, 'email').value = value;
119
- this.vdom = vdom;
116
+ VDomUtil.getByFlag(this.vdom, 'email').value = value;
117
+ this.update();
120
118
  }
121
119
 
122
120
  /**
@@ -127,8 +125,7 @@ class SettingsComponent extends Component {
127
125
  */
128
126
  afterSetErrors(value=[], oldValue) {
129
127
  let me = this,
130
- vdom = me.vdom,
131
- list = VDomUtil.getByFlag(vdom, 'errors');
128
+ list = VDomUtil.getByFlag(me.vdom, 'errors');
132
129
 
133
130
  list.cn = [];
134
131
  list.removeDom = value.length === 0;
@@ -140,7 +137,7 @@ class SettingsComponent extends Component {
140
137
  });
141
138
  });
142
139
 
143
- me.vdom = vdom;
140
+ me.update();
144
141
  }
145
142
 
146
143
  /**
@@ -150,10 +147,8 @@ class SettingsComponent extends Component {
150
147
  * @protected
151
148
  */
152
149
  afterSetImage(value, oldValue) {
153
- let vdom = this.vdom;
154
-
155
- VDomUtil.getByFlag(vdom, 'image').value = value;
156
- this.vdom = vdom;
150
+ VDomUtil.getByFlag(this.vdom, 'image').value = value;
151
+ this.update();
157
152
  }
158
153
 
159
154
  /**
@@ -163,10 +158,8 @@ class SettingsComponent extends Component {
163
158
  * @protected
164
159
  */
165
160
  afterSetUserName(value, oldValue) {
166
- let vdom = this.vdom;
167
-
168
- VDomUtil.getByFlag(vdom, 'userName').value = value;
169
- this.vdom = vdom;
161
+ VDomUtil.getByFlag(this.vdom, 'userName').value = value;
162
+ this.update();
170
163
  }
171
164
 
172
165
  /**
@@ -86,8 +86,7 @@ class SignUpComponent extends Component {
86
86
  */
87
87
  afterSetErrors(value, oldValue) {
88
88
  let me = this,
89
- list = me.getErrorMessagesList(),
90
- vdom = me.vdom;
89
+ list = me.getErrorMessagesList();
91
90
 
92
91
  list.cn = [];
93
92
 
@@ -98,7 +97,7 @@ class SignUpComponent extends Component {
98
97
  });
99
98
  });
100
99
 
101
- me.vdom = vdom;
100
+ me.update();
102
101
  }
103
102
 
104
103
  /**
@@ -109,8 +108,7 @@ class SignUpComponent extends Component {
109
108
  */
110
109
  afterSetFieldsets(value, oldValue) {
111
110
  let me = this,
112
- vdom = me.vdom,
113
- form = vdom.cn[0].cn[0].cn[0].cn[3];
111
+ form = me.vdom.cn[0].cn[0].cn[0].cn[3];
114
112
 
115
113
  // slice().reverse() => iterate backwards
116
114
  value.slice().reverse().forEach(item => {
@@ -128,7 +126,7 @@ class SignUpComponent extends Component {
128
126
  });
129
127
  });
130
128
 
131
- me.vdom = vdom;
129
+ me.update();
132
130
  }
133
131
 
134
132
  /**
@@ -140,8 +138,7 @@ class SignUpComponent extends Component {
140
138
  afterSetMode(value, oldValue) {
141
139
  let me = this,
142
140
  isSignup = value === 'signup',
143
- vdom = me.vdom,
144
- contentDiv = vdom.cn[0].cn[0].cn[0];
141
+ contentDiv = me.vdom.cn[0].cn[0].cn[0];
145
142
 
146
143
  // vdom bulk update
147
144
  contentDiv.cn[0].html = isSignup ? 'Sign up' : 'Sign in';
@@ -155,7 +152,7 @@ class SignUpComponent extends Component {
155
152
  // submit button text
156
153
  contentDiv.cn[3].cn[0].cn[3].html = isSignup ? 'Sign up' : 'Sign in';
157
154
 
158
- me.vdom = vdom;
155
+ me.update();
159
156
  }
160
157
 
161
158
  /**
@@ -177,12 +177,12 @@ class MainContainerController extends ComponentController {
177
177
  * @param {String} slug
178
178
  */
179
179
  getProfile(slug) {
180
- const me = this;
180
+ let me = this;
181
181
 
182
182
  ProfileApi.get({
183
183
  slug: slug
184
184
  }).then(data => {
185
- /*me.profileComponent.update({
185
+ /*me.profileComponent.updateContent({
186
186
  ...data.json.profile,
187
187
  myProfile: data.json.profile.username === (me.currentUser && me.currentUser.username)
188
188
  });*/
@@ -115,8 +115,7 @@ class PreviewComponent extends Component {
115
115
  * @protected
116
116
  */
117
117
  afterSetAuthor(value, oldValue) {
118
- let vdom = this.vdom,
119
- node = VDomUtil.getByFlag(vdom, 'author'),
118
+ let node = VDomUtil.getByFlag(this.vdom, 'author'),
120
119
  href = '#/profile/' + value;
121
120
 
122
121
  // todo: disabled until the new profile view is ready
@@ -125,7 +124,7 @@ class PreviewComponent extends Component {
125
124
 
126
125
  //VDomUtil.getByFlag(vdom, 'userImageLink').href = href;
127
126
 
128
- this.vdom = vdom;
127
+ this.update();
129
128
  }
130
129
 
131
130
  /**
@@ -135,15 +134,13 @@ class PreviewComponent extends Component {
135
134
  * @protected
136
135
  */
137
136
  afterSetCreatedAt(value, oldValue) {
138
- let vdom = this.vdom;
139
-
140
- VDomUtil.getByFlag(vdom, 'createdAt').html = new Intl.DateTimeFormat('en-US', {
137
+ VDomUtil.getByFlag(this.vdom, 'createdAt').html = new Intl.DateTimeFormat('en-US', {
141
138
  day : 'numeric',
142
139
  month: 'long',
143
140
  year : 'numeric'
144
141
  }).format(new Date(value));
145
142
 
146
- this.vdom = vdom;
143
+ this.update();
147
144
  }
148
145
 
149
146
  /**
@@ -153,10 +150,8 @@ class PreviewComponent extends Component {
153
150
  * @protected
154
151
  */
155
152
  afterSetDescription(value, oldValue) {
156
- let vdom = this.vdom;
157
-
158
- VDomUtil.getByFlag(vdom, 'description').html = value;
159
- this.vdom = vdom;
153
+ VDomUtil.getByFlag(this.vdom, 'description').html = value;
154
+ this.update();
160
155
  }
161
156
 
162
157
  /**
@@ -167,13 +162,12 @@ class PreviewComponent extends Component {
167
162
  */
168
163
  afterSetFavorited(value, oldValue) {
169
164
  let me = this,
170
- vdom = me.vdom,
171
- button = vdom.cn[0].cn[2];
165
+ button = me.vdom.cn[0].cn[2];
172
166
 
173
167
  NeoArray.add(button.cls, value ? 'btn-primary' : 'btn-outline-primary');
174
168
  NeoArray.remove(button.cls, value ? 'btn-outline-primary' : 'btn-primary');
175
169
 
176
- me.vdom = vdom;
170
+ me.update();
177
171
 
178
172
  // ignore the initial setter call
179
173
  if (Neo.isBoolean(oldValue)) {
@@ -188,10 +182,8 @@ class PreviewComponent extends Component {
188
182
  * @protected
189
183
  */
190
184
  afterSetFavoritesCount(value, oldValue) {
191
- let vdom = this.vdom;
192
-
193
- VDomUtil.getByFlag(vdom, 'favoritesCount').html = ' ' + value;
194
- this.vdom = vdom;
185
+ VDomUtil.getByFlag(this.vdom, 'favoritesCount').html = ' ' + value;
186
+ this.update();
195
187
  }
196
188
 
197
189
  /**
@@ -201,11 +193,9 @@ class PreviewComponent extends Component {
201
193
  * @protected
202
194
  */
203
195
  afterSetSlug(value, oldValue) {
204
- let vdom = this.vdom;
205
-
206
196
  // todo: re-add once the new details view is in place
207
- //VDomUtil.getByFlag(vdom, 'preview-link').href = '#/article/' + value;
208
- this.vdom = vdom;
197
+ // VDomUtil.getByFlag(this.vdom, 'preview-link').href = '#/article/' + value;
198
+ // this.update();
209
199
  }
210
200
 
211
201
  /**
@@ -241,7 +231,7 @@ class PreviewComponent extends Component {
241
231
 
242
232
  vdom.cn[1].cn.push(tagList);
243
233
 
244
- me.vdom = vdom;
234
+ me.update();
245
235
  }
246
236
  }
247
237
 
@@ -252,10 +242,8 @@ class PreviewComponent extends Component {
252
242
  * @protected
253
243
  */
254
244
  afterSetTitle(value, oldValue) {
255
- let vdom = this.vdom;
256
-
257
- VDomUtil.getByFlag(vdom, 'title').html = value;
258
- this.vdom = vdom;
245
+ VDomUtil.getByFlag(this.vdom, 'title').html = value;
246
+ this.update();
259
247
  }
260
248
 
261
249
  /**
@@ -265,10 +253,8 @@ class PreviewComponent extends Component {
265
253
  * @protected
266
254
  */
267
255
  afterSetUserImage(value, oldValue) {
268
- let vdom = this.vdom;
269
-
270
- VDomUtil.getByFlag(vdom, 'userImageLink').cn[0].src = value;
271
- this.vdom = vdom;
256
+ VDomUtil.getByFlag(this.vdom, 'userImageLink').cn[0].src = value;
257
+ this.update();
272
258
  }
273
259
 
274
260
  /**
@@ -27,11 +27,10 @@ class PreviewList extends List {
27
27
  * @param {Boolean} [silent=false]
28
28
  */
29
29
  createItems(silent=false) {
30
- let me = this,
31
- vdom = me.vdom,
30
+ let me = this,
32
31
  listItem;
33
32
 
34
- vdom.cn = [];
33
+ me.vdom.cn = [];
35
34
 
36
35
  me.store.items.forEach(item => {
37
36
  listItem = Neo.create({
@@ -42,12 +41,10 @@ class PreviewList extends List {
42
41
  userImage: item.author.image
43
42
  });
44
43
 
45
- vdom.cn.push(listItem.vdom);
44
+ me.vdom.cn.push(listItem.vdom);
46
45
  });
47
46
 
48
- if (silent) {
49
- me._vdom = vdom;
50
- } else {
47
+ if (!silent) {
51
48
  me.promiseVdomUpdate().then(() => {
52
49
  me.fire('createItems');
53
50
  });
@@ -92,14 +92,13 @@ class TagListComponent extends Component {
92
92
  * @protected
93
93
  */
94
94
  afterSetTags(value, oldValue) {
95
- let me = this,
96
- vdom = me.vdom;
95
+ let me = this;
97
96
 
98
- vdom.cn[0].cn[1].cn = [];
97
+ me.vdom.cn[0].cn[1].cn = [];
99
98
 
100
99
  if (Array.isArray(value)) {
101
100
  value.forEach(item => {
102
- vdom.cn[0].cn[1].cn.push({
101
+ me.vdom.cn[0].cn[1].cn.push({
103
102
  tag : 'a',
104
103
  cls : ['tag-pill', 'tag-default'],
105
104
  href: '',
@@ -108,7 +107,7 @@ class TagListComponent extends Component {
108
107
  });
109
108
  });
110
109
 
111
- me.vdom = vdom;
110
+ me.update();
112
111
  }
113
112
  }
114
113
 
@@ -136,18 +136,17 @@ class MainContainerController extends ComponentController {
136
136
  vdom.cn[2].cn[1].html = Util.formatNumber({value: data.recovered});
137
137
  vdom.cn[3].cn[1].html = Util.formatNumber({value: data.deaths});
138
138
 
139
- container.vdom = vdom;
139
+ container.update();
140
140
 
141
141
  container = me.getReference('last-update');
142
- vdom = container.vdom;
143
142
 
144
- vdom.html = 'Last Update: ' + new Intl.DateTimeFormat('default', {
143
+ container.vdom.html = 'Last Update: ' + new Intl.DateTimeFormat('default', {
145
144
  hour : 'numeric',
146
145
  minute: 'numeric',
147
146
  second: 'numeric'
148
147
  }).format(new Date(data.updated));
149
148
 
150
- container.vdom = vdom;
149
+ container.update();
151
150
  }
152
151
 
153
152
  /**
@@ -492,10 +491,9 @@ class MainContainerController extends ComponentController {
492
491
  *
493
492
  */
494
493
  onLoadSummaryDataFail() {
495
- const table = this.getReference('table'),
496
- vdom = table.vdom;
494
+ const table = this.getReference('table');
497
495
 
498
- vdom.cn[0].cn[1].cn.push({
496
+ table.vdom.cn[0].cn[1].cn.push({
499
497
  tag : 'div',
500
498
  cls : ['neo-box-label', 'neo-label'],
501
499
  html : [
@@ -509,7 +507,7 @@ class MainContainerController extends ComponentController {
509
507
  }
510
508
  });
511
509
 
512
- table.vdom = vdom;
510
+ table.update();
513
511
  }
514
512
 
515
513
  /**
@@ -559,7 +557,6 @@ class MainContainerController extends ComponentController {
559
557
  logo = me.getReference('logo'),
560
558
  logoPath = 'https://raw.githubusercontent.com/neomjs/pages/master/resources/images/apps/covid/',
561
559
  themeLight = button.text === 'Theme Light',
562
- vdom = logo.vdom,
563
560
  buttonText, cls, href, iconCls, mapView, mapViewStyle, theme;
564
561
 
565
562
  if (me.connectedApps.includes('SharedCovidMap')) {
@@ -582,8 +579,8 @@ class MainContainerController extends ComponentController {
582
579
  theme = 'neo-theme-dark';
583
580
  }
584
581
 
585
- vdom.src = logoPath + (theme === 'neo-theme-dark' ? 'covid_logo_dark.jpg' : 'covid_logo_light.jpg');
586
- logo.vdom = vdom;
582
+ logo.vdom.src = logoPath + (theme === 'neo-theme-dark' ? 'covid_logo_dark.jpg' : 'covid_logo_light.jpg');
583
+ logo.update();
587
584
 
588
585
 
589
586
  if (Neo.config.useCssVars) {
@@ -603,8 +600,8 @@ class MainContainerController extends ComponentController {
603
600
  });
604
601
 
605
602
  button.set({
606
- iconCls: iconCls,
607
- text : buttonText
603
+ iconCls,
604
+ text: buttonText
608
605
  });
609
606
  } else {
610
607
  [component.appName, ...me.connectedApps].forEach(appName => {
@@ -125,10 +125,9 @@ class List extends BaseList {
125
125
  emptyValue = !data.value || data.value === '',
126
126
  store = me.store,
127
127
  valueRegEx = new RegExp(data.value, 'gi'),
128
- vdom = me.vdom,
129
128
  hasMatch, itemName, name, record;
130
129
 
131
- vdom.cn.forEach((item, index) => {
130
+ me.vdom.cn.forEach((item, index) => {
132
131
  hasMatch = false;
133
132
  itemName = VDomUtil.getByFlag(item, 'name');
134
133
  record = store.getAt(index);
@@ -153,7 +152,7 @@ class List extends BaseList {
153
152
  }
154
153
  });
155
154
 
156
- me.vdom = vdom;
155
+ me.update();
157
156
  }
158
157
 
159
158
  /**
@@ -35,13 +35,9 @@ class ApiTreeList extends TreeList {
35
35
  Neo.Xhr.promiseJson({
36
36
  url: '../../docs/output/structure.json'
37
37
  }).then(data => {
38
- let vdom = me.vdom,
39
- itemRoot = me.getListItemsRoot();
40
-
41
38
  me.store.data = data.json;
42
- itemRoot = me.createItems(null, itemRoot, 0);
43
-
44
- me.vdom = vdom;
39
+ me.createItems(null, me.getListItemsRoot(), 0);
40
+ me.update();
45
41
  });
46
42
  }
47
43
  }