neo.mjs 8.22.0 → 8.24.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/README.md +5 -0
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/portal/index.html +1 -1
- package/apps/portal/view/home/FeatureSection.mjs +4 -4
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/portal/view/home/MainContainer.mjs +7 -7
- package/apps/portal/view/home/parts/MainNeo.mjs +35 -4
- package/examples/ConfigurationViewport.mjs +21 -8
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/component/magicmovetext/MainContainer.mjs +92 -0
- package/examples/component/magicmovetext/app.mjs +6 -0
- package/examples/component/magicmovetext/index.html +11 -0
- package/examples/component/magicmovetext/neo-config.json +6 -0
- package/examples/grid/bigData/GridContainer.mjs +3 -0
- package/package.json +2 -2
- package/resources/scss/src/apps/portal/home/parts/MainNeo.scss +30 -0
- package/resources/scss/src/component/MagicMoveText.scss +39 -0
- package/resources/scss/src/examples/ConfigurationViewport.scss +27 -0
- package/src/DefaultConfig.mjs +2 -2
- package/src/component/MagicMoveText.mjs +494 -0
- package/src/data/Store.mjs +12 -0
- package/src/grid/Container.mjs +78 -25
- package/src/grid/View.mjs +89 -74
- package/src/grid/header/Toolbar.mjs +2 -3
- package/src/selection/grid/CellModel.mjs +8 -4
- package/src/selection/grid/RowModel.mjs +2 -2
- package/resources/scss/src/examples/ConfigurationPanel.scss +0 -25
package/README.md
CHANGED
@@ -21,6 +21,11 @@ without compilations. This makes debugging easier and reduces development costs.
|
|
21
21
|
In case you care about scalability, extensibility or solid architectures, congratulations,
|
22
22
|
you have found the right spot.
|
23
23
|
|
24
|
+
<p align="center">
|
25
|
+
<a href="https://youtu.be/pYfM28Pz6_0"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/master/resources_pub/images/neo33s.png"></a>
|
26
|
+
<a href="https://youtu.be/aEA5333WiWY"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/master/resources_pub/images/neo-movie.png"></a>
|
27
|
+
</p>
|
28
|
+
|
24
29
|
## Content
|
25
30
|
1. <a href="#introduction">Introduction</a>
|
26
31
|
2. <a href="#use-cases">Potential Use Cases</a>
|
package/apps/ServiceWorker.mjs
CHANGED
package/apps/portal/index.html
CHANGED
@@ -22,10 +22,10 @@ class FeatureSection extends Container {
|
|
22
22
|
*/
|
23
23
|
className: 'Portal.view.home.FeatureSection',
|
24
24
|
/**
|
25
|
-
* @member {String[]} baseCls=['portal-home-feature-section','neo-container']
|
25
|
+
* @member {String[]} baseCls=['portal-home-feature-section','portal-home-content-view','neo-container']
|
26
26
|
* @protected
|
27
27
|
*/
|
28
|
-
baseCls: ['portal-home-feature-section', 'neo-container'],
|
28
|
+
baseCls: ['portal-home-feature-section', 'portal-home-content-view', 'neo-container'],
|
29
29
|
/**
|
30
30
|
* If you want to use the LivePreview, use the config livePreviewCode.
|
31
31
|
* For custom content, use this config instead.
|
@@ -91,7 +91,7 @@ class FeatureSection extends Container {
|
|
91
91
|
}]
|
92
92
|
}, {
|
93
93
|
module : Container,
|
94
|
-
cls : 'portal-content-wrapper',
|
94
|
+
cls : ['portal-content-wrapper'],
|
95
95
|
layout : 'fit',
|
96
96
|
reference: 'portal-content-wrapper'
|
97
97
|
}]
|
@@ -125,7 +125,7 @@ class FeatureSection extends Container {
|
|
125
125
|
cls : ['page-live-preview'],
|
126
126
|
reference: 'live-preview',
|
127
127
|
value : this.livePreviewCode
|
128
|
-
}]
|
128
|
+
}];
|
129
129
|
|
130
130
|
this.getItem('portal-content-wrapper').items = value
|
131
131
|
}
|
@@ -6,8 +6,6 @@ import Helix from './parts/Helix.mjs';
|
|
6
6
|
import How from './parts/How.mjs';
|
7
7
|
import MainNeo from './parts/MainNeo.mjs';
|
8
8
|
|
9
|
-
// import References from './parts/References.mjs';
|
10
|
-
|
11
9
|
/**
|
12
10
|
* @class Portal.view.home.MainContainer
|
13
11
|
* @extends Neo.container.Base
|
@@ -28,9 +26,12 @@ class MainContainer extends Container {
|
|
28
26
|
*/
|
29
27
|
domListeners: [{
|
30
28
|
intersect(data) {
|
31
|
-
let id = data.path[
|
29
|
+
let id = data.path[0].id;
|
32
30
|
this.activePartsId = id;
|
33
|
-
|
31
|
+
|
32
|
+
this.items.forEach(item => {
|
33
|
+
item[item.id === id ? 'activate' : 'deactivate']?.()
|
34
|
+
})
|
34
35
|
},
|
35
36
|
scroll(event) {
|
36
37
|
if (event.target.cls.includes('portal-home-maincontainer')) {
|
@@ -54,7 +55,6 @@ class MainContainer extends Container {
|
|
54
55
|
Helix,
|
55
56
|
Colors,
|
56
57
|
How,
|
57
|
-
// References,
|
58
58
|
AfterMath
|
59
59
|
],
|
60
60
|
/**
|
@@ -85,9 +85,9 @@ class MainContainer extends Container {
|
|
85
85
|
Neo.main.addon.IntersectionObserver.register({
|
86
86
|
callback : 'isVisible',
|
87
87
|
id,
|
88
|
-
observe : ['.portal-content-
|
88
|
+
observe : ['.portal-home-content-view'],
|
89
89
|
root : `#${id}`,
|
90
|
-
threshold:
|
90
|
+
threshold: .6,
|
91
91
|
windowId
|
92
92
|
})
|
93
93
|
})
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import BaseContainer from './BaseContainer.mjs';
|
2
2
|
import Button from '../../../../../src/button/Base.mjs';
|
3
|
+
import MagicMoveText from '../../../../../src/component/MagicMoveText.mjs';
|
3
4
|
|
4
5
|
/**
|
5
6
|
* @class Portal.view.home.parts.MainNeo
|
@@ -33,10 +34,26 @@ class MainNeo extends BaseContainer {
|
|
33
34
|
tag : 'h1'
|
34
35
|
}]
|
35
36
|
}, {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
module : MagicMoveText,
|
38
|
+
autoCycle: false,
|
39
|
+
cls : ['neo-h2'],
|
40
|
+
colorMove: '#3E63DD',
|
41
|
+
flex : 'none',
|
42
|
+
reference: 'magic-move',
|
43
|
+
|
44
|
+
cycleTexts: [
|
45
|
+
'Modern Enterprise JavaScript Framework',
|
46
|
+
'An Application Worker being the Orchestrator',
|
47
|
+
'Scalability',
|
48
|
+
'Extensibility',
|
49
|
+
'Performance',
|
50
|
+
'Declarative & Reactive Component Trees',
|
51
|
+
'Separated from Business Logic',
|
52
|
+
'View Controllers',
|
53
|
+
'State Providers',
|
54
|
+
'Clean Architectures',
|
55
|
+
'Multi Window Apps'
|
56
|
+
]
|
40
57
|
}, {
|
41
58
|
cls : ['neo-h3'],
|
42
59
|
flex: 'none',
|
@@ -66,6 +83,20 @@ class MainNeo extends BaseContainer {
|
|
66
83
|
}]
|
67
84
|
}]
|
68
85
|
}
|
86
|
+
|
87
|
+
/**
|
88
|
+
*
|
89
|
+
*/
|
90
|
+
activate() {
|
91
|
+
this.getItem('magic-move').autoCycle = true
|
92
|
+
}
|
93
|
+
|
94
|
+
/**
|
95
|
+
*
|
96
|
+
*/
|
97
|
+
deactivate() {
|
98
|
+
this.getItem('magic-move').autoCycle = false
|
99
|
+
}
|
69
100
|
}
|
70
101
|
|
71
102
|
export default Neo.setupClass(MainNeo);
|
@@ -20,19 +20,19 @@ const themes = [
|
|
20
20
|
class ConfigurationViewport extends Viewport {
|
21
21
|
static config = {
|
22
22
|
/**
|
23
|
-
* @member {String} className='Neo.examples.
|
23
|
+
* @member {String} className='Neo.examples.ConfigurationViewport'
|
24
24
|
* @protected
|
25
25
|
*/
|
26
|
-
className: 'Neo.examples.
|
26
|
+
className: 'Neo.examples.ConfigurationViewport',
|
27
27
|
/**
|
28
28
|
* @member {String} ntype='configuration-viewport'
|
29
29
|
* @protected
|
30
30
|
*/
|
31
31
|
ntype: 'configuration-viewport',
|
32
32
|
/**
|
33
|
-
* @member {
|
33
|
+
* @member {String[]} baseCls=['neo-examples-configuration-viewport','neo-viewport']
|
34
34
|
*/
|
35
|
-
|
35
|
+
baseCls: ['neo-examples-configuration-viewport', 'neo-viewport'],
|
36
36
|
/**
|
37
37
|
* @member {Number} configItemLabelWidth=150
|
38
38
|
*/
|
@@ -45,6 +45,10 @@ class ConfigurationViewport extends Viewport {
|
|
45
45
|
* @member {Number} configPanelFlex=1
|
46
46
|
*/
|
47
47
|
configPanelFlex: 1,
|
48
|
+
/**
|
49
|
+
* @member {Number} configPanelMaxWidth=null
|
50
|
+
*/
|
51
|
+
configPanelMaxWidth: null,
|
48
52
|
/**
|
49
53
|
* @member {Number} configPanelMinWidth=350
|
50
54
|
*/
|
@@ -56,7 +60,11 @@ class ConfigurationViewport extends Viewport {
|
|
56
60
|
/**
|
57
61
|
* @member {Number} exampleComponentFlex=1
|
58
62
|
*/
|
59
|
-
exampleComponentFlex: 2
|
63
|
+
exampleComponentFlex: 2,
|
64
|
+
/**
|
65
|
+
* @member {Object} layout={ntype:'hbox', align:'stretch'}
|
66
|
+
*/
|
67
|
+
layout: {ntype: 'hbox', align: 'stretch'}
|
60
68
|
}
|
61
69
|
|
62
70
|
/**
|
@@ -114,6 +122,7 @@ class ConfigurationViewport extends Viewport {
|
|
114
122
|
|
115
123
|
me.items = [{
|
116
124
|
module: Container,
|
125
|
+
cls : ['neo-example-container'],
|
117
126
|
items : [me.exampleComponent],
|
118
127
|
flex : me.exampleComponentFlex,
|
119
128
|
layout: 'base',
|
@@ -123,11 +132,16 @@ class ConfigurationViewport extends Viewport {
|
|
123
132
|
module: Panel,
|
124
133
|
cls : ['neo-panel', 'neo-container', 'neo-configuration-panel'],
|
125
134
|
flex : me.configPanelFlex,
|
126
|
-
|
135
|
+
|
136
|
+
style: {
|
137
|
+
maxWidth: me.configPanelMaxWidth + 'px',
|
138
|
+
margin : '20px',
|
139
|
+
minWidth: me.configPanelMinWidth + 'px'
|
140
|
+
},
|
127
141
|
|
128
142
|
headers: [{
|
143
|
+
cls : ['neo-configuration-header-toolbar'],
|
129
144
|
dock : 'top',
|
130
|
-
style: {borderLeft:0, borderRight:0, borderTop:0},
|
131
145
|
items: [{
|
132
146
|
ntype: 'label',
|
133
147
|
text : 'Configuration'
|
@@ -145,7 +159,6 @@ class ConfigurationViewport extends Viewport {
|
|
145
159
|
items: [{
|
146
160
|
module: Container,
|
147
161
|
layout: {ntype: 'vbox', align: null},
|
148
|
-
style : {overflowY: 'auto', padding: '10px'},
|
149
162
|
cls : ['neo-configuration-panel-body'],
|
150
163
|
itemDefaults: {
|
151
164
|
clearToOriginalValue: true,
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import CheckBox from '../../../src/form/field/CheckBox.mjs';
|
2
|
+
import ConfigurationViewport from '../../ConfigurationViewport.mjs';
|
3
|
+
import MagicMoveText from '../../../src/component/MagicMoveText.mjs';
|
4
|
+
import NumberField from '../../../src/form/field/Number.mjs';
|
5
|
+
import TextField from '../../../src/form/field/Text.mjs';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @class Neo.examples.component.magicmovetext.MainContainer
|
9
|
+
* @extends Neo.examples.ConfigurationViewport
|
10
|
+
*/
|
11
|
+
class MainContainer extends ConfigurationViewport {
|
12
|
+
static config = {
|
13
|
+
className : 'Neo.examples.component.magicmovetext.MainContainer',
|
14
|
+
configItemLabelWidth: 150,
|
15
|
+
configItemWidth : 250,
|
16
|
+
configPanelMaxWidth : 300,
|
17
|
+
configPanelMinWidth : 300,
|
18
|
+
layout : {ntype: 'hbox', align: 'stretch'}
|
19
|
+
}
|
20
|
+
|
21
|
+
createConfigurationComponents() {
|
22
|
+
let me = this,
|
23
|
+
{exampleComponent} = me;
|
24
|
+
|
25
|
+
return [{
|
26
|
+
module : CheckBox,
|
27
|
+
checked : exampleComponent.autoCycle,
|
28
|
+
labelText: 'autoCycle',
|
29
|
+
listeners: {change: me.onConfigChange.bind(me, 'autoCycle')}
|
30
|
+
}, {
|
31
|
+
module : NumberField,
|
32
|
+
clearable: false,
|
33
|
+
labelText: 'autoCycleInterval',
|
34
|
+
listeners: {change: me.onConfigChange.bind(me, 'autoCycleInterval')},
|
35
|
+
maxValue : 10000,
|
36
|
+
minValue : 0,
|
37
|
+
stepSize : 1000,
|
38
|
+
style : {marginTop: '10px'},
|
39
|
+
value : exampleComponent.autoCycleInterval
|
40
|
+
}, {
|
41
|
+
module : TextField,
|
42
|
+
labelText: 'colorFadeIn',
|
43
|
+
listeners: {change: me.onConfigChange.bind(me, 'colorFadeIn')},
|
44
|
+
value : exampleComponent.colorFadeIn
|
45
|
+
}, {
|
46
|
+
module : TextField,
|
47
|
+
labelText: 'colorFadeOut',
|
48
|
+
listeners: {change: me.onConfigChange.bind(me, 'colorFadeOut')},
|
49
|
+
value : exampleComponent.colorFadeOut
|
50
|
+
}, {
|
51
|
+
module : TextField,
|
52
|
+
labelText: 'colorMove',
|
53
|
+
listeners: {change: me.onConfigChange.bind(me, 'colorMove')},
|
54
|
+
value : exampleComponent.colorMove
|
55
|
+
}, {
|
56
|
+
module : TextField,
|
57
|
+
clearable: false,
|
58
|
+
labelText: 'fontFamily',
|
59
|
+
listeners: {change: me.onConfigChange.bind(me, 'fontFamily')},
|
60
|
+
value : exampleComponent.fontFamily,
|
61
|
+
width : 280
|
62
|
+
}, {
|
63
|
+
module : NumberField,
|
64
|
+
clearable: false,
|
65
|
+
labelText: 'transitionTime',
|
66
|
+
listeners: {change: me.onConfigChange.bind(me, 'transitionTime')},
|
67
|
+
maxValue : 900,
|
68
|
+
minValue : 50,
|
69
|
+
stepSize : 50,
|
70
|
+
value : exampleComponent.transitionTime
|
71
|
+
}]
|
72
|
+
}
|
73
|
+
|
74
|
+
createExampleComponent() {
|
75
|
+
return {
|
76
|
+
module: MagicMoveText,
|
77
|
+
height: 100,
|
78
|
+
width : 450,
|
79
|
+
|
80
|
+
cycleTexts: [
|
81
|
+
'Magic Move',
|
82
|
+
'Move characters like magic',
|
83
|
+
'Animate between strings',
|
84
|
+
'Just like that',
|
85
|
+
'Simple to use',
|
86
|
+
'Would you use it?'
|
87
|
+
]
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
export default Neo.setupClass(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 Magic Move - Text</title>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<script src="../../../src/MicroLoader.mjs" type="module"></script>
|
10
|
+
</body>
|
11
|
+
</html>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import BaseGridContainer from '../../../src/grid/Container.mjs';
|
2
2
|
import MainStore from './MainStore.mjs';
|
3
3
|
|
4
|
+
import * as selection from '../../../src/selection/grid/_export.mjs';
|
5
|
+
|
4
6
|
/**
|
5
7
|
* @class Neo.examples.grid.bigData.GridContainer
|
6
8
|
* @extends Neo.grid.Container
|
@@ -33,6 +35,7 @@ class GridContainer extends BaseGridContainer {
|
|
33
35
|
* @member {Object} viewConfig
|
34
36
|
*/
|
35
37
|
viewConfig: {
|
38
|
+
selectionModel: selection.CellModel, // todo: remove after #6491 is resolved
|
36
39
|
bufferColumnRange: 3,
|
37
40
|
bufferRowRange : 5
|
38
41
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.24.0",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -61,7 +61,7 @@
|
|
61
61
|
"monaco-editor": "0.50.0",
|
62
62
|
"neo-jsdoc": "1.0.1",
|
63
63
|
"neo-jsdoc-x": "1.0.5",
|
64
|
-
"postcss": "^8.5.
|
64
|
+
"postcss": "^8.5.3",
|
65
65
|
"sass": "^1.85.0",
|
66
66
|
"siesta-lite": "5.5.2",
|
67
67
|
"url": "^0.11.4",
|
@@ -27,6 +27,24 @@
|
|
27
27
|
min-width : 240px;
|
28
28
|
}
|
29
29
|
|
30
|
+
.neo-magic-move-text {
|
31
|
+
background-color: transparent;
|
32
|
+
color : #000;
|
33
|
+
font-size : 2.5rem;
|
34
|
+
height : 2em;
|
35
|
+
letter-spacing : -0.02em;
|
36
|
+
line-height : 1.2em;
|
37
|
+
width : 90%;
|
38
|
+
|
39
|
+
.neo-content {
|
40
|
+
font-size: 2.5rem;
|
41
|
+
}
|
42
|
+
|
43
|
+
.neo-measure-element-wrapper {
|
44
|
+
letter-spacing: -0.02em;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
30
48
|
.neo-github {
|
31
49
|
background-color: #fff;
|
32
50
|
}
|
@@ -79,6 +97,10 @@
|
|
79
97
|
margin: 1rem 2rem;
|
80
98
|
}
|
81
99
|
|
100
|
+
.neo-magic-move-text {
|
101
|
+
height: 3.5em;
|
102
|
+
}
|
103
|
+
|
82
104
|
.vector {
|
83
105
|
height: 17vw;
|
84
106
|
}
|
@@ -106,6 +128,14 @@
|
|
106
128
|
font-size: 1.15rem;
|
107
129
|
}
|
108
130
|
|
131
|
+
.neo-magic-move-text {
|
132
|
+
height: 3.5em;
|
133
|
+
|
134
|
+
.neo-content {
|
135
|
+
font-size: 2rem;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
109
139
|
.vector {
|
110
140
|
height: 70px;
|
111
141
|
width : 70px;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
.neo-magic-move-text {
|
2
|
+
--neo-transition-time: 500ms;
|
3
|
+
|
4
|
+
background-color: #000;
|
5
|
+
color : #fff;
|
6
|
+
font-size : 30px;
|
7
|
+
font-weight : bold;
|
8
|
+
|
9
|
+
.neo-content {
|
10
|
+
align-items : center;
|
11
|
+
display : flex;
|
12
|
+
height : 100%;
|
13
|
+
justify-content: center;
|
14
|
+
position : relative;
|
15
|
+
width : 100%;
|
16
|
+
|
17
|
+
.neo-char {
|
18
|
+
position : absolute;
|
19
|
+
transition:
|
20
|
+
color 0.2s ease-out,
|
21
|
+
left var(--neo-transition-time) ease-out,
|
22
|
+
opacity var(--neo-transition-time) ease-out,
|
23
|
+
top var(--neo-transition-time) ease-out;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
.neo-measure-element-wrapper {
|
28
|
+
align-items : center;
|
29
|
+
display : flex;
|
30
|
+
justify-content: center;
|
31
|
+
left : -5000px;
|
32
|
+
position : absolute;
|
33
|
+
top : -5000px;
|
34
|
+
}
|
35
|
+
|
36
|
+
.neo-measure-element {
|
37
|
+
position: relative;
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.neo-examples-configuration-viewport {
|
2
|
+
transition: width .5s ease-in-out;
|
3
|
+
|
4
|
+
@media (max-width: 450px) {
|
5
|
+
overflow-y: auto;
|
6
|
+
|
7
|
+
.neo-example-container {
|
8
|
+
flex: none !important;
|
9
|
+
}
|
10
|
+
|
11
|
+
&.neo-flex-container {
|
12
|
+
&.neo-flex-direction-row {
|
13
|
+
flex-direction: column;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
.neo-configuration-header-toolbar {
|
19
|
+
border : 0;
|
20
|
+
border-bottom: 1px solid var(--panel-border-color);
|
21
|
+
}
|
22
|
+
|
23
|
+
.neo-configuration-panel-body {
|
24
|
+
overflow-y: auto;
|
25
|
+
padding : 10px;
|
26
|
+
}
|
27
|
+
}
|
package/src/DefaultConfig.mjs
CHANGED
@@ -263,12 +263,12 @@ const DefaultConfig = {
|
|
263
263
|
useVdomWorker: true,
|
264
264
|
/**
|
265
265
|
* buildScripts/injectPackageVersion.mjs will update this value
|
266
|
-
* @default '8.
|
266
|
+
* @default '8.24.0'
|
267
267
|
* @memberOf! module:Neo
|
268
268
|
* @name config.version
|
269
269
|
* @type String
|
270
270
|
*/
|
271
|
-
version: '8.
|
271
|
+
version: '8.24.0'
|
272
272
|
};
|
273
273
|
|
274
274
|
Object.assign(DefaultConfig, {
|