neo.mjs 6.15.10 → 6.16.0
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/ServiceWorker.mjs +2 -2
- package/apps/colors/app.mjs +6 -0
- package/apps/colors/childapps/widget/app.mjs +7 -0
- package/apps/colors/childapps/widget/index.html +11 -0
- package/apps/colors/childapps/widget/neo-config.json +10 -0
- package/apps/colors/childapps/widget/view/Viewport.mjs +19 -0
- package/apps/colors/index.html +11 -0
- package/apps/colors/model/Color.mjs +59 -0
- package/apps/colors/neo-config.json +9 -0
- package/apps/colors/store/Colors.mjs +24 -0
- package/apps/colors/view/BarChartComponent.mjs +67 -0
- package/apps/colors/view/PieChartComponent.mjs +53 -0
- package/apps/colors/view/TableContainer.mjs +73 -0
- package/apps/colors/view/Viewport.mjs +83 -0
- package/apps/colors/view/ViewportController.mjs +268 -0
- package/apps/colors/view/ViewportModel.mjs +32 -0
- package/apps/covid/view/MainContainerController.mjs +1 -1
- package/apps/portal/view/home/MainContainer.mjs +2 -12
- package/apps/sharedcovid/view/MainContainerController.mjs +1 -1
- package/buildScripts/webpack/json/myApps.template.json +1 -0
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/layout/card/MainContainer.mjs +148 -0
- package/examples/layout/card/app.mjs +6 -0
- package/examples/layout/card/index.html +11 -0
- package/examples/layout/card/neo-config.json +6 -0
- package/package.json +3 -3
- package/resources/data/deck/learnneo/pages/2023-10-14T19-25-08-153Z.md +2 -2
- package/resources/data/deck/learnneo/pages/Earthquakes.md +3 -3
- package/resources/data/deck/learnneo/pages/Setup.md +1 -1
- package/resources/data/deck/learnneo/pages/WhyNeo-Speed.md +1 -1
- package/resources/data/deck/learnneo/tree.json +1 -1
- package/resources/scss/src/apps/colors/BarChartComponent.scss +3 -0
- package/resources/scss/src/apps/colors/PieChartComponent.scss +3 -0
- package/resources/scss/src/apps/colors/TableContainer.scss +44 -0
- package/resources/scss/src/apps/colors/Viewport.scss +17 -0
- package/resources/scss/src/layout/Card.scss +17 -0
- package/src/DefaultConfig.mjs +2 -2
- package/src/component/Base.mjs +6 -0
- package/src/component/wrapper/AmChart.mjs +16 -16
- package/src/core/Base.mjs +2 -2
- package/src/data/RecordFactory.mjs +3 -0
- package/src/date/SelectorContainer.mjs +3 -0
- package/src/layout/Card.mjs +115 -24
- package/src/main/addon/AmCharts.mjs +3 -0
- package/src/model/Component.mjs +5 -1
- package/src/worker/App.mjs +2 -1
- package/test/components/files/form/field/ComboBox.mjs +4 -3
package/apps/ServiceWorker.mjs
CHANGED
@@ -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>Dashboard Widget</title>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<script src="../../../../src/MicroLoader.mjs" type="module"></script>
|
10
|
+
</body>
|
11
|
+
</html>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{
|
2
|
+
"appPath" : "apps/colors/childapps/widget/app.mjs",
|
3
|
+
"basePath" : "../../../../",
|
4
|
+
"environment" : "development",
|
5
|
+
"loadApplicationDelay": 100,
|
6
|
+
"mainPath" : "./Main.mjs",
|
7
|
+
"mainThreadAddons" : ["AmCharts", "DragDrop", "Navigator", "Stylesheet"],
|
8
|
+
"themes" : ["neo-theme-dark"],
|
9
|
+
"useSharedWorkers" : true
|
10
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import BaseViewport from '../../../../../src/container/Viewport.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Colors.view.Viewport
|
5
|
+
* @extends Neo.container.Viewport
|
6
|
+
*/
|
7
|
+
class Viewport extends BaseViewport {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Widget.view.Viewport'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'SharedDialog2.view.Viewport'
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
Neo.setupClass(Viewport);
|
18
|
+
|
19
|
+
export default Viewport;
|
@@ -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>Colors</title>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<script src="../../src/MicroLoader.mjs" type="module"></script>
|
10
|
+
</body>
|
11
|
+
</html>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import Model from '../../../src/data/Model.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Colors.model.Color
|
5
|
+
* @extends Neo.data.Model
|
6
|
+
*/
|
7
|
+
class Color extends Model {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Colors.model.Color'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Colors.model.Color',
|
14
|
+
/**
|
15
|
+
* @member {Object[]} fields
|
16
|
+
*/
|
17
|
+
fields: [{
|
18
|
+
name: 'id',
|
19
|
+
type: 'String'
|
20
|
+
}, {
|
21
|
+
name: 'index',
|
22
|
+
type: 'Integer'
|
23
|
+
}, {
|
24
|
+
name: 'columnA',
|
25
|
+
type: 'String'
|
26
|
+
}, {
|
27
|
+
name: 'columnB',
|
28
|
+
type: 'String'
|
29
|
+
}, {
|
30
|
+
name: 'columnC',
|
31
|
+
type: 'String'
|
32
|
+
}, {
|
33
|
+
name: 'columnD',
|
34
|
+
type: 'String'
|
35
|
+
}, {
|
36
|
+
name: 'columnE',
|
37
|
+
type: 'String'
|
38
|
+
}, {
|
39
|
+
name: 'columnF',
|
40
|
+
type: 'String'
|
41
|
+
}, {
|
42
|
+
name: 'columnG',
|
43
|
+
type: 'String'
|
44
|
+
}, {
|
45
|
+
name: 'columnH',
|
46
|
+
type: 'String'
|
47
|
+
}, {
|
48
|
+
name: 'columnI',
|
49
|
+
type: 'String'
|
50
|
+
}, {
|
51
|
+
name: 'columnJ',
|
52
|
+
type: 'String'
|
53
|
+
}]
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
Neo.setupClass(Color);
|
58
|
+
|
59
|
+
export default Color;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
{
|
2
|
+
"appPath" : "apps/colors/app.mjs",
|
3
|
+
"basePath" : "../../",
|
4
|
+
"environment" : "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"mainThreadAddons": ["AmCharts", "DragDrop", "Navigator", "Stylesheet"],
|
7
|
+
"themes" : ["neo-theme-dark"],
|
8
|
+
"useSharedWorkers": true
|
9
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import ColorModel from '../model/Color.mjs';
|
2
|
+
import Store from '../../../src/data/Store.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Colors.store.Colors
|
6
|
+
* @extends Neo.data.Store
|
7
|
+
*/
|
8
|
+
class Colors extends Store {
|
9
|
+
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Colors.store.Colors'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Colors.store.Colors',
|
15
|
+
/**
|
16
|
+
* @member {Neo.data.Model} model=ColorModel
|
17
|
+
*/
|
18
|
+
model: ColorModel
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
Neo.setupClass(Colors);
|
23
|
+
|
24
|
+
export default Colors;
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import AmChartComponent from '../../../src/component/wrapper/AmChart.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Colors.view.BarChartComponent
|
5
|
+
* @extends Neo.component.wrapper.AmChart
|
6
|
+
*/
|
7
|
+
class BarChartComponent extends AmChartComponent {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Colors.view.BarChartComponent'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Colors.view.BarChartComponent',
|
14
|
+
/**
|
15
|
+
* @member {String[]} baseCls=['colors-bar-chart']
|
16
|
+
*/
|
17
|
+
baseCls: ['colors-bar-chart'],
|
18
|
+
/**
|
19
|
+
* @member {String} chartType='PieChart'
|
20
|
+
*/
|
21
|
+
chartType: 'XYChart',
|
22
|
+
/**
|
23
|
+
* @member {Object} _vdom
|
24
|
+
*/
|
25
|
+
/**
|
26
|
+
* @member {Object} chartConfig
|
27
|
+
*/
|
28
|
+
chartConfig: {
|
29
|
+
series: [{
|
30
|
+
type: 'ColumnSeries',
|
31
|
+
|
32
|
+
columns: {
|
33
|
+
propertyFields: {
|
34
|
+
fill : 'color',
|
35
|
+
stroke: 'color'
|
36
|
+
}
|
37
|
+
},
|
38
|
+
|
39
|
+
dataFields: {
|
40
|
+
categoryX: 'color',
|
41
|
+
valueY : 'count'
|
42
|
+
}
|
43
|
+
}],
|
44
|
+
xAxes: [{
|
45
|
+
type: 'CategoryAxis',
|
46
|
+
|
47
|
+
dataFields: {
|
48
|
+
category: 'color',
|
49
|
+
title: {
|
50
|
+
text: 'Colors'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}],
|
54
|
+
yAxes: [{
|
55
|
+
type: 'ValueAxis',
|
56
|
+
|
57
|
+
title: {
|
58
|
+
text: 'Occurrences in table cells'
|
59
|
+
}
|
60
|
+
}]
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
Neo.setupClass(BarChartComponent);
|
66
|
+
|
67
|
+
export default BarChartComponent;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import AmChartComponent from '../../../src/component/wrapper/AmChart.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Colors.view.PieChartComponent
|
5
|
+
* @extends Neo.component.wrapper.AmChart
|
6
|
+
*/
|
7
|
+
class PieChartComponent extends AmChartComponent {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Colors.view.PieChartComponent'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Colors.view.PieChartComponent',
|
14
|
+
/**
|
15
|
+
* @member {String[]} baseCls=['colors-pie-chart']
|
16
|
+
*/
|
17
|
+
baseCls: ['colors-pie-chart'],
|
18
|
+
/**
|
19
|
+
* @member {String} chartType='PieChart'
|
20
|
+
*/
|
21
|
+
chartType: 'PieChart',
|
22
|
+
/**
|
23
|
+
* @member {Object} _vdom
|
24
|
+
*/
|
25
|
+
/**
|
26
|
+
* @member {Object} chartConfig
|
27
|
+
*/
|
28
|
+
chartConfig: {
|
29
|
+
series: [{
|
30
|
+
type: 'PieSeries',
|
31
|
+
|
32
|
+
colors: {
|
33
|
+
list: [
|
34
|
+
'#247acb',
|
35
|
+
'#4493de',
|
36
|
+
'#6face6',
|
37
|
+
'#9bc5ed',
|
38
|
+
'#c6def5'
|
39
|
+
]
|
40
|
+
},
|
41
|
+
|
42
|
+
dataFields: {
|
43
|
+
category: 'color',
|
44
|
+
value : 'count'
|
45
|
+
}
|
46
|
+
}]
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
Neo.setupClass(PieChartComponent);
|
52
|
+
|
53
|
+
export default PieChartComponent;
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import Container from '../../../src/table/Container.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Colors.view.TableContainer
|
5
|
+
* @extends Neo.table.Container
|
6
|
+
*/
|
7
|
+
class TableContainer extends Container {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Colors.view.TableContainer'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Colors.view.TableContainer',
|
14
|
+
/**
|
15
|
+
* @member {String[]} cls=['colors-table-container']
|
16
|
+
*/
|
17
|
+
cls: ['colors-table-container'],
|
18
|
+
/**
|
19
|
+
* @member {Object} columnDefaults
|
20
|
+
*/
|
21
|
+
columnDefaults: {
|
22
|
+
renderer(data) {
|
23
|
+
return {cls: ['color-' + data.value], html: ' '}
|
24
|
+
}
|
25
|
+
},
|
26
|
+
/**
|
27
|
+
* @member {Object[]} columns
|
28
|
+
*/
|
29
|
+
columns: [{
|
30
|
+
cls : ['neo-index-column', 'neo-table-header-button'],
|
31
|
+
dataField: 'index',
|
32
|
+
dock : 'left',
|
33
|
+
minWidth : 40,
|
34
|
+
text : '#',
|
35
|
+
renderer : data => ({cls : ['neo-index-column', 'neo-table-cell'], html: data.index + 1}),
|
36
|
+
width : 40
|
37
|
+
}, {
|
38
|
+
dataField: 'columnA',
|
39
|
+
text : 'A'
|
40
|
+
}, {
|
41
|
+
dataField: 'columnB',
|
42
|
+
text : 'B'
|
43
|
+
}, {
|
44
|
+
dataField: 'columnC',
|
45
|
+
text : 'C'
|
46
|
+
}, {
|
47
|
+
dataField: 'columnD',
|
48
|
+
text : 'D'
|
49
|
+
}, {
|
50
|
+
dataField: 'columnE',
|
51
|
+
text : 'E'
|
52
|
+
}, {
|
53
|
+
dataField: 'columnF',
|
54
|
+
text : 'F'
|
55
|
+
}, {
|
56
|
+
dataField: 'columnG',
|
57
|
+
text : 'G'
|
58
|
+
}, {
|
59
|
+
dataField: 'columnH',
|
60
|
+
text : 'H'
|
61
|
+
}, {
|
62
|
+
dataField: 'columnI',
|
63
|
+
text : 'I'
|
64
|
+
}, {
|
65
|
+
dataField: 'columnJ',
|
66
|
+
text : 'J'
|
67
|
+
}]
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
Neo.setupClass(TableContainer);
|
72
|
+
|
73
|
+
export default TableContainer;
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import BaseViewport from '../../../src/container/Viewport.mjs';
|
2
|
+
import BarChartComponent from './BarChartComponent.mjs';
|
3
|
+
import PieChartComponent from './PieChartComponent.mjs';
|
4
|
+
import TableContainer from './TableContainer.mjs';
|
5
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
6
|
+
import ViewportController from './ViewportController.mjs';
|
7
|
+
import ViewportModel from './ViewportModel.mjs';
|
8
|
+
|
9
|
+
/**
|
10
|
+
* @class Colors.view.Viewport
|
11
|
+
* @extends Neo.container.Viewport
|
12
|
+
*/
|
13
|
+
class Viewport extends BaseViewport {
|
14
|
+
static config = {
|
15
|
+
/**
|
16
|
+
* @member {String} className='Colors.view.Viewport'
|
17
|
+
* @protected
|
18
|
+
*/
|
19
|
+
className: 'Colors.view.Viewport',
|
20
|
+
/**
|
21
|
+
* @member {String[]} cls=['colors-viewport']
|
22
|
+
*/
|
23
|
+
cls: ['colors-viewport'],
|
24
|
+
/**
|
25
|
+
* @member {Neo.controller.Component} controller=ViewportController
|
26
|
+
*/
|
27
|
+
controller: ViewportController,
|
28
|
+
/**
|
29
|
+
* @member {Object} layout
|
30
|
+
*/
|
31
|
+
layout: {ntype: 'vbox', align: 'stretch'},
|
32
|
+
/**
|
33
|
+
* @member {Object[]} items
|
34
|
+
*/
|
35
|
+
items: [{
|
36
|
+
module: Toolbar,
|
37
|
+
cls : ['portal-header-toolbar'],
|
38
|
+
flex : 'none',
|
39
|
+
|
40
|
+
items: [{
|
41
|
+
handler: 'onStartButtonClick',
|
42
|
+
text : 'Start'
|
43
|
+
}, {
|
44
|
+
handler: 'onStopButtonClick',
|
45
|
+
text : 'Stop'
|
46
|
+
}, '->', {
|
47
|
+
handler : 'onDetachTableButtonClick',
|
48
|
+
iconCls : 'far fa-window-maximize',
|
49
|
+
reference: 'detach-table-button',
|
50
|
+
text : 'Table'
|
51
|
+
}, {
|
52
|
+
handler : 'onDetachPieChartButtonClick',
|
53
|
+
iconCls : 'far fa-window-maximize',
|
54
|
+
reference: 'detach-pie-chart-button',
|
55
|
+
text : 'Pie Chart'
|
56
|
+
}, {
|
57
|
+
handler : 'onDetachBarChartButtonClick',
|
58
|
+
iconCls : 'far fa-window-maximize',
|
59
|
+
reference: 'detach-bar-chart-button',
|
60
|
+
text : 'Bar Chart'
|
61
|
+
}]
|
62
|
+
}, {
|
63
|
+
module : TableContainer,
|
64
|
+
bind : {store: 'stores.colors'},
|
65
|
+
height : 300,
|
66
|
+
reference: 'table'
|
67
|
+
}, {
|
68
|
+
module : PieChartComponent,
|
69
|
+
reference: 'pie-chart'
|
70
|
+
}, {
|
71
|
+
module : BarChartComponent,
|
72
|
+
reference: 'bar-chart'
|
73
|
+
}],
|
74
|
+
/**
|
75
|
+
* @member {Neo.model.Component} model=ViewportModel
|
76
|
+
*/
|
77
|
+
model: ViewportModel
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
Neo.setupClass(Viewport);
|
82
|
+
|
83
|
+
export default Viewport;
|