neo.mjs 7.7.0 → 7.9.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/portal/index.html +1 -1
- package/apps/portal/neo-config.json +1 -0
- package/apps/portal/view/ViewportController.mjs +20 -4
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/portal/view/learn/{ContentView.mjs → ContentComponent.mjs} +98 -38
- package/apps/portal/view/learn/CubeLayoutButton.mjs +77 -0
- package/apps/portal/view/learn/MainContainerController.mjs +2 -1
- package/apps/portal/view/learn/PageContainer.mjs +4 -4
- package/apps/shareddialog/view/DemoDialog.mjs +2 -10
- package/apps/shareddialog/view/MainContainerController.mjs +107 -105
- package/buildScripts/webpack/json/myApps.template.json +1 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/table/nestedRecordFields/EditUserDialog.mjs +127 -0
- package/examples/table/nestedRecordFields/MainContainer.mjs +113 -0
- package/examples/table/nestedRecordFields/MainContainerModel.mjs +61 -0
- package/examples/table/nestedRecordFields/MainModel.mjs +41 -0
- package/examples/table/nestedRecordFields/MainStore.mjs +54 -0
- package/examples/table/nestedRecordFields/app.mjs +6 -0
- package/examples/table/nestedRecordFields/index.html +11 -0
- package/examples/table/nestedRecordFields/neo-config.json +6 -0
- package/package.json +4 -4
- package/resources/data/deck/learnneo/pages/Welcome.md +1 -1
- package/resources/data/deck/learnneo/pages/benefits/FormsEngine.md +1 -1
- package/resources/data/deck/learnneo/pages/guides/PortalApp.md +35 -0
- package/resources/data/deck/learnneo/tree.json +1 -0
- package/resources/scss/src/apps/portal/learn/PageContainer.scss +5 -0
- package/src/DefaultConfig.mjs +2 -2
- package/src/collection/Base.mjs +4 -3
- package/src/container/Base.mjs +12 -7
- package/src/data/Model.mjs +0 -7
- package/src/data/RecordFactory.mjs +82 -61
- package/src/data/Store.mjs +7 -0
- package/src/draggable/DragProxyComponent.mjs +10 -20
- package/src/form/field/CheckBox.mjs +12 -7
- package/src/form/field/ComboBox.mjs +8 -7
- package/src/grid/View.mjs +2 -2
- package/src/list/Base.mjs +1 -1
- package/src/main/addon/Navigator.mjs +34 -32
- package/src/main/addon/WindowPosition.mjs +9 -11
- package/src/model/Component.mjs +10 -1
- package/src/plugin/Resizable.mjs +12 -6
- package/src/tab/Container.mjs +5 -1
- package/src/table/View.mjs +31 -15
- package/src/table/header/Button.mjs +33 -18
- package/test/siesta/siesta.js +1 -0
- package/test/siesta/tests/ManagerInstance.mjs +35 -0
- package/apps/krausest/README.md +0 -3
- package/apps/krausest/TableCollection.mjs +0 -46
- package/apps/krausest/app.mjs +0 -8
- package/apps/krausest/css/currentStyle.css +0 -2
- package/apps/krausest/css/main.css +0 -26
- package/apps/krausest/index.html +0 -12
- package/apps/krausest/neo-config.json +0 -10
- package/apps/krausest/view/MainComponent.mjs +0 -122
- package/apps/krausest/view/MainComponentController.mjs +0 -33
- package/apps/krausest/view/TableComponent.mjs +0 -152
- /package/resources/scss/src/apps/portal/learn/{ContentView.scss → ContentComponent.scss} +0 -0
@@ -1,33 +0,0 @@
|
|
1
|
-
import ComponentController from '../../../src/controller/Component.mjs';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @class NeoApp.view.MainComponentController
|
5
|
-
* @extends Neo.controller.Component
|
6
|
-
*/
|
7
|
-
class MainComponentController extends ComponentController {
|
8
|
-
static config = {
|
9
|
-
/**
|
10
|
-
* @member {String} className='NeoApp.view.MainComponentController'
|
11
|
-
* @protected
|
12
|
-
*/
|
13
|
-
className: 'NeoApp.view.MainComponentController'
|
14
|
-
}
|
15
|
-
|
16
|
-
/**
|
17
|
-
* @param {Object} data
|
18
|
-
*/
|
19
|
-
onButtonClick(data) {
|
20
|
-
let me = this,
|
21
|
-
table = me.getReference('table');
|
22
|
-
|
23
|
-
switch (data.path[0].id) {
|
24
|
-
case 'add' : table.add(); break;
|
25
|
-
case 'clear' : table.clear(); break;
|
26
|
-
case 'runlots': table.runlots(); break;
|
27
|
-
}
|
28
|
-
|
29
|
-
// console.log(data.path[0].id);
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
export default Neo.setupClass(MainComponentController);
|
@@ -1,152 +0,0 @@
|
|
1
|
-
import Base from '../../../src/component/Base.mjs';
|
2
|
-
import ClassSystemUtil from '../../../src/util/ClassSystem.mjs';
|
3
|
-
import TableCollection from '../TableCollection.mjs';
|
4
|
-
|
5
|
-
function _random(max) {
|
6
|
-
return Math.round(Math.random()*1000)%max;
|
7
|
-
}
|
8
|
-
|
9
|
-
/**
|
10
|
-
* @class NeoApp.view.TableComponent
|
11
|
-
* @extends Neo.component.Base
|
12
|
-
*/
|
13
|
-
class TableComponent extends Base {
|
14
|
-
static config = {
|
15
|
-
/**
|
16
|
-
* @member {String} className='NeoApp.view.TableComponent'
|
17
|
-
* @protected
|
18
|
-
*/
|
19
|
-
className: 'NeoApp.view.TableComponent',
|
20
|
-
/**
|
21
|
-
* @member {String[]} baseCls=['table','table-hover','table-striped','test-data']
|
22
|
-
*/
|
23
|
-
baseCls: ['table', 'table-hover', 'table-striped', 'test-data'],
|
24
|
-
/**
|
25
|
-
* @member {NeoApp.TableCollection|null} store_=TableCollection
|
26
|
-
*/
|
27
|
-
store_: TableCollection,
|
28
|
-
/**
|
29
|
-
* @member {Object} _vdom
|
30
|
-
*/
|
31
|
-
_vdom:
|
32
|
-
{tag: 'table', cn: [
|
33
|
-
{tag: 'tbody', id: 'tbody', cn: []}
|
34
|
-
]}
|
35
|
-
}
|
36
|
-
|
37
|
-
/**
|
38
|
-
* @param {Object} config
|
39
|
-
*/
|
40
|
-
construct(config) {
|
41
|
-
super.construct(config);
|
42
|
-
|
43
|
-
Neo.main.addon.CloneNode.createNode({
|
44
|
-
id : this.id,
|
45
|
-
tag : 'tr',
|
46
|
-
html: [
|
47
|
-
'<td class="col-md-1"></td>',
|
48
|
-
'<td class="col-md-4"><a class="lbl"></a></td>',
|
49
|
-
'<td class="col-md-1"><a class="remove"><span class="remove glyphicon glyphicon-remove" aria-hidden="true"></span></a></td>',
|
50
|
-
'<td class="col-md-6"></td>'
|
51
|
-
].join(''),
|
52
|
-
paths: {
|
53
|
-
id : '0',
|
54
|
-
label: '1/0'
|
55
|
-
}
|
56
|
-
});
|
57
|
-
}
|
58
|
-
|
59
|
-
/**
|
60
|
-
*
|
61
|
-
*/
|
62
|
-
add() {
|
63
|
-
let me = this,
|
64
|
-
store = me.store,
|
65
|
-
items = store.buildData();
|
66
|
-
|
67
|
-
store.add(items);
|
68
|
-
|
69
|
-
Neo.main.addon.CloneNode.applyClones({
|
70
|
-
data : items,
|
71
|
-
id : me.id,
|
72
|
-
parentId: 'tbody'
|
73
|
-
});
|
74
|
-
|
75
|
-
// this works pretty fast as well
|
76
|
-
/*items.forEach(item => {
|
77
|
-
me.vdom.cn[0].cn.push(me.createTableRow(item));
|
78
|
-
});
|
79
|
-
|
80
|
-
me.update();*/
|
81
|
-
}
|
82
|
-
|
83
|
-
/**
|
84
|
-
* Triggered before the store config gets changed.
|
85
|
-
* @param {Object|Neo.data.Store} value
|
86
|
-
* @param {Object|Neo.data.Store} oldValue
|
87
|
-
* @returns {Neo.data.Store}
|
88
|
-
* @protected
|
89
|
-
*/
|
90
|
-
beforeSetStore(value, oldValue) {
|
91
|
-
oldValue && oldValue.destroy();
|
92
|
-
return ClassSystemUtil.beforeSetInstance(value);
|
93
|
-
}
|
94
|
-
|
95
|
-
/**
|
96
|
-
*
|
97
|
-
*/
|
98
|
-
clear() {
|
99
|
-
let me = this,
|
100
|
-
store = me.store;
|
101
|
-
|
102
|
-
if (store.getCount() > 0) {
|
103
|
-
store.clear();
|
104
|
-
Neo.applyDeltas(me.appName, {
|
105
|
-
action: 'setTextContent',
|
106
|
-
id : 'tbody',
|
107
|
-
value : ''
|
108
|
-
});
|
109
|
-
}
|
110
|
-
}
|
111
|
-
|
112
|
-
/**
|
113
|
-
* @param {Object} data
|
114
|
-
* @param {Number} data.id
|
115
|
-
* @param {String} data.label
|
116
|
-
* @returns {Object}
|
117
|
-
*/
|
118
|
-
createTableRow(data) {
|
119
|
-
return {tag: 'tr', cn: [
|
120
|
-
{tag: 'td', cls: ['col-md-1'], html: data.id},
|
121
|
-
{tag: 'td', cls: ['col-md-4'], cn: [
|
122
|
-
{tag: 'a', cls: ['lbl'], html: data.label}
|
123
|
-
]},
|
124
|
-
{tag: 'td', cls: ['col-md-1'], cn: [
|
125
|
-
{tag: 'a', cls: ['remove'], cn: [
|
126
|
-
{tag: 'span', cls: ['remove', 'glyphicon', 'glyphicon-remove'], 'aria-hidden': true}
|
127
|
-
]}
|
128
|
-
]},
|
129
|
-
{tag: 'td', cls: ['col-md-6']}
|
130
|
-
]};
|
131
|
-
}
|
132
|
-
|
133
|
-
/**
|
134
|
-
*
|
135
|
-
*/
|
136
|
-
runlots() {
|
137
|
-
let me = this,
|
138
|
-
store = me.store,
|
139
|
-
items = store.buildData(10000);
|
140
|
-
|
141
|
-
me.clear();
|
142
|
-
store.add(items);
|
143
|
-
|
144
|
-
Neo.main.addon.CloneNode.applyClones({
|
145
|
-
data : items,
|
146
|
-
id : me.id,
|
147
|
-
parentId: 'tbody'
|
148
|
-
});
|
149
|
-
}
|
150
|
-
}
|
151
|
-
|
152
|
-
export default Neo.setupClass(TableComponent);
|
File without changes
|