neo.mjs 10.0.0-beta.1 → 10.0.0-beta.2
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.
- package/ServiceWorker.mjs +2 -2
- package/apps/colors/view/GridContainer.mjs +1 -1
- package/apps/covid/view/AttributionComponent.mjs +1 -1
- package/apps/covid/view/HeaderContainer.mjs +6 -6
- package/apps/covid/view/MainContainerController.mjs +5 -5
- package/apps/covid/view/TableContainerController.mjs +1 -1
- package/apps/covid/view/country/Gallery.mjs +13 -13
- package/apps/covid/view/country/Helix.mjs +13 -13
- package/apps/covid/view/country/HistoricalDataTable.mjs +1 -1
- package/apps/email/view/Viewport.mjs +2 -2
- package/apps/form/view/SideNavList.mjs +1 -1
- package/apps/portal/index.html +1 -1
- package/apps/portal/resources/data/examples_dist_esm.json +1 -1
- package/apps/portal/resources/data/examples_dist_prod.json +2 -2
- package/apps/portal/view/HeaderToolbar.mjs +3 -3
- package/apps/portal/view/about/Container.mjs +2 -2
- package/apps/portal/view/about/MemberContainer.mjs +3 -3
- package/apps/portal/view/blog/List.mjs +7 -7
- package/apps/portal/view/examples/List.mjs +4 -4
- package/apps/portal/view/home/ContentBox.mjs +2 -2
- package/apps/portal/view/home/FeatureSection.mjs +3 -3
- package/apps/portal/view/home/FooterContainer.mjs +7 -7
- package/apps/portal/view/home/parts/AfterMath.mjs +3 -3
- package/apps/portal/view/home/parts/MainNeo.mjs +3 -3
- package/apps/portal/view/home/parts/References.mjs +6 -6
- package/apps/portal/view/learn/ContentComponent.mjs +3 -3
- package/apps/portal/view/learn/PageSectionsContainer.mjs +1 -1
- package/apps/portal/view/learn/PageSectionsList.mjs +2 -2
- package/apps/portal/view/services/Component.mjs +16 -16
- package/apps/realworld/view/FooterComponent.mjs +1 -1
- package/apps/realworld/view/HeaderComponent.mjs +8 -8
- package/apps/realworld/view/HomeComponent.mjs +6 -6
- package/apps/realworld/view/article/CommentComponent.mjs +4 -4
- package/apps/realworld/view/article/Component.mjs +14 -14
- package/apps/realworld/view/article/CreateCommentComponent.mjs +3 -3
- package/apps/realworld/view/article/CreateComponent.mjs +3 -3
- package/apps/realworld/view/article/PreviewComponent.mjs +1 -1
- package/apps/realworld/view/article/TagListComponent.mjs +2 -2
- package/apps/realworld/view/user/ProfileComponent.mjs +8 -8
- package/apps/realworld/view/user/SettingsComponent.mjs +4 -4
- package/apps/realworld/view/user/SignUpComponent.mjs +4 -4
- package/apps/realworld2/view/FooterComponent.mjs +1 -1
- package/apps/realworld2/view/HomeContainer.mjs +3 -3
- package/apps/realworld2/view/article/DetailsContainer.mjs +1 -1
- package/apps/realworld2/view/article/PreviewComponent.mjs +7 -7
- package/apps/realworld2/view/article/TagListComponent.mjs +2 -2
- package/apps/realworld2/view/user/ProfileContainer.mjs +1 -1
- package/apps/route/view/center/CardAdministration.mjs +2 -2
- package/apps/route/view/center/CardAdministrationDenied.mjs +1 -1
- package/apps/route/view/center/CardContact.mjs +2 -2
- package/apps/route/view/center/CardHome.mjs +1 -1
- package/apps/route/view/center/CardSection1.mjs +1 -1
- package/apps/route/view/center/CardSection2.mjs +1 -1
- package/apps/sharedcovid/view/AttributionComponent.mjs +1 -1
- package/apps/sharedcovid/view/HeaderContainer.mjs +6 -6
- package/apps/sharedcovid/view/MainContainerController.mjs +5 -5
- package/apps/sharedcovid/view/TableContainerController.mjs +1 -1
- package/apps/sharedcovid/view/country/Gallery.mjs +13 -13
- package/apps/sharedcovid/view/country/Helix.mjs +13 -13
- package/apps/sharedcovid/view/country/HistoricalDataTable.mjs +1 -1
- package/apps/shareddialog/childapps/shareddialog2/view/MainContainer.mjs +1 -1
- package/apps/shareddialog/view/MainContainer.mjs +1 -1
- package/buildScripts/createApp.mjs +2 -2
- package/learn/Glossary.md +261 -0
- package/learn/benefits/ConfigSystem.md +536 -26
- package/learn/benefits/Effort.md +47 -2
- package/learn/benefits/Features.md +50 -32
- package/learn/benefits/FormsEngine.md +54 -24
- package/learn/benefits/MultiWindow.md +31 -5
- package/learn/benefits/Quick.md +45 -12
- package/learn/benefits/RPCLayer.md +75 -0
- package/learn/benefits/Speed.md +17 -12
- package/learn/guides/ConfigSystemDeepDive.md +280 -0
- package/learn/guides/DeclarativeComponentTreesVsImperativeVdom.md +17 -17
- package/learn/guides/InstanceLifecycle.md +295 -1
- package/learn/guides/MainThreadAddons.md +475 -0
- package/learn/guides/WorkingWithVDom.md +14 -14
- package/learn/tree.json +52 -51
- package/package.json +2 -2
- package/src/DefaultConfig.mjs +2 -2
- package/src/Main.mjs +8 -7
- package/src/Neo.mjs +16 -2
- package/src/button/Base.mjs +2 -2
- package/src/calendar/view/SettingsContainer.mjs +2 -2
- package/src/calendar/view/YearComponent.mjs +9 -9
- package/src/calendar/view/calendars/ColorsList.mjs +1 -1
- package/src/calendar/view/calendars/List.mjs +1 -1
- package/src/calendar/view/month/Component.mjs +15 -15
- package/src/calendar/view/week/Component.mjs +12 -12
- package/src/calendar/view/week/EventDragZone.mjs +4 -4
- package/src/calendar/view/week/TimeAxisComponent.mjs +3 -3
- package/src/component/Base.mjs +17 -2
- package/src/component/Carousel.mjs +2 -2
- package/src/component/Chip.mjs +3 -3
- package/src/component/Circle.mjs +2 -2
- package/src/component/DateSelector.mjs +8 -8
- package/src/component/Helix.mjs +1 -1
- package/src/component/Label.mjs +3 -18
- package/src/component/Legend.mjs +3 -3
- package/src/component/MagicMoveText.mjs +6 -14
- package/src/component/Process.mjs +3 -3
- package/src/component/Progress.mjs +1 -1
- package/src/component/StatusBadge.mjs +2 -2
- package/src/component/Timer.mjs +2 -2
- package/src/component/Toast.mjs +5 -3
- package/src/container/AccordionItem.mjs +2 -2
- package/src/container/Base.mjs +1 -1
- package/src/core/Base.mjs +18 -2
- package/src/date/DayViewComponent.mjs +2 -2
- package/src/date/SelectorContainer.mjs +1 -1
- package/src/form/field/CheckBox.mjs +4 -4
- package/src/form/field/FileUpload.mjs +25 -39
- package/src/form/field/Range.mjs +1 -1
- package/src/form/field/Text.mjs +3 -3
- package/src/form/field/TextArea.mjs +2 -3
- package/src/grid/Body.mjs +6 -2
- package/src/list/Color.mjs +2 -2
- package/src/main/DeltaUpdates.mjs +157 -98
- package/src/main/addon/AmCharts.mjs +53 -73
- package/src/main/addon/Base.mjs +11 -0
- package/src/main/addon/MonacoEditor.mjs +31 -58
- package/src/manager/ClassHierarchy.mjs +114 -0
- package/src/menu/List.mjs +1 -1
- package/src/plugin/Popover.mjs +2 -2
- package/src/sitemap/Component.mjs +1 -1
- package/src/table/Body.mjs +6 -2
- package/src/tooltip/Base.mjs +1 -6
- package/src/tree/Accordion.mjs +3 -3
- package/src/vdom/Helper.mjs +19 -19
- package/src/worker/App.mjs +1 -2
- package/src/worker/Base.mjs +6 -4
- package/src/worker/Canvas.mjs +2 -3
- package/src/worker/Data.mjs +5 -7
- package/src/worker/Task.mjs +2 -3
- package/src/worker/VDom.mjs +3 -4
- package/src/worker/mixin/RemoteMethodAccess.mjs +4 -1
- package/learn/guides/MainThreadAddonExample.md +0 -15
- package/learn/guides/MainThreadAddonIntro.md +0 -44
@@ -20,36 +20,36 @@ class Component extends BaseComponent {
|
|
20
20
|
*/
|
21
21
|
vdom:
|
22
22
|
{cn: [
|
23
|
-
{tag: 'h1', cls: ['neo-h1'],
|
23
|
+
{tag: 'h1', cls: ['neo-h1'], text: 'Services'},
|
24
24
|
{cls: ['info-block'], cn: [
|
25
|
-
{tag: 'h2', cls: ['neo-h2'],
|
26
|
-
{tag: 'p',
|
25
|
+
{tag: 'h2', cls: ['neo-h2'], text: 'Professional Trainings'},
|
26
|
+
{tag: 'p', text: [
|
27
27
|
'While we do have a self-study based Learning Section online, you can also hire us ',
|
28
28
|
'in case you prefer an Instructor-led Training for bringing your team up to speed.'
|
29
29
|
].join('')},
|
30
30
|
{tag: 'ul', cn: [
|
31
|
-
{tag: 'li',
|
32
|
-
{tag: 'li',
|
33
|
-
{tag: 'li',
|
34
|
-
{tag: 'li',
|
31
|
+
{tag: 'li', text: 'One week packed with 40h of intense training.'},
|
32
|
+
{tag: 'li', text: 'Including hands-on Labs'},
|
33
|
+
{tag: 'li', text: '6 - 12 attendees'},
|
34
|
+
{tag: 'li', text: 'While Remote Trainings are possible, we strongly recommend On-Site Trainings instead.'},
|
35
35
|
]},
|
36
36
|
{tag: 'p', html: [
|
37
37
|
'Feel free to send us an <a href="mailto:trainings@neomjs.com">Email</a> to plan your training timeframe.',
|
38
38
|
].join('')},
|
39
39
|
]},
|
40
40
|
{cls: ['info-block'], cn: [
|
41
|
-
{tag: 'h2', cls: ['neo-h2'],
|
42
|
-
{tag: 'p',
|
41
|
+
{tag: 'h2', cls: ['neo-h2'], text: 'Professional Services'},
|
42
|
+
{tag: 'p', text: [
|
43
43
|
'We can help you to ensure your Neo.mjs based projects run successfully.',
|
44
44
|
].join('')},
|
45
45
|
{tag: 'ul', cn: [
|
46
|
-
{tag: 'li',
|
47
|
-
{tag: 'li',
|
48
|
-
{tag: 'li',
|
49
|
-
{tag: 'li',
|
50
|
-
{tag: 'li',
|
51
|
-
{tag: 'li',
|
52
|
-
{tag: 'li',
|
46
|
+
{tag: 'li', text: 'Feasibility Analysis: Is Neo.mjs a good fit for your project needs?'},
|
47
|
+
{tag: 'li', text: 'Creating a Neo.mjs PoC which matches your specific needs'},
|
48
|
+
{tag: 'li', text: 'Code Reviews'},
|
49
|
+
{tag: 'li', text: 'Frontend-Architecture Guidance'},
|
50
|
+
{tag: 'li', text: 'Application & Framework Debugging'},
|
51
|
+
{tag: 'li', text: 'Creation of Custom Components, Design Themes & new Features'},
|
52
|
+
{tag: 'li', text: 'Hands-On Application Development Support'}
|
53
53
|
]},
|
54
54
|
{tag: 'p', html: [
|
55
55
|
'In case you need help, send us an <a href="mailto:services@neomjs.com">Email</a>.',
|
@@ -17,7 +17,7 @@ class FooterComponent extends Component {
|
|
17
17
|
_vdom:
|
18
18
|
{tag: 'footer', cn: [
|
19
19
|
{cls: ['container'], cn: [
|
20
|
-
{tag: 'a', cls: ['logo-font'], href: '#/',
|
20
|
+
{tag: 'a', cls: ['logo-font'], href: '#/', text: 'conduit'},
|
21
21
|
{tag: 'span', cls: 'attribution', html: 'An interactive learning project from <a href="https://thinkster.io">Thinkster</a>. Code & design licensed under MIT.'}
|
22
22
|
]}
|
23
23
|
]}
|
@@ -38,34 +38,34 @@ class HeaderComponent extends Component {
|
|
38
38
|
_vdom:
|
39
39
|
{tag: 'nav', cls: ['navbar navbar-light'], cn: [
|
40
40
|
{cls: ['container'], cn: [
|
41
|
-
{tag: 'a', cls: ['navbar-brand'], href: '#/',
|
41
|
+
{tag: 'a', cls: ['navbar-brand'], href: '#/', text: 'conduit'},
|
42
42
|
{tag: 'ul', cls: ['nav navbar-nav', 'pull-xs-right'], cn: [
|
43
43
|
{tag: 'li', cls: ['nav-item'], cn: [
|
44
|
-
{tag: 'a', cls: ['nav-link'], href: '#/',
|
44
|
+
{tag: 'a', cls: ['nav-link'], href: '#/', text: 'Home'}
|
45
45
|
]},
|
46
46
|
{tag: 'li', cls: ['nav-item'], removeDom: true, cn: [
|
47
47
|
{tag: 'a', cls: ['nav-link'], href: '#/editor', cn: [
|
48
48
|
{tag: 'i', cls: 'ion-compose'},
|
49
|
-
{vtype: 'text',
|
49
|
+
{vtype: 'text', text: ' New Article'}
|
50
50
|
]}
|
51
51
|
]},
|
52
52
|
{tag: 'li', cls: ['nav-item'], removeDom: true, cn: [
|
53
53
|
{tag: 'a', cls: ['nav-link'], href: '#/settings', cn: [
|
54
54
|
{tag: 'i', cls: 'ion-gear-a'},
|
55
|
-
{vtype: 'text',
|
55
|
+
{vtype: 'text', text: ' Settings'}
|
56
56
|
]}
|
57
57
|
]},
|
58
58
|
{tag: 'li', cls: ['nav-item'], removeDom: true, cn: [
|
59
59
|
{tag: 'a', cls : ['nav-link'], href: '#/profile', cn: [
|
60
60
|
{tag: 'img', cls: ['user-pic']},
|
61
|
-
{vtype: 'text',
|
61
|
+
{vtype: 'text', text: ' Profile'}
|
62
62
|
]}
|
63
63
|
]},
|
64
64
|
{tag: 'li', cls: ['nav-item'], cn: [
|
65
|
-
{tag : 'a', cls : ['nav-link'], href: '#/login',
|
65
|
+
{tag : 'a', cls : ['nav-link'], href: '#/login', text: 'Sign in'}
|
66
66
|
]},
|
67
67
|
{tag: 'li', cls: ['nav-item'], cn: [
|
68
|
-
{tag: 'a', cls : ['nav-link'], href: '#/register',
|
68
|
+
{tag: 'a', cls : ['nav-link'], href: '#/register', text: 'Sign up'}
|
69
69
|
]}
|
70
70
|
]}
|
71
71
|
]}
|
@@ -140,7 +140,7 @@ class HeaderComponent extends Component {
|
|
140
140
|
profileLink = me.vdom.cn[0].cn[1].cn[3].cn[0];
|
141
141
|
|
142
142
|
profileLink.href = '#/profile/' + value;
|
143
|
-
profileLink.cn[1].
|
143
|
+
profileLink.cn[1].text = ' ' + value;
|
144
144
|
|
145
145
|
me.update();
|
146
146
|
}
|
@@ -65,8 +65,8 @@ class HomeComponent extends Component {
|
|
65
65
|
{cn: [
|
66
66
|
{cls: ['banner'], cn: [
|
67
67
|
{cls: ['container'], cn: [
|
68
|
-
{tag: 'h1', cls: ['logo-font'],
|
69
|
-
{tag: 'p',
|
68
|
+
{tag: 'h1', cls: ['logo-font'], text: 'conduit'},
|
69
|
+
{tag: 'p', text: 'A place to share your knowledge.'}
|
70
70
|
]}
|
71
71
|
]},
|
72
72
|
{cls: ['container', 'page'], cn: [
|
@@ -211,7 +211,7 @@ class HomeComponent extends Component {
|
|
211
211
|
cls : ['page-link', 'prevent-click'],
|
212
212
|
id : me.getNavLinkVdomId(i),
|
213
213
|
href: '',
|
214
|
-
|
214
|
+
text: i
|
215
215
|
}]
|
216
216
|
});
|
217
217
|
}
|
@@ -274,7 +274,7 @@ class HomeComponent extends Component {
|
|
274
274
|
tag : 'a',
|
275
275
|
cls : cls,
|
276
276
|
href: '',
|
277
|
-
|
277
|
+
text: item.name,
|
278
278
|
id : me.id + '__nav-item-link_' + index,
|
279
279
|
}]
|
280
280
|
});
|
@@ -376,7 +376,7 @@ class HomeComponent extends Component {
|
|
376
376
|
opts = {};
|
377
377
|
|
378
378
|
if (!el.vdom.cls.includes('disabled')) {
|
379
|
-
switch (el.vdom.
|
379
|
+
switch (el.vdom.text) {
|
380
380
|
case 'Global Feed':
|
381
381
|
me.activeTag = null;
|
382
382
|
break;
|
@@ -387,7 +387,7 @@ class HomeComponent extends Component {
|
|
387
387
|
};
|
388
388
|
break;
|
389
389
|
default: // tag
|
390
|
-
me.activeTag = el.vdom.
|
390
|
+
me.activeTag = el.vdom.text.substring(2); // remove the '# '
|
391
391
|
break;
|
392
392
|
}
|
393
393
|
|
@@ -49,7 +49,7 @@ class CommentComponent extends Component {
|
|
49
49
|
{tag: 'a', cls : ['comment-author'], href: '', cn: [
|
50
50
|
{tag: 'img', cls: ['comment-author-img']}
|
51
51
|
]},
|
52
|
-
{vtype: 'text',
|
52
|
+
{vtype: 'text', text: ' '},
|
53
53
|
{tag: 'a', cls: ['comment-author'], href: ''},
|
54
54
|
{tag: 'span', cls : ['date-posted']},
|
55
55
|
{tag: 'span', cls : ['mod-options'], flag: 'mod-options', cn: [
|
@@ -90,7 +90,7 @@ class CommentComponent extends Component {
|
|
90
90
|
let me = this;
|
91
91
|
|
92
92
|
me.vdom.cn[1].cn[0].cn[0].src = value.image;
|
93
|
-
me.vdom.cn[1].cn[2].
|
93
|
+
me.vdom.cn[1].cn[2].text = value.username;
|
94
94
|
|
95
95
|
me.update();
|
96
96
|
me.onCurrentUserChange();
|
@@ -105,7 +105,7 @@ class CommentComponent extends Component {
|
|
105
105
|
*/
|
106
106
|
afterSetBody(value, oldValue) {
|
107
107
|
if (value) {
|
108
|
-
this.vdom.cn[0].cn[0].
|
108
|
+
this.vdom.cn[0].cn[0].text = value;
|
109
109
|
this.update();
|
110
110
|
}
|
111
111
|
}
|
@@ -118,7 +118,7 @@ class CommentComponent extends Component {
|
|
118
118
|
*/
|
119
119
|
afterSetCreatedAt(value, oldValue) {
|
120
120
|
if (value) {
|
121
|
-
this.vdom.cn[1].cn[3].
|
121
|
+
this.vdom.cn[1].cn[3].text = new Intl.DateTimeFormat('en-US', {
|
122
122
|
day : 'numeric',
|
123
123
|
month: 'long',
|
124
124
|
year : 'numeric'
|
@@ -87,19 +87,19 @@ class Component extends BaseComponent {
|
|
87
87
|
]},
|
88
88
|
{tag: 'button', cls: ['btn', 'btn-sm', 'btn-outline-secondary', 'edit-button'], flag: 'edit-button', removeDom: true, cn: [
|
89
89
|
{tag: 'i', cls: ['ion-edit']},
|
90
|
-
{vtype: 'text',
|
90
|
+
{vtype: 'text', text: ' Edit Article'}
|
91
91
|
]},
|
92
92
|
{vtype: 'text', html: ' '},
|
93
93
|
{tag: 'button', cls: ['btn', 'btn-sm', 'btn-outline-primary', 'favorite-button'], flag: 'favorited', cn: [
|
94
94
|
{tag: 'i', cls: ['ion-heart']},
|
95
95
|
{vtype: 'text', html: ' '},
|
96
96
|
{vtype: 'text'},
|
97
|
-
{vtype: 'text',
|
97
|
+
{vtype: 'text', text: ' Post '},
|
98
98
|
{tag: 'span', cls: ['counter'], flag: 'favoritesCount'}
|
99
99
|
]},
|
100
100
|
{tag: 'button', cls: ['btn', 'btn-sm', 'btn-outline-danger', 'delete-button'], flag: 'delete-button', removeDom: true, cn: [
|
101
101
|
{tag: 'i', cls: ['ion-trash-a']},
|
102
|
-
{vtype: 'text',
|
102
|
+
{vtype: 'text', text: ' Delete Article'}
|
103
103
|
]}
|
104
104
|
]}
|
105
105
|
]}
|
@@ -114,7 +114,7 @@ class Component extends BaseComponent {
|
|
114
114
|
{tag: 'a', flag: 'userimage', cn: [{tag: 'img'}]},
|
115
115
|
{cls: ['info'], cn: [
|
116
116
|
{tag: 'a', cls: ['author'], flag: 'username'},
|
117
|
-
{tag: 'span', cls: ['date'],
|
117
|
+
{tag: 'span', cls: ['date'], text: 'January 20th'}
|
118
118
|
]},
|
119
119
|
{tag: 'button', cls: ['btn', 'btn-sm', 'btn-outline-secondary', 'follow-button'], cn: [
|
120
120
|
{tag: 'i', flag: 'followIcon'},
|
@@ -126,7 +126,7 @@ class Component extends BaseComponent {
|
|
126
126
|
{tag: 'i', cls: ['ion-heart']},
|
127
127
|
{vtype: 'text', html: ' '},
|
128
128
|
{vtype: 'text'},
|
129
|
-
{vtype: 'text',
|
129
|
+
{vtype: 'text', text: ' Post '},
|
130
130
|
{tag: 'span', cls: ['counter'], flag: 'favoritesCount'}
|
131
131
|
]}
|
132
132
|
]}
|
@@ -190,7 +190,7 @@ class Component extends BaseComponent {
|
|
190
190
|
vdom = me.vdom;
|
191
191
|
|
192
192
|
VDomUtil.getFlags(vdom, 'followAuthor').forEach(node => {
|
193
|
-
node.
|
193
|
+
node.text = value.following ? ' Unfollow ' : ' Follow ';
|
194
194
|
});
|
195
195
|
|
196
196
|
VDomUtil.getFlags(vdom, 'followIcon').forEach(node => {
|
@@ -204,7 +204,7 @@ class Component extends BaseComponent {
|
|
204
204
|
|
205
205
|
VDomUtil.getFlags(vdom, 'username').forEach(node => {
|
206
206
|
node.href = '#/profile/' + value.username;
|
207
|
-
node.
|
207
|
+
node.text = value.username;
|
208
208
|
});
|
209
209
|
|
210
210
|
me.update();
|
@@ -286,7 +286,7 @@ class Component extends BaseComponent {
|
|
286
286
|
*/
|
287
287
|
afterSetCreatedAt(value, oldValue) {
|
288
288
|
if (value) {
|
289
|
-
VDomUtil.getByFlag(this.vdom, 'createdAt').
|
289
|
+
VDomUtil.getByFlag(this.vdom, 'createdAt').text = new Intl.DateTimeFormat('en-US', {
|
290
290
|
day : 'numeric',
|
291
291
|
month: 'long',
|
292
292
|
year : 'numeric'
|
@@ -306,7 +306,7 @@ class Component extends BaseComponent {
|
|
306
306
|
let me = this;
|
307
307
|
|
308
308
|
VDomUtil.getFlags(me.vdom, 'favorited').forEach(node => {
|
309
|
-
node.cn[2].
|
309
|
+
node.cn[2].text = value ? 'Unfavorite' : 'Favorite';
|
310
310
|
|
311
311
|
NeoArray.add(node.cls, value ? 'btn-primary' : 'btn-outline-primary');
|
312
312
|
NeoArray.remove(node.cls, value ? 'btn-outline-primary' : 'btn-primary');
|
@@ -331,10 +331,10 @@ class Component extends BaseComponent {
|
|
331
331
|
afterSetFavoritesCount(value, oldValue) {
|
332
332
|
if (Neo.isNumber(value)) {
|
333
333
|
VDomUtil.getFlags(this.vdom, 'favoritesCount').forEach(node => {
|
334
|
-
node.
|
334
|
+
node.text = `(${value})`;
|
335
335
|
});
|
336
336
|
|
337
|
-
this.update()
|
337
|
+
this.update()
|
338
338
|
}
|
339
339
|
}
|
340
340
|
|
@@ -360,7 +360,7 @@ class Component extends BaseComponent {
|
|
360
360
|
tagList.cn.push({
|
361
361
|
tag : 'li',
|
362
362
|
cls : ['tag-default', 'tag-pill', 'tag-outline'],
|
363
|
-
|
363
|
+
text: item
|
364
364
|
})
|
365
365
|
});
|
366
366
|
|
@@ -381,8 +381,8 @@ class Component extends BaseComponent {
|
|
381
381
|
* @protected
|
382
382
|
*/
|
383
383
|
afterSetTitle(value, oldValue) {
|
384
|
-
VDomUtil.getByFlag(this.vdom, 'title').
|
385
|
-
this.update()
|
384
|
+
VDomUtil.getByFlag(this.vdom, 'title').text = value;
|
385
|
+
this.update()
|
386
386
|
}
|
387
387
|
|
388
388
|
/**
|
@@ -35,7 +35,7 @@ class CreateCommentComponent extends Component {
|
|
35
35
|
{tag: 'img', cls: ['comment-author-img'], src: 'https://static.productionready.io/images/smiley-cyrus.jpg'}, // https://github.com/gothinkster/realworld/issues/442
|
36
36
|
{vtype: 'text', html: ' '},
|
37
37
|
{tag: 'span', cls: ['comment-author']},
|
38
|
-
{tag: 'button', cls: ['btn', 'btn-sm', 'btn-primary'],
|
38
|
+
{tag: 'button', cls: ['btn', 'btn-sm', 'btn-primary'], text: 'Post Comment', type: 'button'}
|
39
39
|
]}
|
40
40
|
]}
|
41
41
|
}
|
@@ -86,8 +86,8 @@ class CreateCommentComponent extends Component {
|
|
86
86
|
*/
|
87
87
|
afterSetUserName(value, oldValue) {
|
88
88
|
if (value) {
|
89
|
-
this.vdom.cn[1].cn[2].
|
90
|
-
this.update()
|
89
|
+
this.vdom.cn[1].cn[2].text = value;
|
90
|
+
this.update()
|
91
91
|
}
|
92
92
|
}
|
93
93
|
|
@@ -66,7 +66,7 @@ class CreateComponent extends Component {
|
|
66
66
|
{tag: 'input', cls: ['form-control', 'field-tags'], flag: 'tags', name: 'tags', placeholder: 'Enter tags', type: 'text'},
|
67
67
|
{cls: ['tag-list'], flag: 'tag-list'}
|
68
68
|
]},
|
69
|
-
{tag: 'button', cls: ['btn', 'btn-lg', 'btn-primary', 'pull-xs-right'],
|
69
|
+
{tag: 'button', cls: ['btn', 'btn-lg', 'btn-primary', 'pull-xs-right'], text: 'Publish Article', type: 'button'}
|
70
70
|
]}
|
71
71
|
]}
|
72
72
|
]}
|
@@ -128,7 +128,7 @@ class CreateComponent extends Component {
|
|
128
128
|
Object.entries(value || {}).forEach(([key, value]) => {
|
129
129
|
list.cn.push({
|
130
130
|
tag : 'li',
|
131
|
-
|
131
|
+
text: key + ' ' + value.join(' and ')
|
132
132
|
});
|
133
133
|
});
|
134
134
|
|
@@ -159,7 +159,7 @@ class CreateComponent extends Component {
|
|
159
159
|
'data-value': value,
|
160
160
|
}, {
|
161
161
|
vtype: 'text',
|
162
|
-
|
162
|
+
text : value
|
163
163
|
}]
|
164
164
|
});
|
165
165
|
});
|
@@ -36,7 +36,7 @@ class TagListComponent extends Component {
|
|
36
36
|
_vdom:
|
37
37
|
{cn: [
|
38
38
|
{cls: ['sidebar'], cn: [
|
39
|
-
{tag: 'p',
|
39
|
+
{tag: 'p', text: 'Popular Tags'},
|
40
40
|
{cls: ['tag-list']}
|
41
41
|
]}
|
42
42
|
]}
|
@@ -96,7 +96,7 @@ class TagListComponent extends Component {
|
|
96
96
|
tag : 'a',
|
97
97
|
cls : ['tag-pill', 'tag-default'],
|
98
98
|
href: '',
|
99
|
-
|
99
|
+
text: item,
|
100
100
|
id : me.getTagVdomId(item)
|
101
101
|
});
|
102
102
|
});
|
@@ -69,7 +69,7 @@ class ProfileComponent extends Component {
|
|
69
69
|
]},
|
70
70
|
{tag: 'a', cls: ['btn', 'btn-sm', 'btn-outline-secondary', 'action-btn'], flag: 'edit-profile', href: '#/settings', removeDom: true, cn: [
|
71
71
|
{tag: 'i', cls: ['ion-gear-a']},
|
72
|
-
{vtype: 'text',
|
72
|
+
{vtype: 'text', text: ' Edit Profile Settings'}
|
73
73
|
]}
|
74
74
|
]}
|
75
75
|
]}
|
@@ -81,10 +81,10 @@ class ProfileComponent extends Component {
|
|
81
81
|
{cls: ['articles-toggle'], cn: [
|
82
82
|
{tag: 'ul', cls: ['nav', 'nav-pills', 'outline-active'], flag: 'feed-header', cn: [
|
83
83
|
{tag: 'li', cls: ['nav-item'], cn: [
|
84
|
-
{tag: 'a', cls: ['nav-link', 'prevent-click', 'active'], href: '',
|
84
|
+
{tag: 'a', cls: ['nav-link', 'prevent-click', 'active'], href: '', text: 'My Articles'}
|
85
85
|
]},
|
86
86
|
{tag: 'li', cls: ['nav-item'], cn: [
|
87
|
-
{tag: 'a', cls: ['nav-link', 'prevent-click'], href: '',
|
87
|
+
{tag: 'a', cls: ['nav-link', 'prevent-click'], href: '', text: 'Favorited Articles'}
|
88
88
|
]}
|
89
89
|
]}
|
90
90
|
]}
|
@@ -170,7 +170,7 @@ class ProfileComponent extends Component {
|
|
170
170
|
*/
|
171
171
|
afterSetBio(value, oldValue) {
|
172
172
|
if (value) {
|
173
|
-
VDomUtil.getByFlag(this.vdom, 'bio').
|
173
|
+
VDomUtil.getByFlag(this.vdom, 'bio').text = value;
|
174
174
|
this.update();
|
175
175
|
}
|
176
176
|
}
|
@@ -190,7 +190,7 @@ class ProfileComponent extends Component {
|
|
190
190
|
NeoArray.add(node.cls, value ? 'btn-secondary' : 'btn-outline-secondary');
|
191
191
|
|
192
192
|
node.cn[0].cls = [value ? 'ion-minus-round' : 'ion-plus-round'];
|
193
|
-
node.cn[1].
|
193
|
+
node.cn[1].text = value ? ' Unfollow ' : ' Follow ';
|
194
194
|
this.update();
|
195
195
|
}
|
196
196
|
}
|
@@ -231,8 +231,8 @@ class ProfileComponent extends Component {
|
|
231
231
|
afterSetUsername(value, oldValue) {
|
232
232
|
let vdom = this.vdom;
|
233
233
|
|
234
|
-
VDomUtil.getByFlag(vdom, 'following').cn[2].
|
235
|
-
VDomUtil.getByFlag(vdom, 'username').
|
234
|
+
VDomUtil.getByFlag(vdom, 'following').cn[2].text = value;
|
235
|
+
VDomUtil.getByFlag(vdom, 'username').text = value;
|
236
236
|
this.update();
|
237
237
|
}
|
238
238
|
|
@@ -273,7 +273,7 @@ class ProfileComponent extends Component {
|
|
273
273
|
params = {};
|
274
274
|
|
275
275
|
if (!el.vdom.cls.includes('disabled')) {
|
276
|
-
switch (el.vdom.
|
276
|
+
switch (el.vdom.text) {
|
277
277
|
case 'Favorited Articles':
|
278
278
|
params = {
|
279
279
|
favorited: me.username
|
@@ -44,7 +44,7 @@ class SettingsComponent extends Component {
|
|
44
44
|
{cls: ['container', 'page'], cn: [
|
45
45
|
{cls: ['row'], cn: [
|
46
46
|
{cls: ['col-md-6', 'offset-md-3', 'col-xs-12'], cn: [
|
47
|
-
{tag: 'h1', cls: ['text-xs-center'],
|
47
|
+
{tag: 'h1', cls: ['text-xs-center'], text: 'Your Settings'},
|
48
48
|
{tag: 'ul', cls: ['error-messages'], flag: 'errors', removeDom: true},
|
49
49
|
{tag: 'form', cn: [
|
50
50
|
{tag: 'fieldset', cn: [
|
@@ -63,11 +63,11 @@ class SettingsComponent extends Component {
|
|
63
63
|
{tag: 'fieldset', cls: ['form-group'], cn: [
|
64
64
|
{tag: 'input', cls: ['form-control', 'form-control-lg'], flag: 'password', placeholder: 'Password', type: 'password'}
|
65
65
|
]},
|
66
|
-
{tag: 'button', cls: ['btn', 'btn-lg', 'btn-primary', 'pull-xs-right'],
|
66
|
+
{tag: 'button', cls: ['btn', 'btn-lg', 'btn-primary', 'pull-xs-right'], text: 'Update Settings'}
|
67
67
|
]}
|
68
68
|
]},
|
69
69
|
{tag: 'hr'},
|
70
|
-
{tag: 'button', cls: ['btn', 'btn-outline-danger'],
|
70
|
+
{tag: 'button', cls: ['btn', 'btn-outline-danger'], text: 'Or click here to logout.'}
|
71
71
|
]}
|
72
72
|
]}
|
73
73
|
]}
|
@@ -133,7 +133,7 @@ class SettingsComponent extends Component {
|
|
133
133
|
Object.entries(value).forEach(([key, value]) => {
|
134
134
|
list.cn.push({
|
135
135
|
tag : 'li',
|
136
|
-
|
136
|
+
text: key + ' ' + value.join(' and ')
|
137
137
|
});
|
138
138
|
});
|
139
139
|
|
@@ -93,7 +93,7 @@ class SignUpComponent extends Component {
|
|
93
93
|
Object.entries(value || {}).forEach(([key, value]) => {
|
94
94
|
list.cn.push({
|
95
95
|
tag : 'li',
|
96
|
-
|
96
|
+
text: key + ' ' + value.join(' and ')
|
97
97
|
});
|
98
98
|
});
|
99
99
|
|
@@ -141,16 +141,16 @@ class SignUpComponent extends Component {
|
|
141
141
|
contentDiv = me.vdom.cn[0].cn[0].cn[0];
|
142
142
|
|
143
143
|
// vdom bulk update
|
144
|
-
contentDiv.cn[0].
|
144
|
+
contentDiv.cn[0].text = isSignup ? 'Sign up' : 'Sign in';
|
145
145
|
|
146
146
|
contentDiv.cn[1].cn[0].href = isSignup ? '#/login' : '#/register';
|
147
|
-
contentDiv.cn[1].cn[0].
|
147
|
+
contentDiv.cn[1].cn[0].text = isSignup ? 'Have an account?' : 'Need an account?';
|
148
148
|
|
149
149
|
// remove the username fieldset if needed
|
150
150
|
contentDiv.cn[3].cn[0].cn[0].removeDom = !isSignup;
|
151
151
|
|
152
152
|
// submit button text
|
153
|
-
contentDiv.cn[3].cn[0].cn[3].
|
153
|
+
contentDiv.cn[3].cn[0].cn[3].text = isSignup ? 'Sign up' : 'Sign in';
|
154
154
|
|
155
155
|
me.update();
|
156
156
|
}
|
@@ -38,10 +38,10 @@ class HomeContainer extends Container {
|
|
38
38
|
cn : [{
|
39
39
|
tag : 'h1',
|
40
40
|
cls : ['logo-font'],
|
41
|
-
|
41
|
+
text: 'conduit v2'
|
42
42
|
}, {
|
43
43
|
tag : 'p',
|
44
|
-
|
44
|
+
text: 'A place to share your knowledge.'
|
45
45
|
}]
|
46
46
|
}]
|
47
47
|
}
|
@@ -60,7 +60,7 @@ class HomeContainer extends Container {
|
|
60
60
|
cls : ['neo-examples-tab-component'],
|
61
61
|
header: {iconCls: 'fa fa-user-ninja', text: 'Your Feed'},
|
62
62
|
style : {padding: '20px'},
|
63
|
-
vdom : {
|
63
|
+
vdom : {text: 'todo'}
|
64
64
|
}, {
|
65
65
|
module: PreviewList,
|
66
66
|
header: {iconCls: 'fa fa-globe-europe', text: 'Global Feed'}
|
@@ -85,7 +85,7 @@ class PreviewComponent extends Component {
|
|
85
85
|
cn : [
|
86
86
|
{tag: 'h1', flag: 'title'},
|
87
87
|
{tag: 'p', flag: 'description'},
|
88
|
-
{tag: 'span',
|
88
|
+
{tag: 'span', text: 'Read more...'}
|
89
89
|
]
|
90
90
|
}]
|
91
91
|
}
|
@@ -120,7 +120,7 @@ class PreviewComponent extends Component {
|
|
120
120
|
|
121
121
|
// todo: disabled until the new profile view is ready
|
122
122
|
//node.href = href;
|
123
|
-
node.
|
123
|
+
node.text = value;
|
124
124
|
|
125
125
|
//VDomUtil.getByFlag(vdom, 'userImageLink').href = href;
|
126
126
|
|
@@ -134,7 +134,7 @@ class PreviewComponent extends Component {
|
|
134
134
|
* @protected
|
135
135
|
*/
|
136
136
|
afterSetCreatedAt(value, oldValue) {
|
137
|
-
VDomUtil.getByFlag(this.vdom, 'createdAt').
|
137
|
+
VDomUtil.getByFlag(this.vdom, 'createdAt').text = new Intl.DateTimeFormat('en-US', {
|
138
138
|
day : 'numeric',
|
139
139
|
month: 'long',
|
140
140
|
year : 'numeric'
|
@@ -150,7 +150,7 @@ class PreviewComponent extends Component {
|
|
150
150
|
* @protected
|
151
151
|
*/
|
152
152
|
afterSetDescription(value, oldValue) {
|
153
|
-
VDomUtil.getByFlag(this.vdom, 'description').
|
153
|
+
VDomUtil.getByFlag(this.vdom, 'description').text = value;
|
154
154
|
this.update();
|
155
155
|
}
|
156
156
|
|
@@ -182,7 +182,7 @@ class PreviewComponent extends Component {
|
|
182
182
|
* @protected
|
183
183
|
*/
|
184
184
|
afterSetFavoritesCount(value, oldValue) {
|
185
|
-
VDomUtil.getByFlag(this.vdom, 'favoritesCount').
|
185
|
+
VDomUtil.getByFlag(this.vdom, 'favoritesCount').text = ' ' + value;
|
186
186
|
this.update();
|
187
187
|
}
|
188
188
|
|
@@ -225,7 +225,7 @@ class PreviewComponent extends Component {
|
|
225
225
|
tagList.cn.push({
|
226
226
|
tag : 'li',
|
227
227
|
cls : ['tag-default', 'tag-pill', 'tag-outline'],
|
228
|
-
|
228
|
+
text: item
|
229
229
|
})
|
230
230
|
});
|
231
231
|
|
@@ -242,7 +242,7 @@ class PreviewComponent extends Component {
|
|
242
242
|
* @protected
|
243
243
|
*/
|
244
244
|
afterSetTitle(value, oldValue) {
|
245
|
-
VDomUtil.getByFlag(this.vdom, 'title').
|
245
|
+
VDomUtil.getByFlag(this.vdom, 'title').text = value;
|
246
246
|
this.update();
|
247
247
|
}
|
248
248
|
|
@@ -38,7 +38,7 @@ class TagListComponent extends Component {
|
|
38
38
|
cls: ['sidebar'],
|
39
39
|
cn : [{
|
40
40
|
tag : 'p',
|
41
|
-
|
41
|
+
text: 'Popular Tags'
|
42
42
|
}, {
|
43
43
|
cls: ['tag-list']
|
44
44
|
}]
|
@@ -100,7 +100,7 @@ class TagListComponent extends Component {
|
|
100
100
|
tag : 'a',
|
101
101
|
cls : ['tag-pill', 'tag-default'],
|
102
102
|
href: '',
|
103
|
-
|
103
|
+
text: item,
|
104
104
|
id : me.getTagVdomId(item)
|
105
105
|
});
|
106
106
|
});
|