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.
- package/README.md +1 -1
- package/apps/covid/view/MainContainerController.mjs +9 -11
- package/apps/krausest/view/MainComponent.mjs +3 -4
- package/apps/krausest/view/TableComponent.mjs +2 -3
- package/apps/realworld/view/HeaderComponent.mjs +7 -10
- package/apps/realworld/view/HomeComponent.mjs +16 -24
- package/apps/realworld/view/MainContainerController.mjs +3 -3
- package/apps/realworld/view/article/CommentComponent.mjs +11 -19
- package/apps/realworld/view/article/Component.mjs +20 -36
- package/apps/realworld/view/article/CreateCommentComponent.mjs +9 -16
- package/apps/realworld/view/article/CreateComponent.mjs +12 -20
- package/apps/realworld/view/article/PreviewComponent.mjs +16 -30
- package/apps/realworld/view/article/TagListComponent.mjs +4 -5
- package/apps/realworld/view/user/ProfileComponent.mjs +14 -21
- package/apps/realworld/view/user/SettingsComponent.mjs +9 -16
- package/apps/realworld/view/user/SignUpComponent.mjs +6 -9
- package/apps/realworld2/view/MainContainerController.mjs +2 -2
- package/apps/realworld2/view/article/PreviewComponent.mjs +17 -31
- package/apps/realworld2/view/article/PreviewList.mjs +4 -7
- package/apps/realworld2/view/article/TagListComponent.mjs +4 -5
- package/apps/sharedcovid/view/MainContainerController.mjs +10 -13
- package/apps/website/data/blog.json +1 -1
- package/apps/website/view/blog/List.mjs +2 -3
- package/buildScripts/injectPackageVersion.mjs +43 -0
- package/docs/app/view/ApiTreeList.mjs +2 -6
- package/docs/app/view/ExamplesTreeList.mjs +2 -6
- package/docs/app/view/TutorialsTreeList.mjs +2 -6
- package/docs/app/view/classdetails/HeaderComponent.mjs +3 -4
- package/docs/app/view/classdetails/HierarchyTreeList.mjs +1 -2
- package/docs/app/view/classdetails/MembersList.mjs +4 -6
- package/docs/app/view/classdetails/SourceViewComponent.mjs +3 -6
- package/docs/app/view/classdetails/TutorialComponent.mjs +4 -5
- package/examples/component/coronaGallery/CountryGallery.mjs +36 -59
- package/examples/form/field/date/MainContainer.mjs +1 -1
- package/examples/tabs/MainContainer.mjs +4 -6
- package/examples/todoList/version1/MainComponent.mjs +5 -7
- package/examples/todoList/version2/TodoList.mjs +4 -5
- package/package.json +8 -7
- package/resources/scss/src/draggable/tree/DragZone.scss +3 -1
- package/src/DefaultConfig.mjs +9 -1
- package/src/button/Base.mjs +18 -27
- package/src/button/Split.mjs +3 -4
- package/src/calendar/view/MainContainer.mjs +3 -5
- package/src/calendar/view/SettingsContainer.mjs +3 -5
- package/src/calendar/view/YearComponent.mjs +7 -9
- package/src/calendar/view/month/Component.mjs +7 -12
- package/src/calendar/view/week/Component.mjs +2 -3
- package/src/calendar/view/week/TimeAxisComponent.mjs +0 -3
- package/src/component/Base.mjs +37 -55
- package/src/component/Carousel.mjs +5 -9
- package/src/component/Chip.mjs +6 -12
- package/src/component/Circle.mjs +16 -22
- package/src/component/Clock.mjs +1 -1
- package/src/component/DateSelector.mjs +4 -9
- package/src/component/Gallery.mjs +12 -21
- package/src/component/Helix.mjs +2 -3
- package/src/component/Label.mjs +2 -3
- package/src/component/Legend.mjs +6 -9
- package/src/container/Base.mjs +5 -9
- package/src/container/Panel.mjs +4 -0
- package/src/dialog/Base.mjs +40 -42
- package/src/dialog/header/Toolbar.mjs +105 -0
- package/src/draggable/list/DragZone.mjs +1 -2
- package/src/draggable/tree/DragZone.mjs +1 -2
- package/src/form/Fieldset.mjs +4 -6
- package/src/form/field/CheckBox.mjs +23 -39
- package/src/form/field/Color.mjs +2 -3
- package/src/form/field/Display.mjs +1 -2
- package/src/form/field/Number.mjs +1 -2
- package/src/form/field/Picker.mjs +0 -1
- package/src/form/field/Text.mjs +40 -57
- package/src/form/field/TextArea.mjs +2 -3
- package/src/form/field/trigger/Base.mjs +2 -3
- package/src/form/field/trigger/SpinUpDown.mjs +3 -4
- package/src/form/field/trigger/Time.mjs +3 -4
- package/src/grid/View.mjs +2 -2
- package/src/grid/header/Toolbar.mjs +1 -2
- package/src/layout/Card.mjs +2 -2
- package/src/list/Base.mjs +6 -11
- package/src/list/plugin/Animate.mjs +5 -12
- package/src/plugin/Resizable.mjs +3 -6
- package/src/selection/Model.mjs +3 -7
- package/src/selection/grid/CellColumnModel.mjs +2 -5
- package/src/selection/grid/CellColumnRowModel.mjs +2 -5
- package/src/selection/grid/CellRowModel.mjs +4 -13
- package/src/selection/table/CellColumnModel.mjs +2 -5
- package/src/selection/table/CellColumnRowModel.mjs +2 -5
- package/src/selection/table/CellRowModel.mjs +4 -13
- package/src/sitemap/Component.mjs +1 -1
- package/src/tab/Strip.mjs +8 -11
- package/src/tab/header/Toolbar.mjs +2 -3
- package/src/table/View.mjs +3 -3
- package/src/table/header/Button.mjs +4 -6
- package/src/table/header/Toolbar.mjs +3 -5
- package/src/tree/List.mjs +6 -9
@@ -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.
|
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.
|
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.
|
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.
|
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
|
607
|
-
text
|
603
|
+
iconCls,
|
604
|
+
text: buttonText
|
608
605
|
});
|
609
606
|
} else {
|
610
607
|
[component.appName, ...me.connectedApps].forEach(appName => {
|
@@ -374,7 +374,7 @@
|
|
374
374
|
"publisher" : "ITNEXT",
|
375
375
|
"selectedInto": [],
|
376
376
|
"type" : "Blog Post",
|
377
|
-
"url" : "https://
|
377
|
+
"url" : "https://itnext.io/enhance-your-frontend-state-management-with-view-models-7bf49e1a0991?source=friends_link&sk=ac04c44c7cd7af4c34068a87b1207c7e"
|
378
378
|
},
|
379
379
|
{
|
380
380
|
"author" : "Tobias Uhlig",
|
@@ -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.
|
155
|
+
me.update();
|
157
156
|
}
|
158
157
|
|
159
158
|
/**
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
import chalk from 'chalk';
|
4
|
+
import envinfo from 'envinfo';
|
5
|
+
import fs from 'fs-extra';
|
6
|
+
import os from 'os';
|
7
|
+
import path from 'path';
|
8
|
+
|
9
|
+
const
|
10
|
+
__dirname = path.resolve(),
|
11
|
+
cwd = process.cwd(),
|
12
|
+
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
13
|
+
packageJson = requireJson(path.join(__dirname, 'package.json')),
|
14
|
+
insideNeo = packageJson.name === 'neo.mjs',
|
15
|
+
neoPath = insideNeo ? './' : './node_modules/neo.mjs/',
|
16
|
+
programName = `${packageJson.name} inject-package-version`;
|
17
|
+
|
18
|
+
let startDate = new Date(),
|
19
|
+
configPath = path.join(__dirname, 'src/DefaultConfig.mjs'),
|
20
|
+
contentArray = fs.readFileSync(configPath).toString().split(os.EOL),
|
21
|
+
i = 0,
|
22
|
+
len = contentArray.length,
|
23
|
+
versionString = `'${packageJson.version}'`;
|
24
|
+
|
25
|
+
if (!insideNeo) {
|
26
|
+
// todo
|
27
|
+
}
|
28
|
+
|
29
|
+
for (; i < len; i++) {
|
30
|
+
if (contentArray[i].includes('version:')) {
|
31
|
+
// we want to update the comment inside the DefaultConfig.mjs as well
|
32
|
+
contentArray[i - 5] = contentArray[i - 5].replace(/'\d.+'/, versionString);
|
33
|
+
contentArray[i] = contentArray[i] .replace(/'\d.+'/, versionString);
|
34
|
+
break;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
fs.writeFileSync(configPath, contentArray.join(os.EOL));
|
39
|
+
|
40
|
+
const processTime = (Math.round((new Date - startDate) * 100) / 100000).toFixed(2);
|
41
|
+
console.log(`\nTotal time for ${programName}: ${processTime}s`);
|
42
|
+
|
43
|
+
process.exit(0);
|
@@ -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
|
-
|
43
|
-
|
44
|
-
me.vdom = vdom;
|
39
|
+
me.createItems(null, me.getListItemsRoot(), 0);
|
40
|
+
me.update();
|
45
41
|
});
|
46
42
|
}
|
47
43
|
}
|
@@ -44,13 +44,9 @@ class ExamplesTreeList extends TreeList {
|
|
44
44
|
Neo.Xhr.promiseJson({
|
45
45
|
url: '../../docs/examples.json'
|
46
46
|
}).then(data => {
|
47
|
-
let vdom = me.vdom,
|
48
|
-
itemRoot = me.getListItemsRoot();
|
49
|
-
|
50
47
|
me.store.data = data.json;
|
51
|
-
|
52
|
-
|
53
|
-
me.vdom = vdom;
|
48
|
+
me.createItems(null, me.getListItemsRoot(), 0);
|
49
|
+
me.update();
|
54
50
|
});
|
55
51
|
}
|
56
52
|
}
|
@@ -44,13 +44,9 @@ class TutorialsTreeList extends TreeList {
|
|
44
44
|
Neo.Xhr.promiseJson({
|
45
45
|
url: '../../docs/tutorials/tutorials.json'
|
46
46
|
}).then(data => {
|
47
|
-
let vdom = me.vdom,
|
48
|
-
itemRoot = me.getListItemsRoot();
|
49
|
-
|
50
47
|
me.store.data = data.json;
|
51
|
-
|
52
|
-
|
53
|
-
me.vdom = vdom;
|
48
|
+
me.createItems(null, me.getListItemsRoot(), 0);
|
49
|
+
me.update();
|
54
50
|
});
|
55
51
|
}
|
56
52
|
}
|
@@ -50,7 +50,6 @@ class HeaderComponent extends Component {
|
|
50
50
|
super.onConstructed();
|
51
51
|
|
52
52
|
let me = this,
|
53
|
-
vdom = me.vdom,
|
54
53
|
className = me.record.className,
|
55
54
|
store = me.up('main-container').store,
|
56
55
|
record = store.find({$kind: className === 'Neo' ? 'module' : 'class', neoClassName: className})[0],
|
@@ -65,16 +64,16 @@ class HeaderComponent extends Component {
|
|
65
64
|
}
|
66
65
|
}
|
67
66
|
|
68
|
-
vdom.cn[0].innerHTML = singleton ? (className + ' → Singleton') : className;
|
67
|
+
me.vdom.cn[0].innerHTML = singleton ? (className + ' → Singleton') : className;
|
69
68
|
|
70
69
|
if (record.description) {
|
71
|
-
vdom.cn.push({
|
70
|
+
me.vdom.cn.push({
|
72
71
|
cls : ['neo-docs-header-description'],
|
73
72
|
innerHTML: record.description
|
74
73
|
});
|
75
74
|
}
|
76
75
|
|
77
|
-
me.
|
76
|
+
me.update();
|
78
77
|
}
|
79
78
|
}
|
80
79
|
|
@@ -100,14 +100,13 @@ class HierarchyTreeList extends TreeList {
|
|
100
100
|
onLeafItemClick(record) {
|
101
101
|
let me = this,
|
102
102
|
vnodeId = me.getItemId(record.id),
|
103
|
-
vdom = me.vdom,
|
104
103
|
vdomNode = me.getVdomChild(vnodeId);
|
105
104
|
|
106
105
|
NeoArray[record.checked ? 'add' : 'remove'](vdomNode.cls, 'unchecked');
|
107
106
|
|
108
107
|
record.checked = !record.checked;
|
109
108
|
|
110
|
-
me.
|
109
|
+
me.update();
|
111
110
|
|
112
111
|
me.fire('refreshClassMembers');
|
113
112
|
}
|
@@ -327,13 +327,11 @@ class MembersList extends Base {
|
|
327
327
|
vdom.cn.push(itemConfig);
|
328
328
|
});
|
329
329
|
|
330
|
-
me.
|
330
|
+
me.update();
|
331
331
|
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
}, 100);
|
336
|
-
}
|
332
|
+
hasExamples && setTimeout(() => {
|
333
|
+
Neo.main.addon.HighlightJS.syntaxHighlightInit();
|
334
|
+
}, 100);
|
337
335
|
}
|
338
336
|
|
339
337
|
/**
|
@@ -130,15 +130,12 @@ class SourceViewComponent extends Component {
|
|
130
130
|
*/
|
131
131
|
applySourceCode(data) {
|
132
132
|
let me = this,
|
133
|
-
|
134
|
-
node = vdom.cn[0]; // pre tag
|
133
|
+
node = me.vdom.cn[0]; // pre tag
|
135
134
|
|
136
135
|
node.cn[0].innerHTML = data; // code tag
|
137
|
-
me.
|
136
|
+
me.update();
|
138
137
|
|
139
|
-
|
140
|
-
me.syntaxHighlight();
|
141
|
-
}
|
138
|
+
me.mounted && me.syntaxHighlight();
|
142
139
|
}
|
143
140
|
|
144
141
|
/**
|
@@ -61,16 +61,15 @@ class TutorialComponent extends Component {
|
|
61
61
|
* @param {Object} data
|
62
62
|
*/
|
63
63
|
applySourceCode(data) {
|
64
|
-
let me
|
65
|
-
vdom = me.vdom;
|
64
|
+
let me = this;
|
66
65
|
|
67
66
|
if (me.fileType === 'json') {
|
68
|
-
vdom.cn = data;
|
67
|
+
me.vdom.cn = data;
|
69
68
|
} else {
|
70
|
-
vdom.innerHTML = data;
|
69
|
+
me.vdom.innerHTML = data;
|
71
70
|
}
|
72
71
|
|
73
|
-
me.
|
72
|
+
me.update();
|
74
73
|
|
75
74
|
setTimeout(() => {
|
76
75
|
TutorialComponent.syntaxHighlight();
|
@@ -31,43 +31,6 @@ class CountryGallery extends Gallery {
|
|
31
31
|
* @member {Number} itemHeight=240
|
32
32
|
*/
|
33
33
|
itemHeight: 280,
|
34
|
-
/**
|
35
|
-
* @member {Object} itemTpl_
|
36
|
-
*/
|
37
|
-
itemTpl:
|
38
|
-
{cls: ['neo-gallery-item', 'image-wrap', 'view', 'neo-transition-1000'], tabIndex: '-1', cn: [
|
39
|
-
{cls: ['neo-item-wrapper'], style: {}, cn: [
|
40
|
-
{tag: 'div', cls: ['neo-country-gallery-item'], style: {}, cn: [
|
41
|
-
{cls: ['neo-item-header'], cn: [
|
42
|
-
{tag: 'img', cls: ['neo-flag']},
|
43
|
-
{}
|
44
|
-
]},
|
45
|
-
{tag: 'table', cls: ['neo-content-table'], cn: [
|
46
|
-
{tag: 'tr', cn: [
|
47
|
-
{tag: 'td', html: 'Cases'},
|
48
|
-
{tag: 'td', cls: ['neo-align-right']},
|
49
|
-
{tag: 'td', style: {width: '100%'}},
|
50
|
-
{tag: 'td', html: 'Cases today'},
|
51
|
-
{tag: 'td', cls: ['neo-align-right']}
|
52
|
-
]},
|
53
|
-
{tag: 'tr', cn: [
|
54
|
-
{tag: 'td', html: 'Deaths'},
|
55
|
-
{tag: 'td', cls: ['neo-align-right', 'neo-content-deaths']},
|
56
|
-
{tag: 'td', style: {width: '100%'}},
|
57
|
-
{tag: 'td', html: 'Deaths today'},
|
58
|
-
{tag: 'td', cls: ['neo-align-right', 'neo-content-deaths']}
|
59
|
-
]},
|
60
|
-
{tag: 'tr', cn: [
|
61
|
-
{tag: 'td', html: 'Recovered'},
|
62
|
-
{tag: 'td', cls: ['neo-align-right', 'neo-content-recovered']},
|
63
|
-
{tag: 'td', style: {width: '100%'}},
|
64
|
-
{tag: 'td', html: 'Critical'},
|
65
|
-
{tag: 'td', cls: ['neo-align-right', 'neo-content-critical']}
|
66
|
-
]}
|
67
|
-
]}
|
68
|
-
]}
|
69
|
-
]}
|
70
|
-
]},
|
71
34
|
/**
|
72
35
|
* The item width of the gallery
|
73
36
|
* @member {Number} itemWidth=320
|
@@ -97,29 +60,43 @@ class CountryGallery extends Gallery {
|
|
97
60
|
* @returns {Object} vdomItem
|
98
61
|
*/
|
99
62
|
createItem(vdomItem, record, index) {
|
100
|
-
let me
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
vdomItem.id = me.getItemVnodeId(record[me.keyProperty]);
|
105
|
-
|
106
|
-
vdomItem.cn[0].style.height = me.itemHeight + 'px';
|
63
|
+
let me = this,
|
64
|
+
cls = ['neo-gallery-item', 'image-wrap', 'view', 'neo-transition-1000'],
|
65
|
+
style = {height: (me.itemHeight - 70) + 'px', width: me.itemWidth + 'px'};
|
107
66
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
67
|
+
return {cls, id: me.getItemVnodeId(record[me.keyProperty]), tabIndex: '-1', cn: [
|
68
|
+
{cls: ['neo-item-wrapper'], style: {height: me.itemHeight + 'px'}, cn: [
|
69
|
+
{tag: 'div', cls: ['neo-country-gallery-item'], style, cn: [
|
70
|
+
{cls: ['neo-item-header'], cn: [
|
71
|
+
{tag: 'img', cls: ['neo-flag'], src: me.getCountryFlagUrl(record.country)},
|
72
|
+
{html: record.country}
|
73
|
+
]},
|
74
|
+
{tag: 'table', cls: ['neo-content-table'], cn: [
|
75
|
+
{tag: 'tr', cn: [
|
76
|
+
{tag: 'td', html: 'Cases'},
|
77
|
+
{tag: 'td', cls: ['neo-align-right'], html: record.cases},
|
78
|
+
{tag: 'td', style: {width: '100%'}},
|
79
|
+
{tag: 'td', html: 'Cases today'},
|
80
|
+
{tag: 'td', cls: ['neo-align-right'], html: record.todayCases}
|
81
|
+
]},
|
82
|
+
{tag: 'tr', cn: [
|
83
|
+
{tag: 'td', html: 'Deaths'},
|
84
|
+
{tag: 'td', cls: ['neo-align-right', 'neo-content-deaths'], html: record.deaths},
|
85
|
+
{tag: 'td', style: {width: '100%'}},
|
86
|
+
{tag: 'td', html: 'Deaths today'},
|
87
|
+
{tag: 'td', cls: ['neo-align-right', 'neo-content-deaths'], html: record.todayDeaths}
|
88
|
+
]},
|
89
|
+
{tag: 'tr', cn: [
|
90
|
+
{tag: 'td', html: 'Recovered'},
|
91
|
+
{tag: 'td', cls: ['neo-align-right', 'neo-content-recovered'], html: record.recovered},
|
92
|
+
{tag: 'td', style: {width: '100%'}},
|
93
|
+
{tag: 'td', html: 'Critical'},
|
94
|
+
{tag: 'td', cls: ['neo-align-right', 'neo-content-critical'], html: record.critical}
|
95
|
+
]}
|
96
|
+
]}
|
97
|
+
]}
|
98
|
+
]}
|
99
|
+
]};
|
123
100
|
}
|
124
101
|
|
125
102
|
/**
|
@@ -78,8 +78,7 @@ class MainContainer extends TabContainer {
|
|
78
78
|
handler: function () {
|
79
79
|
let field = Neo.getComponent('firstNameField'),
|
80
80
|
label = field.getLabelEl(),
|
81
|
-
style = label.style
|
82
|
-
vdom = field.vdom;
|
81
|
+
style = label.style;
|
83
82
|
|
84
83
|
if (!style) {
|
85
84
|
style = {};
|
@@ -92,15 +91,14 @@ class MainContainer extends TabContainer {
|
|
92
91
|
}
|
93
92
|
|
94
93
|
label.style = style;
|
95
|
-
field.
|
94
|
+
field.update();
|
96
95
|
}
|
97
96
|
}, {
|
98
97
|
text : 'Move Fields',
|
99
98
|
handler: function () {
|
100
99
|
let field = Neo.getComponent('firstNameField'),
|
101
100
|
parent = Neo.getComponent(field.parentId),
|
102
|
-
|
103
|
-
cn = vdom.cn,
|
101
|
+
cn = parent.vdom.cn,
|
104
102
|
tmp = cn[1];
|
105
103
|
|
106
104
|
cn[1] = cn[3];
|
@@ -109,7 +107,7 @@ class MainContainer extends TabContainer {
|
|
109
107
|
cn[1].cn[0].style.color = 'steelblue';
|
110
108
|
cn[3].cn[0].style.color = 'green';
|
111
109
|
|
112
|
-
parent.
|
110
|
+
parent.update();
|
113
111
|
}
|
114
112
|
}, {
|
115
113
|
iconCls: 'fa fa-plus',
|
@@ -55,8 +55,7 @@ class MainComponent extends Component {
|
|
55
55
|
}
|
56
56
|
|
57
57
|
createItems(data) {
|
58
|
-
let me
|
59
|
-
vdom = me.vdom,
|
58
|
+
let me = this,
|
60
59
|
cls;
|
61
60
|
|
62
61
|
data.forEach(item => {
|
@@ -68,11 +67,11 @@ class MainComponent extends Component {
|
|
68
67
|
cls.push('far', 'fa-square');
|
69
68
|
}
|
70
69
|
|
71
|
-
vdom.cn[0].cn.push({
|
70
|
+
me.vdom.cn[0].cn.push({
|
72
71
|
tag: 'li',
|
73
72
|
cn : [{
|
74
73
|
tag : 'span',
|
75
|
-
cls
|
74
|
+
cls,
|
76
75
|
style: {cursor: 'pointer', width: '20px'}
|
77
76
|
}, {
|
78
77
|
vtype: 'text',
|
@@ -81,7 +80,7 @@ class MainComponent extends Component {
|
|
81
80
|
});
|
82
81
|
});
|
83
82
|
|
84
|
-
me.
|
83
|
+
me.update();
|
85
84
|
}
|
86
85
|
|
87
86
|
onAddButtonClick() {
|
@@ -100,7 +99,6 @@ class MainComponent extends Component {
|
|
100
99
|
let me = this,
|
101
100
|
cls = ['far', 'fa-square'],
|
102
101
|
oldCls = ['fa', 'fa-check'],
|
103
|
-
vdom = me.vdom,
|
104
102
|
node = VdomUtil.findVdomChild(me.vdom, data.path[0].id).vdom;
|
105
103
|
|
106
104
|
if (data.path[0].cls.includes('fa-square')) {
|
@@ -111,7 +109,7 @@ class MainComponent extends Component {
|
|
111
109
|
NeoArray.remove(node.cls, oldCls);
|
112
110
|
NeoArray.add(node.cls, cls);
|
113
111
|
|
114
|
-
me.
|
112
|
+
me.update();
|
115
113
|
}
|
116
114
|
|
117
115
|
onInputFieldChange(data) {
|
@@ -18,8 +18,7 @@ class TodoList extends List {
|
|
18
18
|
}
|
19
19
|
|
20
20
|
/*createItems(data) {
|
21
|
-
let me
|
22
|
-
vdom = me.vdom,
|
21
|
+
let me = this,
|
23
22
|
cls;
|
24
23
|
|
25
24
|
data.forEach(item => {
|
@@ -31,11 +30,11 @@ class TodoList extends List {
|
|
31
30
|
cls.push('far', 'fa-square');
|
32
31
|
}
|
33
32
|
|
34
|
-
vdom.cn.push({
|
33
|
+
me.vdom.cn.push({
|
35
34
|
tag: 'li',
|
36
35
|
cn : [{
|
37
36
|
tag : 'span',
|
38
|
-
cls
|
37
|
+
cls,
|
39
38
|
style: {cursor: 'pointer', width: '20px'}
|
40
39
|
}, {
|
41
40
|
vtype: 'text',
|
@@ -44,7 +43,7 @@ class TodoList extends List {
|
|
44
43
|
});
|
45
44
|
});
|
46
45
|
|
47
|
-
me.
|
46
|
+
me.update();
|
48
47
|
}*/
|
49
48
|
}
|
50
49
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "4.3.
|
3
|
+
"version": "4.3.11",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -20,6 +20,7 @@
|
|
20
20
|
"create-app": "node ./buildScripts/createApp.mjs",
|
21
21
|
"create-class": "node ./buildScripts/createClass.mjs",
|
22
22
|
"generate-docs-json": "node ./buildScripts/docs/jsdocx.mjs",
|
23
|
+
"inject-package-version": "node ./buildScripts/injectPackageVersion.mjs",
|
23
24
|
"server-start": "webpack serve -c ./buildScripts/webpack/webpack.server.config.mjs --open",
|
24
25
|
"test": "echo \"Error: no test specified\" && exit 1",
|
25
26
|
"watch-themes": "node ./buildScripts/watchThemes.mjs"
|
@@ -43,19 +44,19 @@
|
|
43
44
|
"@fortawesome/fontawesome-free": "^6.2.0",
|
44
45
|
"@material/mwc-button": "^0.27.0",
|
45
46
|
"@material/mwc-textfield": "^0.27.0",
|
46
|
-
"autoprefixer": "^10.4.
|
47
|
-
"chalk": "^5.
|
47
|
+
"autoprefixer": "^10.4.13",
|
48
|
+
"chalk": "^5.1.2",
|
48
49
|
"clean-webpack-plugin": "^4.0.0",
|
49
50
|
"commander": "^9.4.1",
|
50
|
-
"cssnano": "^5.1.
|
51
|
+
"cssnano": "^5.1.14",
|
51
52
|
"envinfo": "^7.8.1",
|
52
53
|
"fs-extra": "^10.1.0",
|
53
54
|
"highlightjs-line-numbers.js": "^2.8.0",
|
54
|
-
"inquirer": "^9.1.
|
55
|
+
"inquirer": "^9.1.4",
|
55
56
|
"neo-jsdoc": "^1.0.1",
|
56
57
|
"neo-jsdoc-x": "^1.0.4",
|
57
|
-
"postcss": "^8.4.
|
58
|
-
"sass": "^1.
|
58
|
+
"postcss": "^8.4.18",
|
59
|
+
"sass": "^1.56.0",
|
59
60
|
"webpack": "^5.74.0",
|
60
61
|
"webpack-cli": "^4.10.0",
|
61
62
|
"webpack-dev-server": "4.11.1",
|
package/src/DefaultConfig.mjs
CHANGED
@@ -226,7 +226,15 @@ const DefaultConfig = {
|
|
226
226
|
* @name config.useVdomWorker
|
227
227
|
* @type Boolean
|
228
228
|
*/
|
229
|
-
useVdomWorker: true
|
229
|
+
useVdomWorker: true,
|
230
|
+
/**
|
231
|
+
* buildScripts/injectPackageVersion.mjs will update this value
|
232
|
+
* @default '4.3.10'
|
233
|
+
* @memberOf! module:Neo
|
234
|
+
* @name config.version
|
235
|
+
* @type String
|
236
|
+
*/
|
237
|
+
version: '4.3.10'
|
230
238
|
};
|
231
239
|
|
232
240
|
Object.assign(DefaultConfig, {
|