neo.mjs 4.0.13 → 4.0.16
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/WorldMapContainer.mjs +1 -1
- package/apps/realworld2/view/HeaderToolbar.mjs +2 -2
- package/apps/realworld2/view/article/FormContainer.mjs +1 -1
- package/apps/realworld2/view/user/LoginFormContainer.mjs +1 -1
- package/apps/realworld2/view/user/SettingsFormContainer.mjs +1 -1
- package/apps/sharedcovid/view/WorldMapContainer.mjs +1 -1
- package/apps/shareddialog/view/MainContainer.mjs +1 -1
- package/apps/shareddialog2/view/MainContainer.mjs +1 -1
- package/examples/calendar/basic/MainContainer.mjs +1 -1
- package/examples/component/wrapper/cesiumJS/MainContainer.mjs +1 -1
- package/examples/dialog/MainContainer.mjs +1 -1
- package/examples/list/animate/MainContainer.mjs +1 -1
- package/examples/remotesApi/basic/MainContainer.mjs +1 -1
- package/examples/todoList/version2/MainContainer.mjs +1 -1
- package/examples/toolbar/paging/app.mjs +6 -0
- package/examples/toolbar/paging/index.html +11 -0
- package/examples/toolbar/paging/model/User.mjs +38 -0
- package/examples/toolbar/paging/neo-config.json +8 -0
- package/examples/toolbar/paging/remotes-api.json +21 -0
- package/examples/toolbar/paging/store/Users.mjs +39 -0
- package/examples/toolbar/paging/view/AddUserDialog.mjs +67 -0
- package/examples/toolbar/paging/view/MainContainer.mjs +44 -0
- package/examples/toolbar/paging/view/MainContainerController.mjs +53 -0
- package/examples/toolbar/paging/view/MainContainerModel.mjs +29 -0
- package/examples/toolbar/paging/view/UserTableContainer.mjs +39 -0
- package/package.json +8 -8
- package/resources/scss/src/dialog/Base.scss +1 -0
- package/resources/scss/src/{container/Toolbar.scss → toolbar/Base.scss} +0 -0
- package/resources/scss/src/toolbar/Paging.scss +5 -0
- package/resources/scss/theme-dark/{container/Toolbar.scss → toolbar/Base.scss} +0 -0
- package/resources/scss/theme-light/{container/Toolbar.scss → toolbar/Base.scss} +0 -0
- package/src/calendar/view/MainContainer.mjs +1 -1
- package/src/calendar/view/week/Component.mjs +14 -13
- package/src/component/Base.mjs +7 -5
- package/src/container/Base.mjs +1 -1
- package/src/container/Panel.mjs +1 -1
- package/src/core/Util.mjs +9 -0
- package/src/data/Store.mjs +44 -5
- package/src/dialog/Base.mjs +110 -123
- package/src/form/field/Select.mjs +14 -4
- package/src/grid/header/Toolbar.mjs +2 -2
- package/src/list/Base.mjs +1 -0
- package/src/manager/DomEvent.mjs +3 -1
- package/src/plugin/Resizable.mjs +2 -2
- package/src/tab/Container.mjs +1 -1
- package/src/tab/header/Toolbar.mjs +2 -2
- package/src/table/View.mjs +4 -0
- package/src/table/header/Toolbar.mjs +2 -2
- package/src/{container/Toolbar.mjs → toolbar/Base.mjs} +7 -7
- package/src/toolbar/Paging.mjs +280 -0
- package/src/util/ClassSystem.mjs +7 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ You can switch between <a href="https://developer.mozilla.org/en-US/docs/Web/API
|
|
|
58
58
|
|
|
59
59
|
<img src="https://raw.githubusercontent.com/neomjs/pages/master/resources/images/workers-setup-v4.png">
|
|
60
60
|
|
|
61
|
-
The dedicated workers setup uses
|
|
61
|
+
The dedicated workers setup uses 3-6 threads (CPUs).
|
|
62
62
|
Most parts of the frameworks as well as your apps and components live within the app worker.
|
|
63
63
|
Main threads are as small and idle as possible (42KB) plus optional main thread addons.
|
|
64
64
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Container from '../../../src/container/Base.mjs';
|
|
2
2
|
import NumberField from '../../../src/form/field/Number.mjs';
|
|
3
|
-
import Toolbar from '../../../src/
|
|
3
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
|
4
4
|
import WorldMapComponent from './WorldMapComponent.mjs';
|
|
5
5
|
import WorldMapContainerController from './WorldMapContainerController.mjs';
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import HeaderToolbarController from './HeaderToolbarController.mjs';
|
|
2
|
-
import Toolbar from '../../../src/
|
|
2
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @class RealWorld2.view.HeaderToolbar
|
|
6
|
-
* @extends Neo.
|
|
6
|
+
* @extends Neo.toolbar.Base
|
|
7
7
|
*/
|
|
8
8
|
class HeaderToolbar extends Toolbar {
|
|
9
9
|
static getConfig() {return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ChipField from '../../../../src/form/field/Chip.mjs';
|
|
2
2
|
import Container from '../../../../src/form/Container.mjs';
|
|
3
3
|
import TextArea from '../../../../src/form/field/TextArea.mjs';
|
|
4
|
-
import Toolbar from '../../../../src/
|
|
4
|
+
import Toolbar from '../../../../src/toolbar/Base.mjs';
|
|
5
5
|
import TextField from '../../../../src/form/field/Text.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Container from '../../../../src/form/Container.mjs';
|
|
2
2
|
import PasswordField from '../../../../src/form/field/Password.mjs';
|
|
3
3
|
import TextField from '../../../../src/form/field/Text.mjs';
|
|
4
|
-
import Toolbar from '../../../../src/
|
|
4
|
+
import Toolbar from '../../../../src/toolbar/Base.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @class RealWorld2.view.user.LoginFormContainer
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Container from '../../../../src/form/Container.mjs';
|
|
2
2
|
import TextField from '../../../../src/form/field/Text.mjs';
|
|
3
|
-
import Toolbar from '../../../../src/
|
|
3
|
+
import Toolbar from '../../../../src/toolbar/Base.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @class RealWorld2.view.user.SettingsFormContainer
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Container from '../../../src/container/Base.mjs';
|
|
2
2
|
import NumberField from '../../../src/form/field/Number.mjs';
|
|
3
|
-
import Toolbar from '../../../src/
|
|
3
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
|
4
4
|
import WorldMapComponent from './WorldMapComponent.mjs';
|
|
5
5
|
import WorldMapContainerController from './WorldMapContainerController.mjs';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Button from '../../../src/button/Base.mjs';
|
|
2
2
|
import Radio from '../../../src/form/field/Radio.mjs';
|
|
3
3
|
import MainContainerController from './MainContainerController.mjs';
|
|
4
|
-
import Toolbar from '../../../src/
|
|
4
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
|
5
5
|
import Viewport from '../../../src/container/Viewport.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Button from '../../../src/button/Base.mjs';
|
|
2
2
|
import MainContainerController from './MainContainerController.mjs';
|
|
3
|
-
import Toolbar from '../../../src/
|
|
3
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
|
4
4
|
import Viewport from '../../../src/container/Viewport.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Button from '../../../src/button/Base.mjs';
|
|
2
2
|
import Calendar from '../../../src/calendar/view/MainContainer.mjs';
|
|
3
3
|
import MainContainerController from './MainContainerController.mjs';
|
|
4
|
-
import Toolbar from '../../../src/
|
|
4
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
|
5
5
|
import Viewport from '../../../src/container/Viewport.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Button from '../../../../src/button/Base.mjs';
|
|
2
2
|
import CesiumJSComponent from '../../../../src/component/wrapper/CesiumJS.mjs';
|
|
3
3
|
import MainContainerController from './MainContainerController.mjs';
|
|
4
|
-
import Toolbar from '../../../../src/
|
|
4
|
+
import Toolbar from '../../../../src/toolbar/Base.mjs';
|
|
5
5
|
import Viewport from '../../../../src/container/Viewport.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Button from '../../src/button/Base.mjs';
|
|
2
2
|
import CheckBox from '../../src/form/field/CheckBox.mjs';
|
|
3
3
|
import NeoArray from '../../src/util/Array.mjs';
|
|
4
|
-
import Toolbar from '../../src/
|
|
4
|
+
import Toolbar from '../../src/toolbar/Base.mjs';
|
|
5
5
|
import DemoDialog from './DemoDialog.mjs';
|
|
6
6
|
import Viewport from '../../src/container/Viewport.mjs';
|
|
7
7
|
|
|
@@ -4,7 +4,7 @@ import MainContainerController from './MainContainerController.mjs';
|
|
|
4
4
|
import MainStore from './MainStore.mjs';
|
|
5
5
|
import NumberField from '../../../src/form/field/Number.mjs';
|
|
6
6
|
import TextField from '../../../src/form/field/Text.mjs';
|
|
7
|
-
import Toolbar from '../../../src/
|
|
7
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
|
8
8
|
import Viewport from '../../../src/container/Viewport.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Button from '../../../src/button/Base.mjs';
|
|
2
2
|
import MainContainerController from './MainContainerController.mjs';
|
|
3
|
-
import Toolbar from '../../../src/
|
|
3
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
|
4
4
|
import Viewport from '../../../src/container/Viewport.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -3,7 +3,7 @@ import Container from '../../../src/container/Base.mjs';
|
|
|
3
3
|
import TextField from '../../../src/form/field/Text.mjs';
|
|
4
4
|
import TodoList from './TodoList.mjs';
|
|
5
5
|
import TodoListStore from './TodoListStore.mjs';
|
|
6
|
-
import Toolbar from '../../../src/
|
|
6
|
+
import Toolbar from '../../../src/toolbar/Base.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @class Neo.examples.todoList.version2.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 Paging Toolbar</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<script src="../../../src/MicroLoader.mjs" type="module"></script>
|
|
10
|
+
</body>
|
|
11
|
+
</html>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Model from '../../../../src/data/Model.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @class Neo.examples.toolbar.paging.model.User
|
|
5
|
+
* @extends Neo.data.Model
|
|
6
|
+
*/
|
|
7
|
+
class User extends Model {
|
|
8
|
+
static getConfig() {return {
|
|
9
|
+
/**
|
|
10
|
+
* @member {String} className='Neo.examples.toolbar.paging.model.User'
|
|
11
|
+
* @protected
|
|
12
|
+
*/
|
|
13
|
+
className: 'Neo.examples.toolbar.paging.model.User',
|
|
14
|
+
/**
|
|
15
|
+
* @member {Object[]} fields
|
|
16
|
+
*/
|
|
17
|
+
fields: [{
|
|
18
|
+
name: 'firstname',
|
|
19
|
+
type: 'String'
|
|
20
|
+
}, {
|
|
21
|
+
name: 'id',
|
|
22
|
+
type: 'Integer'
|
|
23
|
+
}, {
|
|
24
|
+
name: 'image',
|
|
25
|
+
type: 'String'
|
|
26
|
+
}, {
|
|
27
|
+
name: 'isOnline',
|
|
28
|
+
type: 'Boolean'
|
|
29
|
+
}, {
|
|
30
|
+
name: 'lastname',
|
|
31
|
+
type: 'String'
|
|
32
|
+
}]
|
|
33
|
+
}}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Neo.applyClassConfig(User);
|
|
37
|
+
|
|
38
|
+
export default User;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"namespace": "MyApp.backend",
|
|
3
|
+
"type" : "websocket",
|
|
4
|
+
"url" : "ws://localhost:3001",
|
|
5
|
+
|
|
6
|
+
"services": {
|
|
7
|
+
"FriendService": {
|
|
8
|
+
"methods": {
|
|
9
|
+
"getAll": {}
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"UserService": {
|
|
13
|
+
"methods": {
|
|
14
|
+
"create" : {},
|
|
15
|
+
"destroy": {},
|
|
16
|
+
"read" : {"params": [{"type": "Object"}]},
|
|
17
|
+
"update" : {}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import UserModel from '../model/User.mjs';
|
|
2
|
+
import Store from '../../../../src/data/Store.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @class Neo.examples.toolbar.paging.store.Users
|
|
6
|
+
* @extends Neo.data.Store
|
|
7
|
+
*/
|
|
8
|
+
class Users extends Store {
|
|
9
|
+
static getConfig() {return {
|
|
10
|
+
/**
|
|
11
|
+
* @member {String} className='Neo.examples.toolbar.paging.store.Users'
|
|
12
|
+
* @protected
|
|
13
|
+
*/
|
|
14
|
+
className: 'Neo.examples.toolbar.paging.store.Users',
|
|
15
|
+
/**
|
|
16
|
+
* @member {Object|String|null} api
|
|
17
|
+
*/
|
|
18
|
+
api: 'MyApp.backend.UserService',
|
|
19
|
+
/**
|
|
20
|
+
* @member {Boolean} autoLoad=true
|
|
21
|
+
*/
|
|
22
|
+
autoLoad: true,
|
|
23
|
+
/**
|
|
24
|
+
* @member {Neo.data.Model} model=UserModel
|
|
25
|
+
*/
|
|
26
|
+
model: UserModel,
|
|
27
|
+
/**
|
|
28
|
+
* @member {Object[]} sorters
|
|
29
|
+
*/
|
|
30
|
+
sorters: [{
|
|
31
|
+
direction: 'ASC',
|
|
32
|
+
property : 'id'
|
|
33
|
+
}]
|
|
34
|
+
}}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
Neo.applyClassConfig(Users);
|
|
38
|
+
|
|
39
|
+
export default Users;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import Dialog from '../../../../src/dialog/Base.mjs';
|
|
2
|
+
import TextField from '../../../../src/form/field/Text.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @class Neo.examples.toolbar.paging.view.AddUserDialog
|
|
6
|
+
* @extends Neo.dialog.Base
|
|
7
|
+
*/
|
|
8
|
+
class AddUserDialog extends Dialog {
|
|
9
|
+
static getConfig() {return {
|
|
10
|
+
/**
|
|
11
|
+
* @member {String} className='Neo.examples.toolbar.paging.view.AddUserDialog'
|
|
12
|
+
* @protected
|
|
13
|
+
*/
|
|
14
|
+
className: 'Neo.examples.toolbar.paging.view.AddUserDialog',
|
|
15
|
+
/**
|
|
16
|
+
* @member {Object} containerConfig={style:{padding:'1em'}}
|
|
17
|
+
*/
|
|
18
|
+
containerConfig: {
|
|
19
|
+
style: {
|
|
20
|
+
padding: '1em'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* @member {Object[]} headers
|
|
25
|
+
*/
|
|
26
|
+
headers: [{
|
|
27
|
+
cls : ['neo-footer-toolbar', 'neo-toolbar'],
|
|
28
|
+
dock : 'bottom',
|
|
29
|
+
items: ['->', {
|
|
30
|
+
text: 'Submit'
|
|
31
|
+
}]
|
|
32
|
+
}],
|
|
33
|
+
/**
|
|
34
|
+
* @member {Object[]} items
|
|
35
|
+
*/
|
|
36
|
+
items: [{
|
|
37
|
+
module : TextField,
|
|
38
|
+
flex : 'none',
|
|
39
|
+
labelText : 'Firstname:',
|
|
40
|
+
labelWidth: 110
|
|
41
|
+
}, {
|
|
42
|
+
module : TextField,
|
|
43
|
+
flex : 'none',
|
|
44
|
+
labelText : 'Lastname:',
|
|
45
|
+
labelWidth: 110
|
|
46
|
+
}],
|
|
47
|
+
/**
|
|
48
|
+
* @member {Boolean} resizable=false
|
|
49
|
+
*/
|
|
50
|
+
resizable: false,
|
|
51
|
+
/**
|
|
52
|
+
* @member {String} title='Edit User'
|
|
53
|
+
*/
|
|
54
|
+
title: 'Add User',
|
|
55
|
+
/**
|
|
56
|
+
* @member {Object} wrapperStyle={height:'300px',width:'400px'}
|
|
57
|
+
*/
|
|
58
|
+
wrapperStyle: {
|
|
59
|
+
height: '300px',
|
|
60
|
+
width : '400px'
|
|
61
|
+
}
|
|
62
|
+
}}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
Neo.applyClassConfig(AddUserDialog);
|
|
66
|
+
|
|
67
|
+
export default AddUserDialog;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import MainContainerController from './MainContainerController.mjs';
|
|
2
|
+
import MainContainerModel from './MainContainerModel.mjs';
|
|
3
|
+
import PagingToolbar from '../../../../src/toolbar/Paging.mjs';
|
|
4
|
+
import UserTableContainer from './UserTableContainer.mjs';
|
|
5
|
+
import Viewport from '../../../../src/container/Viewport.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class Neo.examples.toolbar.paging.view.MainContainer
|
|
9
|
+
* @extends Neo.container.Viewport
|
|
10
|
+
*/
|
|
11
|
+
class MainContainer extends Viewport {
|
|
12
|
+
static getConfig() {return {
|
|
13
|
+
className : 'Neo.examples.toolbar.paging.view.MainContainer',
|
|
14
|
+
autoMount : true,
|
|
15
|
+
controller: MainContainerController,
|
|
16
|
+
layout : {ntype: 'vbox', align: 'stretch'},
|
|
17
|
+
model : MainContainerModel,
|
|
18
|
+
style : {padding: '20px'},
|
|
19
|
+
|
|
20
|
+
items: [{
|
|
21
|
+
ntype: 'toolbar',
|
|
22
|
+
flex : 'none',
|
|
23
|
+
items: ['->', {
|
|
24
|
+
handler: 'onAddUserButtonClick',
|
|
25
|
+
iconCls: 'fa fa-circle-plus',
|
|
26
|
+
text : 'Add User'
|
|
27
|
+
}]
|
|
28
|
+
}, {
|
|
29
|
+
module : UserTableContainer,
|
|
30
|
+
bind : {store: 'stores.users'},
|
|
31
|
+
flex : 1,
|
|
32
|
+
reference : 'user-table',
|
|
33
|
+
wrapperStyle: {maxHeight: '300px'}
|
|
34
|
+
}, {
|
|
35
|
+
module: PagingToolbar,
|
|
36
|
+
bind : {store: 'stores.users'},
|
|
37
|
+
flex : 'none'
|
|
38
|
+
}]
|
|
39
|
+
}}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
Neo.applyClassConfig(MainContainer);
|
|
43
|
+
|
|
44
|
+
export default MainContainer;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import ComponentController from '../../../../src/controller/Component.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @class Neo.examples.toolbar.paging.view.MainContainerController
|
|
5
|
+
* @extends Neo.controller.Component
|
|
6
|
+
*/
|
|
7
|
+
class MainContainerController extends ComponentController {
|
|
8
|
+
/**
|
|
9
|
+
* @member {Neo.examples.toolbar.paging.view.AddUserDialog|null} addUserDialog=null
|
|
10
|
+
*/
|
|
11
|
+
addUserDialog = null
|
|
12
|
+
|
|
13
|
+
static getConfig() {return {
|
|
14
|
+
/**
|
|
15
|
+
* @member {String} className='Neo.examples.toolbar.paging.view.MainContainerController'
|
|
16
|
+
* @protected
|
|
17
|
+
*/
|
|
18
|
+
className: 'Neo.examples.toolbar.paging.view.MainContainerController'
|
|
19
|
+
}}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param {Object} data
|
|
23
|
+
*/
|
|
24
|
+
onAddUserButtonClick(data) {
|
|
25
|
+
let me = this;
|
|
26
|
+
|
|
27
|
+
if (!me.addUserDialog) {
|
|
28
|
+
import('./AddUserDialog.mjs').then(module => {
|
|
29
|
+
me.addUserDialog = Neo.create(module.default, {
|
|
30
|
+
animateTargetId: data.component.id,
|
|
31
|
+
appName : me.component.appName,
|
|
32
|
+
closeAction : 'hide'
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
} else {
|
|
36
|
+
me.addUserDialog.show();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Sending messages through a WebSocket inside the data worker
|
|
42
|
+
* @param {Object} data
|
|
43
|
+
*/
|
|
44
|
+
onUserServiceReadButtonClick(data) {
|
|
45
|
+
MyApp.backend.UserService.read().then(response => {
|
|
46
|
+
console.log(response);
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Neo.applyClassConfig(MainContainerController);
|
|
52
|
+
|
|
53
|
+
export default MainContainerController;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Component from '../../../../src/model/Component.mjs';
|
|
2
|
+
import UserStore from '../store/Users.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @class Neo.examples.toolbar.paging.view.MainContainerModel
|
|
6
|
+
* @extends Neo.model.Component
|
|
7
|
+
*/
|
|
8
|
+
class MainContainerModel extends Component {
|
|
9
|
+
static getConfig() {return {
|
|
10
|
+
/**
|
|
11
|
+
* @member {String} className='Neo.examples.toolbar.paging.view.MainContainerModel'
|
|
12
|
+
* @protected
|
|
13
|
+
*/
|
|
14
|
+
className: 'Neo.examples.toolbar.paging.view.MainContainerModel',
|
|
15
|
+
/**
|
|
16
|
+
* @member {Object} stores
|
|
17
|
+
*/
|
|
18
|
+
stores: {
|
|
19
|
+
users: {
|
|
20
|
+
module : UserStore,
|
|
21
|
+
pageSize: 30
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Neo.applyClassConfig(MainContainerModel);
|
|
28
|
+
|
|
29
|
+
export default MainContainerModel;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import TableContainer from '../../../../src/table/Container.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @class Neo.examples.toolbar.paging.view.UserTableContainer
|
|
5
|
+
* @extends Neo.table.Container
|
|
6
|
+
*/
|
|
7
|
+
class UserTableContainer extends TableContainer {
|
|
8
|
+
static getConfig() {return {
|
|
9
|
+
/**
|
|
10
|
+
* @member {String} className='Neo.examples.toolbar.paging.view.UserTableContainer'
|
|
11
|
+
* @protected
|
|
12
|
+
*/
|
|
13
|
+
className: 'Neo.examples.toolbar.paging.view.UserTableContainer',
|
|
14
|
+
/**
|
|
15
|
+
* @member {Object[]} columns
|
|
16
|
+
*/
|
|
17
|
+
columns: [{
|
|
18
|
+
dataField: 'id',
|
|
19
|
+
text : 'Id'
|
|
20
|
+
}, {
|
|
21
|
+
dataField: 'firstname',
|
|
22
|
+
text : 'Firstname'
|
|
23
|
+
}, {
|
|
24
|
+
dataField: 'lastname',
|
|
25
|
+
text : 'Lastname'
|
|
26
|
+
}, {
|
|
27
|
+
dataField: 'isOnline',
|
|
28
|
+
text : 'Is Online'
|
|
29
|
+
}, {
|
|
30
|
+
dataField: 'image',
|
|
31
|
+
flex : 1,
|
|
32
|
+
text : 'Image'
|
|
33
|
+
}]
|
|
34
|
+
}}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
Neo.applyClassConfig(UserTableContainer);
|
|
38
|
+
|
|
39
|
+
export default UserTableContainer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo.mjs",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.16",
|
|
4
4
|
"description": "The webworkers driven UI framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"homepage": "https://neomjs.github.io/pages/",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@fortawesome/fontawesome-free": "^6.1.1",
|
|
38
|
-
"@material/mwc-button": "^0.
|
|
39
|
-
"@material/mwc-textfield": "^0.
|
|
40
|
-
"autoprefixer": "^10.4.
|
|
38
|
+
"@material/mwc-button": "^0.26.0",
|
|
39
|
+
"@material/mwc-textfield": "^0.26.0",
|
|
40
|
+
"autoprefixer": "^10.4.7",
|
|
41
41
|
"chalk": "^5.0.1",
|
|
42
42
|
"clean-webpack-plugin": "^4.0.0",
|
|
43
43
|
"commander": "^9.2.0",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"envinfo": "^7.8.1",
|
|
46
46
|
"fs-extra": "^10.1.0",
|
|
47
47
|
"highlightjs-line-numbers.js": "^2.8.0",
|
|
48
|
-
"inquirer": "^8.2.
|
|
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.13",
|
|
52
|
+
"sass": "^1.51.0",
|
|
53
53
|
"webpack": "^5.72.0",
|
|
54
54
|
"webpack-cli": "^4.9.2",
|
|
55
|
-
"webpack-dev-server": "4.
|
|
55
|
+
"webpack-dev-server": "4.9.0",
|
|
56
56
|
"webpack-hook-plugin": "^1.0.7",
|
|
57
57
|
"webpack-node-externals": "^3.0.0"
|
|
58
58
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,7 +5,7 @@ import DateUtil from '../../util/Date.mjs';
|
|
|
5
5
|
import EditCalendarContainer from './calendars/EditContainer.mjs';
|
|
6
6
|
import EditEventContainer from './EditEventContainer.mjs';
|
|
7
7
|
import MainContainerModel from './MainContainerModel.mjs';
|
|
8
|
-
import Toolbar from '../../
|
|
8
|
+
import Toolbar from '../../toolbar/Base.mjs';
|
|
9
9
|
|
|
10
10
|
const todayDate = new Date();
|
|
11
11
|
|
|
@@ -446,10 +446,11 @@ class Component extends BaseComponent {
|
|
|
446
446
|
* @param {Boolean} oldValue
|
|
447
447
|
* @protected
|
|
448
448
|
*/
|
|
449
|
-
afterSetMounted(value, oldValue) {
|
|
449
|
+
async afterSetMounted(value, oldValue) {
|
|
450
450
|
super.afterSetMounted(value, oldValue);
|
|
451
451
|
|
|
452
|
-
let me = this
|
|
452
|
+
let me = this,
|
|
453
|
+
rect;
|
|
453
454
|
|
|
454
455
|
if (value) {
|
|
455
456
|
if (me.needsEventUpdate) {
|
|
@@ -457,16 +458,16 @@ class Component extends BaseComponent {
|
|
|
457
458
|
me.needsEventUpdate = false;
|
|
458
459
|
}
|
|
459
460
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}
|
|
461
|
+
await Neo.timeout(70);
|
|
462
|
+
|
|
463
|
+
rect = await me.getDomRect(me.getColumnContainer().id);
|
|
464
|
+
|
|
465
|
+
Neo.main.DomAccess.scrollBy({
|
|
466
|
+
appName : me.appName,
|
|
467
|
+
direction: 'left',
|
|
468
|
+
id : me.getScrollContainer().id,
|
|
469
|
+
value : rect.width * me.columnsBuffer / me.columnsVisible / 3
|
|
470
|
+
});
|
|
470
471
|
}
|
|
471
472
|
}
|
|
472
473
|
|
|
@@ -1001,7 +1002,7 @@ class Component extends BaseComponent {
|
|
|
1001
1002
|
removeDom
|
|
1002
1003
|
});
|
|
1003
1004
|
|
|
1004
|
-
Object.assign(header.cn[i],
|
|
1005
|
+
Object.assign(header.cn[i], {id: headerId, removeDom});
|
|
1005
1006
|
Object.assign(header.cn[i].cn[0], {html: me.intlFormat_day.format(date), id: `${headerId}_day`});
|
|
1006
1007
|
Object.assign(header.cn[i].cn[1], {cls: dateCls, html: currentDate, id: `${headerId}_date`});
|
|
1007
1008
|
}
|