neo.mjs 4.0.21 → 4.0.24
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/apps/covid/view/mapboxGl/Component.mjs +4 -4
- package/apps/sharedcovid/view/mapboxGl/Component.mjs +4 -4
- package/examples/dashboard/MainContainer.mjs +40 -0
- package/examples/dashboard/app.mjs +6 -0
- package/examples/dashboard/index.html +11 -0
- package/examples/dashboard/neo-config.json +6 -0
- package/package.json +4 -4
- package/src/dashboard/Container.mjs +24 -0
- package/src/main/addon/Stylesheet.mjs +3 -2
- package/src/manager/Base.mjs +1 -1
- package/src/worker/App.mjs +2 -2
|
@@ -49,9 +49,9 @@ class Component extends BaseComponent {
|
|
|
49
49
|
beforeId: 'waterway-label',
|
|
50
50
|
filter : ['>', ['get', 'cases'], 0],
|
|
51
51
|
id : 'covid19-circle',
|
|
52
|
+
minzoom : 5,
|
|
52
53
|
source : 'covid19',
|
|
53
54
|
type : 'circle',
|
|
54
|
-
minzoom : 5,
|
|
55
55
|
|
|
56
56
|
paint: {
|
|
57
57
|
'circle-color' : ['step', ['get', 'cases'], '#9ad5ff', 0, '#9af6ff', 20, '#00ffff', 200, '#ffff00', 400, '#f1f075', 800, '#f9b196', 1e3, '#f28cb1', 2e3, '#f28cb1'],
|
|
@@ -63,9 +63,9 @@ class Component extends BaseComponent {
|
|
|
63
63
|
beforeId: 'waterway-label',
|
|
64
64
|
filter : ['>', ['get', 'cases'], 0],
|
|
65
65
|
id : 'covid19-circle-text',
|
|
66
|
+
minzoom : 5,
|
|
66
67
|
source : 'covid19',
|
|
67
68
|
type : 'symbol',
|
|
68
|
-
minzoom : 5,
|
|
69
69
|
|
|
70
70
|
layout: {
|
|
71
71
|
'text-allow-overlap' : true,
|
|
@@ -102,8 +102,8 @@ class Component extends BaseComponent {
|
|
|
102
102
|
id : 'covid19',
|
|
103
103
|
type: 'geojson',
|
|
104
104
|
data: {
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
features: [],
|
|
106
|
+
type : 'FeatureCollection'
|
|
107
107
|
}
|
|
108
108
|
}, {
|
|
109
109
|
id : 'dem',
|
|
@@ -49,9 +49,9 @@ class Component extends BaseComponent {
|
|
|
49
49
|
beforeId: 'waterway-label',
|
|
50
50
|
filter : ['>', ['get', 'cases'], 0],
|
|
51
51
|
id : 'covid19-circle',
|
|
52
|
+
minzoom : 5,
|
|
52
53
|
source : 'covid19',
|
|
53
54
|
type : 'circle',
|
|
54
|
-
minzoom : 5,
|
|
55
55
|
|
|
56
56
|
paint: {
|
|
57
57
|
'circle-color' : ['step', ['get', 'cases'], '#9ad5ff', 0, '#9af6ff', 20, '#00ffff', 200, '#ffff00', 400, '#f1f075', 800, '#f9b196', 1e3, '#f28cb1', 2e3, '#f28cb1'],
|
|
@@ -63,9 +63,9 @@ class Component extends BaseComponent {
|
|
|
63
63
|
beforeId: 'waterway-label',
|
|
64
64
|
filter : ['>', ['get', 'cases'], 0],
|
|
65
65
|
id : 'covid19-circle-text',
|
|
66
|
+
minzoom : 5,
|
|
66
67
|
source : 'covid19',
|
|
67
68
|
type : 'symbol',
|
|
68
|
-
minzoom : 5,
|
|
69
69
|
|
|
70
70
|
layout: {
|
|
71
71
|
'text-allow-overlap' : true,
|
|
@@ -102,8 +102,8 @@ class Component extends BaseComponent {
|
|
|
102
102
|
id : 'covid19',
|
|
103
103
|
type: 'geojson',
|
|
104
104
|
data: {
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
features: [],
|
|
106
|
+
type : 'FeatureCollection'
|
|
107
107
|
}
|
|
108
108
|
}, {
|
|
109
109
|
id : 'dem',
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import Container from '../../src/container/Base.mjs';
|
|
2
|
+
import Dashboard from '../../src/dashboard/Container.mjs';
|
|
3
|
+
import Viewport from '../../src/container/Viewport.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @class Neo.examples.dashboard.MainContainer
|
|
7
|
+
* @extends Neo.container.Viewport
|
|
8
|
+
*/
|
|
9
|
+
class MainContainer extends Viewport {
|
|
10
|
+
static getConfig() {return {
|
|
11
|
+
className: 'Neo.examples.dashboard.MainContainer',
|
|
12
|
+
autoMount: true,
|
|
13
|
+
layout : {ntype: 'fit'},
|
|
14
|
+
style : {padding: '10px'},
|
|
15
|
+
|
|
16
|
+
items: [{
|
|
17
|
+
module: Dashboard,
|
|
18
|
+
|
|
19
|
+
itemDefaults: {
|
|
20
|
+
module: Container
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
items : [{
|
|
24
|
+
style: {backgroundColor: 'blue'}
|
|
25
|
+
}, {
|
|
26
|
+
style: {backgroundColor: 'darkgreen'}
|
|
27
|
+
}, {
|
|
28
|
+
style: {backgroundColor: 'red'}
|
|
29
|
+
}, {
|
|
30
|
+
style: {backgroundColor: 'darkblue'}
|
|
31
|
+
}, {
|
|
32
|
+
style: {backgroundColor: 'orange'}
|
|
33
|
+
}]
|
|
34
|
+
}]
|
|
35
|
+
}}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
Neo.applyClassConfig(MainContainer);
|
|
39
|
+
|
|
40
|
+
export default MainContainer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!DOCTYPE HTML>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<title>Neo Dashboard</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<script src="../../src/MicroLoader.mjs" type="module"></script>
|
|
10
|
+
</body>
|
|
11
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo.mjs",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.24",
|
|
4
4
|
"description": "The webworkers driven UI framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"chalk": "^5.0.1",
|
|
42
42
|
"clean-webpack-plugin": "^4.0.0",
|
|
43
43
|
"commander": "^9.2.0",
|
|
44
|
-
"cssnano": "^5.1.
|
|
44
|
+
"cssnano": "^5.1.8",
|
|
45
45
|
"envinfo": "^7.8.1",
|
|
46
46
|
"fs-extra": "^10.1.0",
|
|
47
47
|
"highlightjs-line-numbers.js": "^2.8.0",
|
|
48
48
|
"inquirer": "^8.2.4",
|
|
49
49
|
"neo-jsdoc": "^1.0.1",
|
|
50
50
|
"neo-jsdoc-x": "^1.0.4",
|
|
51
|
-
"postcss": "^8.4.
|
|
52
|
-
"sass": "^1.
|
|
51
|
+
"postcss": "^8.4.14",
|
|
52
|
+
"sass": "^1.52.0",
|
|
53
53
|
"webpack": "^5.72.1",
|
|
54
54
|
"webpack-cli": "^4.9.2",
|
|
55
55
|
"webpack-dev-server": "4.9.0",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import BaseContainer from '../container/Base.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @class Neo.dashboard.Container
|
|
5
|
+
* @extends Neo.container.Base
|
|
6
|
+
*/
|
|
7
|
+
class Container extends BaseContainer {
|
|
8
|
+
static getConfig() {return {
|
|
9
|
+
/**
|
|
10
|
+
* @member {String} className='Neo.dashboard.Container'
|
|
11
|
+
* @protected
|
|
12
|
+
*/
|
|
13
|
+
className: 'Neo.dashboard.Container',
|
|
14
|
+
/**
|
|
15
|
+
* @member {String} ntype='dashboard'
|
|
16
|
+
* @protected
|
|
17
|
+
*/
|
|
18
|
+
ntype: 'dashboard'
|
|
19
|
+
}}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
Neo.applyClassConfig(Container);
|
|
23
|
+
|
|
24
|
+
export default Container;
|
|
@@ -90,7 +90,8 @@ class Stylesheet extends Base {
|
|
|
90
90
|
let className = data.className,
|
|
91
91
|
config = Neo.config,
|
|
92
92
|
env = config.environment,
|
|
93
|
-
path = env.startsWith('dist/') ?
|
|
93
|
+
path = env.startsWith('dist/') ? '' : `../../dist/${env}/`,
|
|
94
|
+
rootPath = config.basePath.substr(6);
|
|
94
95
|
|
|
95
96
|
if (className.startsWith('Neo.')) {
|
|
96
97
|
className = className.substring(4);
|
|
@@ -108,7 +109,7 @@ class Stylesheet extends Base {
|
|
|
108
109
|
this.createStyleSheet(
|
|
109
110
|
null,
|
|
110
111
|
null,
|
|
111
|
-
`${
|
|
112
|
+
`${rootPath}${path}css${config.useCssVars ? '' : '-no-vars'}/${folder}/${className}.css`
|
|
112
113
|
);
|
|
113
114
|
}
|
|
114
115
|
});
|
package/src/manager/Base.mjs
CHANGED
|
@@ -28,7 +28,7 @@ class Base extends CollectionBase{
|
|
|
28
28
|
register(item) {
|
|
29
29
|
let me = this;
|
|
30
30
|
|
|
31
|
-
if (me.get(item.id)) {
|
|
31
|
+
if (me.get(item.id)) {
|
|
32
32
|
Neo.logError('Trying to create an item with an already existing id', item, me.get(item.id));
|
|
33
33
|
} else {
|
|
34
34
|
me.push(item);
|
package/src/worker/App.mjs
CHANGED
|
@@ -101,8 +101,8 @@ class App extends Base {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
return import(
|
|
104
|
-
/* webpackInclude:
|
|
105
|
-
/* webpackExclude:
|
|
104
|
+
/* webpackInclude: /[\\\/]app.mjs$/ */
|
|
105
|
+
/* webpackExclude: /[\\\/]node_modules/ */
|
|
106
106
|
/* webpackMode: "lazy" */
|
|
107
107
|
`../../${path}.mjs`
|
|
108
108
|
);
|