neo.mjs 6.22.1 → 6.23.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/examples/ServiceWorker.mjs +2 -2
- package/examples/component/video/MainContainer.mjs +6 -7
- package/examples/videoMove/MainContainer.mjs +77 -0
- package/examples/videoMove/app.mjs +6 -0
- package/examples/videoMove/index.html +11 -0
- package/examples/videoMove/neo-config.json +6 -0
- package/package.json +2 -2
- package/src/DefaultConfig.mjs +2 -2
package/apps/ServiceWorker.mjs
CHANGED
@@ -1,16 +1,15 @@
|
|
1
|
-
import Viewport from '../../../src/container/Viewport.mjs';
|
2
|
-
import Video from '../../../src/component/Video.mjs';
|
3
|
-
import Panel from '../../../src/container/Panel.mjs';
|
4
1
|
import MainContainerController from "./MainContainerController.mjs";
|
2
|
+
import Panel from '../../../src/container/Panel.mjs';
|
3
|
+
import Video from '../../../src/component/Video.mjs';
|
4
|
+
import Viewport from '../../../src/container/Viewport.mjs';
|
5
5
|
|
6
6
|
/**
|
7
|
-
* @class Neo.examples.component.
|
7
|
+
* @class Neo.examples.component.video.MainContainer
|
8
8
|
* @extends Neo.examples.Viewport
|
9
9
|
*/
|
10
10
|
class MainContainer extends Viewport {
|
11
11
|
static config = {
|
12
|
-
className: 'Neo.examples.component.timer.MainContainer',
|
13
|
-
|
12
|
+
className : 'Neo.examples.component.timer.MainContainer',
|
14
13
|
controller: MainContainerController,
|
15
14
|
|
16
15
|
items : [{
|
@@ -35,7 +34,7 @@ class MainContainer extends Viewport {
|
|
35
34
|
module : Video,
|
36
35
|
url : 'https://video-ssl.itunes.apple.com/itunes-assets/Video125/v4/a0/57/54/a0575426-dd8e-2d25-bdf3-139702870b50/mzvf_786190431362224858.640x464.h264lc.U.p.m4v',
|
37
36
|
flag : 'video-component',
|
38
|
-
minHeight: 400
|
37
|
+
minHeight: 400
|
39
38
|
}]
|
40
39
|
}]
|
41
40
|
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import Button from '../../src/button/Base.mjs';
|
2
|
+
import Video from '../../src/component/Video.mjs';
|
3
|
+
import Viewport from '../../src/container/Viewport.mjs';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @class Neo.examples.videoMove.MainContainer
|
7
|
+
* @extends Neo.container.Viewport
|
8
|
+
*/
|
9
|
+
class MainContainer extends Viewport {
|
10
|
+
static config = {
|
11
|
+
className: 'Neo.examples.videoMove.MainContainer',
|
12
|
+
layout : {ntype: 'vbox', align: 'stretch'},
|
13
|
+
style : {padding: '50px'},
|
14
|
+
|
15
|
+
items: [{
|
16
|
+
ntype : 'container',
|
17
|
+
layout: {ntype: 'hbox', align: 'stretch'},
|
18
|
+
|
19
|
+
itemDefaults: {
|
20
|
+
ntype : 'container',
|
21
|
+
layout: 'fit'
|
22
|
+
},
|
23
|
+
|
24
|
+
items: [{
|
25
|
+
reference: 'container-1',
|
26
|
+
style : {backgroundColor: 'rgb(139,166,255)', padding: '50px'},
|
27
|
+
|
28
|
+
items: [{
|
29
|
+
module : Video,
|
30
|
+
playing: true,
|
31
|
+
url : 'https://video-ssl.itunes.apple.com/itunes-assets/Video125/v4/a0/57/54/a0575426-dd8e-2d25-bdf3-139702870b50/mzvf_786190431362224858.640x464.h264lc.U.p.m4v'
|
32
|
+
}]
|
33
|
+
}, {
|
34
|
+
reference: 'container-2',
|
35
|
+
style : {backgroundColor: 'rgb(139,166,255)', marginLeft: '50px', padding: '50px'}
|
36
|
+
}]
|
37
|
+
}, {
|
38
|
+
ntype : 'container',
|
39
|
+
layout: {ntype: 'vbox', align: 'start'},
|
40
|
+
style : {marginTop: '50px'},
|
41
|
+
|
42
|
+
items: [{
|
43
|
+
module : Button,
|
44
|
+
handler: 'up.onMoveVideoButtonClick',
|
45
|
+
text : 'Move Video'
|
46
|
+
}]
|
47
|
+
}]
|
48
|
+
}
|
49
|
+
|
50
|
+
/**
|
51
|
+
*
|
52
|
+
* @param {Object} data
|
53
|
+
*/
|
54
|
+
onMoveVideoButtonClick(data) {
|
55
|
+
let me = this,
|
56
|
+
container1 = me.getReference('container-1'),
|
57
|
+
container2 = me.getReference('container-2');
|
58
|
+
|
59
|
+
container1.silentVdomUpdate = true;
|
60
|
+
container2.silentVdomUpdate = true;
|
61
|
+
|
62
|
+
if (container2.items.length < 1) {
|
63
|
+
container2.add(container1.removeAt(0, false))
|
64
|
+
} else {
|
65
|
+
container1.add(container2.removeAt(0, false))
|
66
|
+
}
|
67
|
+
|
68
|
+
me.promiseUpdate().then(() => {
|
69
|
+
container1.silentVdomUpdate = false;
|
70
|
+
container2.silentVdomUpdate = false
|
71
|
+
})
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
Neo.setupClass(MainContainer);
|
76
|
+
|
77
|
+
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.mjs -Moving a Video Tag</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": "6.
|
3
|
+
"version": "6.23.0",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"envinfo": "^7.13.0",
|
53
53
|
"fs-extra": "^11.2.0",
|
54
54
|
"highlightjs-line-numbers.js": "^2.8.0",
|
55
|
-
"inquirer": "^10.1.
|
55
|
+
"inquirer": "^10.1.5",
|
56
56
|
"marked": "^13.0.3",
|
57
57
|
"monaco-editor": "^0.50.0",
|
58
58
|
"neo-jsdoc": "1.0.1",
|
package/src/DefaultConfig.mjs
CHANGED
@@ -260,12 +260,12 @@ const DefaultConfig = {
|
|
260
260
|
useVdomWorker: true,
|
261
261
|
/**
|
262
262
|
* buildScripts/injectPackageVersion.mjs will update this value
|
263
|
-
* @default '6.
|
263
|
+
* @default '6.23.0'
|
264
264
|
* @memberOf! module:Neo
|
265
265
|
* @name config.version
|
266
266
|
* @type String
|
267
267
|
*/
|
268
|
-
version: '6.
|
268
|
+
version: '6.23.0'
|
269
269
|
};
|
270
270
|
|
271
271
|
Object.assign(DefaultConfig, {
|