neo.mjs 7.10.0 → 7.11.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/resources/data/examples_devmode.json +24 -17
- package/apps/portal/resources/data/examples_dist_dev.json +24 -17
- package/apps/portal/resources/data/examples_dist_prod.json +24 -17
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/component/multiWindowCoronaGallery/ViewportController.mjs +9 -2
- package/examples/component/multiWindowHelix/ViewportController.mjs +9 -2
- package/examples/dialog/MainContainer.mjs +39 -31
- package/examples/tablePerformance/MainContainer.mjs +48 -28
- package/examples/tablePerformance/MainContainer2.mjs +48 -27
- package/examples/tablePerformance/MainContainer3.mjs +48 -27
- package/examples/tablePerformance/Viewport.mjs +21 -0
- package/package.json +1 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/filter/DateContainer.mjs +3 -3
- package/src/manager/_export.mjs +1 -2
- package/src/table/Container.mjs +9 -53
- package/src/table/View.mjs +2 -2
- package/src/table/header/Button.mjs +1 -0
- package/src/worker/Data.mjs +6 -7
- package/src/manager/Store.mjs +0 -84
package/apps/ServiceWorker.mjs
CHANGED
@@ -1,85 +1,92 @@
|
|
1
1
|
[{
|
2
|
-
"id" :
|
2
|
+
"id" : 23,
|
3
3
|
"image" : "devmode/sharedcovid.png",
|
4
4
|
"name" : "Multi Window Covid App",
|
5
5
|
"sharedWorkers": true,
|
6
6
|
"sourceUrl" : "apps/sharedcovid",
|
7
7
|
"url" : "apps/sharedcovid/index.html#mainview=table"
|
8
8
|
}, {
|
9
|
-
"id" :
|
9
|
+
"id" : 22,
|
10
10
|
"image" : "devmode/calendar-preview.png",
|
11
11
|
"name" : "Calendar",
|
12
12
|
"sourceUrl": "src/calendar",
|
13
13
|
"url" : "examples/calendar/basic/index.html"
|
14
14
|
}, {
|
15
|
-
"id" :
|
15
|
+
"id" : 21,
|
16
16
|
"image" : "devmode/helix.png",
|
17
17
|
"name" : "component.Helix",
|
18
18
|
"sourceUrl": "examples/component/helix",
|
19
19
|
"url" : "examples/component/helix/index.html"
|
20
20
|
}, {
|
21
|
-
"id"
|
22
|
-
"image"
|
23
|
-
"name"
|
24
|
-
"
|
25
|
-
"
|
21
|
+
"id" : 20,
|
22
|
+
"image" : "devmode/mwCoronaGallery.png",
|
23
|
+
"name" : "Multi Window Covid Gallery",
|
24
|
+
"sharedWorkers": true,
|
25
|
+
"sourceUrl" : "examples/component/multiWindowCoronaGallery",
|
26
|
+
"url" : "examples/component/multiWindowCoronaGallery/index.html"
|
26
27
|
}, {
|
27
|
-
"id" :
|
28
|
+
"id" : 19,
|
28
29
|
"image" : "devmode/offscreenCanvas.png",
|
29
30
|
"name" : "OffscreenCanvas",
|
30
31
|
"sourceUrl": "https://github.com/neomjs/offscreen-canvas/",
|
31
32
|
"url" : "https://neomjs.github.io/pages2/workspace/neo-offscreen-canvas-demo/apps/myapp/index.html"
|
32
33
|
}, {
|
33
|
-
"id" :
|
34
|
+
"id" : 18,
|
34
35
|
"image" : "devmode/sharedOffscreenCanvas.png",
|
35
36
|
"name" : "Multi-Window OffscreenCanvas",
|
36
37
|
"sourceUrl" : "https://github.com/neomjs/shared-offscreen",
|
37
38
|
"sharedWorkers": true,
|
38
39
|
"url" : "https://neomjs.github.io/pages2/workspace/neo-shared-offscreen-canvas-demo/apps/mainapp/index.html"
|
39
40
|
}, {
|
40
|
-
"id" :
|
41
|
+
"id" : 17,
|
41
42
|
"image" : "devmode/multi_window_dd.png",
|
42
43
|
"name" : "Multi-Window Drag&Drop",
|
43
44
|
"sharedWorkers": true,
|
44
45
|
"sourceUrl" : "apps/shareddialog",
|
45
46
|
"url" : "apps/shareddialog/index.html"
|
46
47
|
}, {
|
47
|
-
"id" :
|
48
|
+
"id" : 16,
|
48
49
|
"image" : "devmode/tabContainer.png",
|
49
50
|
"name" : "tab.Container",
|
50
51
|
"sourceUrl": "examples/tab/container",
|
51
52
|
"url" : "examples/tab/container/index.html"
|
52
53
|
}, {
|
53
|
-
"id" :
|
54
|
+
"id" : 15,
|
54
55
|
"image" : "devmode/model-component-example.png",
|
55
56
|
"name" : "View Models Example",
|
56
57
|
"sourceUrl": "examples/model/advanced",
|
57
58
|
"url" : "examples/model/advanced/index.html"
|
58
59
|
}, {
|
59
|
-
"id" :
|
60
|
+
"id" : 14,
|
60
61
|
"image" : "devmode/dragdrop.png",
|
61
62
|
"name" : "Dialog drag&drop",
|
62
63
|
"sourceUrl": "examples/dialog",
|
63
64
|
"url" : "examples/dialog/"
|
64
65
|
}, {
|
65
|
-
"id" :
|
66
|
+
"id" : 13,
|
66
67
|
"image" : "dist_prod/colorsApp.png",
|
67
68
|
"name" : "Colors Dashboard",
|
68
69
|
"sharedWorkers": true,
|
69
70
|
"sourceUrl" : "apps/colors",
|
70
71
|
"url" : "apps/colors/index.html"
|
71
72
|
}, {
|
72
|
-
"id" :
|
73
|
+
"id" : 12,
|
73
74
|
"image" : "devmode/covidDashboard.png",
|
74
75
|
"name" : "Covid Dashboard",
|
75
76
|
"sourceUrl": "apps/covid",
|
76
77
|
"url" : "apps/covid/index.html"
|
77
78
|
}, {
|
78
|
-
"id" :
|
79
|
+
"id" : 11,
|
79
80
|
"image" : "devmode/coronaHelix.png",
|
80
81
|
"name" : "COVID-19 Helix",
|
81
82
|
"sourceUrl": "examples/component/coronaHelix",
|
82
83
|
"url" : "examples/component/coronaHelix/index.html"
|
84
|
+
}, {
|
85
|
+
"id" : 10,
|
86
|
+
"image" : "devmode/coronaGallery.png",
|
87
|
+
"name" : "COVID-19 Gallery",
|
88
|
+
"sourceUrl": "examples/component/coronaGallery",
|
89
|
+
"url" : "examples/component/coronaGallery/index.html"
|
83
90
|
}, {
|
84
91
|
"id" : 9,
|
85
92
|
"image" : "devmode/gallery.png",
|
@@ -1,85 +1,92 @@
|
|
1
1
|
[{
|
2
|
-
"id" :
|
2
|
+
"id" : 22,
|
3
3
|
"image" : "devmode/sharedcovid.png",
|
4
4
|
"name" : "Multi Window Covid App",
|
5
5
|
"sharedWorkers": true,
|
6
6
|
"sourceUrl" : "apps/sharedcovid",
|
7
7
|
"url" : "dist/development/apps/sharedcovid/index.html#mainview=table"
|
8
8
|
}, {
|
9
|
-
"id" :
|
9
|
+
"id" : 21,
|
10
10
|
"image" : "devmode/calendar-preview.png",
|
11
11
|
"name" : "Calendar",
|
12
12
|
"sourceUrl": "src/calendar",
|
13
13
|
"url" : "dist/development/examples/calendar/basic/index.html"
|
14
14
|
}, {
|
15
|
-
"id" :
|
15
|
+
"id" : 20,
|
16
16
|
"image" : "devmode/helix.png",
|
17
17
|
"name" : "component.Helix",
|
18
18
|
"sourceUrl": "examples/component/helix",
|
19
19
|
"url" : "dist/development/examples/component/helix/index.html"
|
20
20
|
}, {
|
21
|
-
"id"
|
22
|
-
"image"
|
23
|
-
"name"
|
24
|
-
"
|
25
|
-
"
|
21
|
+
"id" : 19,
|
22
|
+
"image" : "devmode/mwCoronaGallery.png",
|
23
|
+
"name" : "Multi Window Covid Gallery",
|
24
|
+
"sharedWorkers": true,
|
25
|
+
"sourceUrl" : "examples/component/multiWindowCoronaGallery",
|
26
|
+
"url" : "dist/development/examples/component/multiWindowCoronaGallery/index.html"
|
26
27
|
}, {
|
27
|
-
"id" :
|
28
|
+
"id" : 18,
|
28
29
|
"image" : "devmode/offscreenCanvas.png",
|
29
30
|
"name" : "OffscreenCanvas",
|
30
31
|
"sourceUrl": "https://github.com/neomjs/offscreen-canvas/tree/main/apps/myapp",
|
31
32
|
"url" : "https://neomjs.github.io/pages2/workspace/neo-offscreen-canvas-demo/dist/development/apps/myapp/index.html"
|
32
33
|
}, {
|
33
|
-
"id" :
|
34
|
+
"id" : 17,
|
34
35
|
"image" : "devmode/sharedOffscreenCanvas.png",
|
35
36
|
"name" : "Multi-Window OffscreenCanvas",
|
36
37
|
"sharedWorkers": true,
|
37
38
|
"sourceUrl" : "https://github.com/neomjs/shared-offscreen",
|
38
39
|
"url" : "https://neomjs.github.io/pages2/workspace/neo-shared-offscreen-canvas-demo/dist/development/apps/mainapp/index.html"
|
39
40
|
}, {
|
40
|
-
"id" :
|
41
|
+
"id" : 16,
|
41
42
|
"image" : "devmode/multi_window_dd.png",
|
42
43
|
"name" : "Multi-Window Drag&Drop",
|
43
44
|
"sharedWorkers": true,
|
44
45
|
"sourceUrl" : "apps/shareddialog",
|
45
46
|
"url" : "dist/development/apps/shareddialog/index.html"
|
46
47
|
}, {
|
47
|
-
"id" :
|
48
|
+
"id" : 15,
|
48
49
|
"image" : "devmode/tabContainer.png",
|
49
50
|
"name" : "tab.Container",
|
50
51
|
"sourceUrl": "examples/tab/container",
|
51
52
|
"url" : "dist/development/examples/tab/container/index.html"
|
52
53
|
}, {
|
53
|
-
"id" :
|
54
|
+
"id" : 14,
|
54
55
|
"image" : "devmode/model-component-example.png",
|
55
56
|
"name" : "View Models Example",
|
56
57
|
"sourceUrl": "examples/model/advanced",
|
57
58
|
"url" : "dist/development/examples/model/advanced/index.html"
|
58
59
|
}, {
|
59
|
-
"id" :
|
60
|
+
"id" : 13,
|
60
61
|
"image" : "devmode/dragdrop.png",
|
61
62
|
"name" : "Dialog drag&drop",
|
62
63
|
"sourceUrl": "examples/dialog",
|
63
64
|
"url" : "dist/development/examples/dialog/"
|
64
65
|
}, {
|
65
|
-
"id" :
|
66
|
+
"id" : 12,
|
66
67
|
"image" : "dist_prod/colorsApp.png",
|
67
68
|
"name" : "Colors Dashboard",
|
68
69
|
"sharedWorkers": true,
|
69
70
|
"sourceUrl" : "apps/colors",
|
70
71
|
"url" : "dist/development/apps/colors/index.html"
|
71
72
|
}, {
|
72
|
-
"id" :
|
73
|
+
"id" : 11,
|
73
74
|
"image" : "devmode/covidDashboard.png",
|
74
75
|
"name" : "Covid Dashboard",
|
75
76
|
"sourceUrl": "apps/covid",
|
76
77
|
"url" : "dist/development/apps/covid/index.html#mainview=table"
|
77
78
|
}, {
|
78
|
-
"id" :
|
79
|
+
"id" : 10,
|
79
80
|
"image" : "devmode/coronaHelix.png",
|
80
81
|
"name" : "COVID-19 Helix",
|
81
82
|
"sourceUrl": "examples/component/coronaHelix",
|
82
83
|
"url" : "dist/development/examples/component/coronaHelix/index.html"
|
84
|
+
}, {
|
85
|
+
"id" : 9,
|
86
|
+
"image" : "devmode/coronaGallery.png",
|
87
|
+
"name" : "COVID-19 Gallery",
|
88
|
+
"sourceUrl": "examples/component/coronaGallery",
|
89
|
+
"url" : "dist/development/examples/component/coronaGallery/index.html"
|
83
90
|
}, {
|
84
91
|
"id" : 8,
|
85
92
|
"image" : "devmode/gallery.png",
|
@@ -1,85 +1,92 @@
|
|
1
1
|
[{
|
2
|
-
"id" :
|
2
|
+
"id" : 22,
|
3
3
|
"image" : "devmode/sharedcovid.png",
|
4
4
|
"name" : "Multi Window Covid App",
|
5
5
|
"sharedWorkers": true,
|
6
6
|
"sourceUrl" : "apps/sharedcovid",
|
7
7
|
"url" : "dist/production/apps/sharedcovid/index.html#mainview=table"
|
8
8
|
}, {
|
9
|
-
"id" :
|
9
|
+
"id" : 21,
|
10
10
|
"image" : "devmode/calendar-preview.png",
|
11
11
|
"name" : "Calendar",
|
12
12
|
"sourceUrl": "src/calendar",
|
13
13
|
"url" : "dist/production/examples/calendar/basic/index.html"
|
14
14
|
}, {
|
15
|
-
"id" :
|
15
|
+
"id" : 20,
|
16
16
|
"image" : "devmode/helix.png",
|
17
17
|
"name" : "component.Helix",
|
18
18
|
"sourceUrl": "examples/component/helix",
|
19
19
|
"url" : "dist/production/examples/component/helix/index.html"
|
20
20
|
}, {
|
21
|
-
"id"
|
22
|
-
"image"
|
23
|
-
"name"
|
24
|
-
"
|
25
|
-
"
|
21
|
+
"id" : 19,
|
22
|
+
"image" : "devmode/mwCoronaGallery.png",
|
23
|
+
"name" : "Multi Window Covid Gallery",
|
24
|
+
"sharedWorkers": true,
|
25
|
+
"sourceUrl" : "examples/component/multiWindowCoronaGallery",
|
26
|
+
"url" : "dist/production/examples/component/multiWindowCoronaGallery/index.html"
|
26
27
|
}, {
|
27
|
-
"id" :
|
28
|
+
"id" : 18,
|
28
29
|
"image" : "devmode/offscreenCanvas.png",
|
29
30
|
"name" : "OffscreenCanvas",
|
30
31
|
"sourceUrl": "https://github.com/neomjs/offscreen-canvas/tree/main/apps/myapp",
|
31
32
|
"url" : "https://neomjs.github.io/pages2/workspace/neo-offscreen-canvas-demo/dist/production/apps/myapp/index.html"
|
32
33
|
}, {
|
33
|
-
"id" :
|
34
|
+
"id" : 17,
|
34
35
|
"image" : "devmode/sharedOffscreenCanvas.png",
|
35
36
|
"name" : "Multi-Window OffscreenCanvas",
|
36
37
|
"sharedWorkers": true,
|
37
38
|
"sourceUrl" : "https://github.com/neomjs/shared-offscreen",
|
38
39
|
"url" : "https://neomjs.github.io/pages2/workspace/neo-shared-offscreen-canvas-demo/dist/production/apps/mainapp/index.html"
|
39
40
|
}, {
|
40
|
-
"id" :
|
41
|
+
"id" : 16,
|
41
42
|
"image" : "devmode/multi_window_dd.png",
|
42
43
|
"name" : "Multi-Window Drag&Drop",
|
43
44
|
"sharedWorkers": true,
|
44
45
|
"sourceUrl" : "apps/shareddialog",
|
45
46
|
"url" : "dist/production/apps/shareddialog/index.html"
|
46
47
|
}, {
|
47
|
-
"id" :
|
48
|
+
"id" : 15,
|
48
49
|
"image" : "devmode/tabContainer.png",
|
49
50
|
"name" : "tab.Container",
|
50
51
|
"sourceUrl": "examples/tab/container",
|
51
52
|
"url" : "dist/production/examples/tab/container/index.html"
|
52
53
|
}, {
|
53
|
-
"id" :
|
54
|
+
"id" : 14,
|
54
55
|
"image" : "devmode/model-component-example.png",
|
55
56
|
"name" : "View Models Example",
|
56
57
|
"sourceUrl": "examples/model/advanced",
|
57
58
|
"url" : "dist/production/examples/model/advanced/index.html"
|
58
59
|
}, {
|
59
|
-
"id" :
|
60
|
+
"id" : 13,
|
60
61
|
"image" : "devmode/dragdrop.png",
|
61
62
|
"name" : "Dialog drag&drop",
|
62
63
|
"sourceUrl": "examples/dialog",
|
63
64
|
"url" : "dist/production/examples/dialog/"
|
64
65
|
}, {
|
65
|
-
"id" :
|
66
|
+
"id" : 12,
|
66
67
|
"image" : "dist_prod/colorsApp.png",
|
67
68
|
"name" : "Colors Dashboard",
|
68
69
|
"sharedWorkers": true,
|
69
70
|
"sourceUrl" : "apps/colors",
|
70
71
|
"url" : "dist/production/apps/colors/index.html"
|
71
72
|
}, {
|
72
|
-
"id" :
|
73
|
+
"id" : 11,
|
73
74
|
"image" : "devmode/covidDashboard.png",
|
74
75
|
"name" : "Covid Dashboard",
|
75
76
|
"sourceUrl": "apps/covid",
|
76
77
|
"url" : "dist/production/apps/covid/index.html#mainview=table"
|
77
78
|
}, {
|
78
|
-
"id" :
|
79
|
+
"id" : 10,
|
79
80
|
"image" : "devmode/coronaHelix.png",
|
80
81
|
"name" : "COVID-19 Helix",
|
81
82
|
"sourceUrl": "examples/component/coronaHelix",
|
82
83
|
"url" : "dist/production/examples/component/coronaHelix/index.html"
|
84
|
+
}, {
|
85
|
+
"id" : 9,
|
86
|
+
"image" : "devmode/coronaGallery.png",
|
87
|
+
"name" : "COVID-19 Gallery",
|
88
|
+
"sourceUrl": "examples/component/coronaGallery",
|
89
|
+
"url" : "dist/production/examples/component/coronaGallery/index.html"
|
83
90
|
}, {
|
84
91
|
"id" : 8,
|
85
92
|
"image" : "devmode/gallery.png",
|
@@ -37,9 +37,16 @@ class ViewportController extends Controller {
|
|
37
37
|
basePath = `${basePath + environment}/`
|
38
38
|
}
|
39
39
|
|
40
|
-
height
|
40
|
+
height += 1; // popup header in Chrome => height + 1, top -63
|
41
41
|
left += (width + winData.screenLeft);
|
42
|
-
top += (winData.outerHeight - winData.innerHeight + winData.screenTop);
|
42
|
+
top += (winData.outerHeight - winData.innerHeight + winData.screenTop - 63);
|
43
|
+
|
44
|
+
// Mounted inside a code.LivePreview, the popup header should be within the content (height-wise)
|
45
|
+
// See: https://github.com/neomjs/neo/issues/5991
|
46
|
+
if (me.component.up('live-preview')) {
|
47
|
+
height -= 63;
|
48
|
+
top += 63;
|
49
|
+
}
|
43
50
|
|
44
51
|
/*
|
45
52
|
* For this demo, the url './childapp/' would be sufficient.
|
@@ -37,9 +37,16 @@ class ViewportController extends Controller {
|
|
37
37
|
basePath = `${basePath + environment}/`
|
38
38
|
}
|
39
39
|
|
40
|
-
height
|
40
|
+
height += 1; // popup header in Chrome => height + 1, top -63
|
41
41
|
left += (width + winData.screenLeft);
|
42
|
-
top += (winData.outerHeight - winData.innerHeight + winData.screenTop);
|
42
|
+
top += (winData.outerHeight - winData.innerHeight + winData.screenTop - 63);
|
43
|
+
|
44
|
+
// Mounted inside a code.LivePreview, the popup header should be within the content (height-wise)
|
45
|
+
// See: https://github.com/neomjs/neo/issues/5991
|
46
|
+
if (me.component.up('live-preview')) {
|
47
|
+
height -= 63;
|
48
|
+
top += 63;
|
49
|
+
}
|
43
50
|
|
44
51
|
/*
|
45
52
|
* For this demo, the url './childapp/' would be sufficient.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import Button from '../../src/button/Base.mjs';
|
2
2
|
import CheckBox from '../../src/form/field/CheckBox.mjs';
|
3
|
+
import DemoDialog from './DemoDialog.mjs';
|
3
4
|
import NeoArray from '../../src/util/Array.mjs';
|
4
5
|
import Toolbar from '../../src/toolbar/Base.mjs';
|
5
|
-
import DemoDialog from './DemoDialog.mjs';
|
6
6
|
import Viewport from '../../src/container/Viewport.mjs';
|
7
7
|
|
8
8
|
/**
|
@@ -11,37 +11,33 @@ import Viewport from '../../src/container/Viewport.mjs';
|
|
11
11
|
*/
|
12
12
|
class MainContainer extends Viewport {
|
13
13
|
static config = {
|
14
|
+
/**
|
15
|
+
* @member {String} className='Neo.examples.dialog.MainContainer'
|
16
|
+
* @protected
|
17
|
+
*/
|
14
18
|
className: 'Neo.examples.dialog.MainContainer',
|
15
|
-
layout : 'base',
|
16
|
-
style : {padding: '20px'},
|
17
19
|
/**
|
18
|
-
*
|
19
|
-
*
|
20
|
-
* @member {String|null} boundaryContainerId='document.body'
|
20
|
+
* We are not using a container layout here
|
21
|
+
* @member {String} layout='base'
|
21
22
|
*/
|
22
|
-
|
23
|
+
layout: 'base',
|
23
24
|
/**
|
24
|
-
*
|
25
|
-
* @member {Neo.dialog.Base|null} dialog=null
|
25
|
+
* @member {Object} style={padding:'20px'}
|
26
26
|
*/
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
let me = this;
|
37
|
-
|
38
|
-
me.items = [{
|
39
|
-
html : '<h3>The dialog is invoked from the "Create Dialog" button</h3><h1>Hide it by pressing the ESCAPE key. The button will be refocused</h1>'
|
27
|
+
style: {padding: '20px'},
|
28
|
+
/**
|
29
|
+
* @member {Object[]} items
|
30
|
+
*/
|
31
|
+
items: [{
|
32
|
+
html: [
|
33
|
+
'<h3>The dialog is invoked from the "Create Dialog" button</h3>',
|
34
|
+
'<h1>Hide it by pressing the ESCAPE key. The button will be refocused</h1>'
|
35
|
+
].join('')
|
40
36
|
}, {
|
41
37
|
module: Toolbar,
|
42
|
-
items :[{
|
38
|
+
items : [{
|
43
39
|
module : Button,
|
44
|
-
handler :
|
40
|
+
handler : 'up.createDialog',
|
45
41
|
iconCls : 'fa fa-window-maximize',
|
46
42
|
reference: 'create-dialog-button',
|
47
43
|
text : 'Create Dialog',
|
@@ -50,7 +46,7 @@ class MainContainer extends Viewport {
|
|
50
46
|
checked : true,
|
51
47
|
hideLabel : true,
|
52
48
|
hideValueLabel: false,
|
53
|
-
listeners : {change:
|
49
|
+
listeners : {change: 'up.onBoundaryContainerIdChange'},
|
54
50
|
style : {marginLeft: '3em'},
|
55
51
|
valueLabelText: 'Limit Drag&Drop to the document.body'
|
56
52
|
}, {
|
@@ -58,26 +54,39 @@ class MainContainer extends Viewport {
|
|
58
54
|
checked : true,
|
59
55
|
hideLabel : true,
|
60
56
|
hideValueLabel: false,
|
61
|
-
listeners : {change:
|
57
|
+
listeners : {change: 'up.onConfigChange'},
|
62
58
|
style : {marginLeft: '3em'},
|
59
|
+
targetConfig : 'animated',
|
63
60
|
valueLabelText: 'Animated'
|
64
61
|
}, {
|
65
62
|
module : CheckBox,
|
66
63
|
checked : true,
|
67
64
|
hideLabel : true,
|
68
65
|
hideValueLabel: false,
|
69
|
-
listeners : {change:
|
66
|
+
listeners : {change: 'up.onConfigChange'},
|
70
67
|
style : {marginLeft: '1em'},
|
68
|
+
targetConfig : 'modal',
|
71
69
|
valueLabelText: 'Modal'
|
72
70
|
}, '->', {
|
73
71
|
module : Button,
|
74
|
-
handler:
|
72
|
+
handler: 'up.switchTheme',
|
75
73
|
iconCls: 'fa fa-moon',
|
76
74
|
text : 'Theme Dark'
|
77
75
|
}]
|
78
76
|
}]
|
79
77
|
}
|
80
78
|
|
79
|
+
/**
|
80
|
+
* Custom class field which gets passed to the dialog. Either a dom node id, 'document.body' or null
|
81
|
+
* @member {String|null} boundaryContainerId='document.body'
|
82
|
+
*/
|
83
|
+
boundaryContainerId = 'document.body'
|
84
|
+
/**
|
85
|
+
* Custom class field to store the created dialog.Base instance
|
86
|
+
* @member {Neo.dialog.Base|null} dialog=null
|
87
|
+
*/
|
88
|
+
dialog = null
|
89
|
+
|
81
90
|
/**
|
82
91
|
* @param {Object} data
|
83
92
|
*/
|
@@ -117,12 +126,11 @@ class MainContainer extends Viewport {
|
|
117
126
|
}
|
118
127
|
|
119
128
|
/**
|
120
|
-
* @param {String} config
|
121
129
|
* @param {Object} opts
|
122
130
|
*/
|
123
|
-
onConfigChange(
|
131
|
+
onConfigChange(opts) {
|
124
132
|
if (this.dialog) {
|
125
|
-
this.dialog[
|
133
|
+
this.dialog[opts.component.targetConfig] = opts.value
|
126
134
|
}
|
127
135
|
}
|
128
136
|
|
@@ -9,7 +9,6 @@ import TableContainer from '../../src/table/Container.mjs';
|
|
9
9
|
class MainContainer extends Container {
|
10
10
|
static config = {
|
11
11
|
className: 'Neo.examples.tablePerformance.MainContainer',
|
12
|
-
autoMount: true,
|
13
12
|
|
14
13
|
layout: {
|
15
14
|
ntype: 'vbox',
|
@@ -44,57 +43,41 @@ class MainContainer extends Container {
|
|
44
43
|
}, {
|
45
44
|
ntype : 'numberfield',
|
46
45
|
clearable : false,
|
47
|
-
id : 'amountRows',
|
48
46
|
labelText : 'Rows:',
|
49
47
|
labelWidth: 50,
|
50
48
|
maxValue : 1500,
|
51
49
|
minValue : 1,
|
50
|
+
reference : 'amount-rows-field',
|
52
51
|
value : 20,
|
53
52
|
width : 120
|
54
53
|
}, {
|
55
54
|
ntype : 'numberfield',
|
56
55
|
clearable : false,
|
57
|
-
id : 'interval',
|
58
56
|
labelText : 'Interval:',
|
59
57
|
labelWidth: 62,
|
60
58
|
maxValue : 5000,
|
61
59
|
minValue : 10,
|
60
|
+
reference : 'interval-field',
|
62
61
|
value : 20,
|
63
62
|
width : 130
|
64
63
|
}, {
|
64
|
+
handler: 'up.updateTableViewData',
|
65
65
|
iconCls: 'fa fa-sync-alt',
|
66
|
-
text : 'Refresh Data'
|
67
|
-
handler: function () {
|
68
|
-
let rows = Neo.getComponent('amountRows').value;
|
69
|
-
Neo.getComponent('myTableContainer').createRandomViewData(rows);
|
70
|
-
}
|
66
|
+
text : 'Refresh Data'
|
71
67
|
}, {
|
68
|
+
handler: 'up.updateTableViewData100x',
|
72
69
|
iconCls: 'fa fa-sync-alt',
|
73
70
|
style : {margin: 0},
|
74
|
-
text : 'Refresh 100x'
|
75
|
-
handler: function () {
|
76
|
-
let interval = Neo.getComponent('interval').value,
|
77
|
-
rows = Neo.getComponent('amountRows').value,
|
78
|
-
maxRefreshes = 100,
|
79
|
-
intervalId = setInterval(function () {
|
80
|
-
if (maxRefreshes < 1) {
|
81
|
-
clearInterval(intervalId);
|
82
|
-
}
|
83
|
-
|
84
|
-
Neo.getComponent('myTableContainer').createRandomViewData(rows);
|
85
|
-
maxRefreshes--;
|
86
|
-
}, interval);
|
87
|
-
}
|
71
|
+
text : 'Refresh 100x'
|
88
72
|
}]
|
89
73
|
}, {
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
width : '100%',
|
74
|
+
module : TableContainer,
|
75
|
+
reference : 'table',
|
76
|
+
viewConfig: {useRowRecordIds: false},
|
77
|
+
width : '100%',
|
95
78
|
|
96
79
|
columnDefaults: {
|
97
|
-
renderer
|
80
|
+
renderer(data) {
|
98
81
|
return {
|
99
82
|
html : data.value,
|
100
83
|
style: {
|
@@ -141,6 +124,43 @@ class MainContainer extends Container {
|
|
141
124
|
}]
|
142
125
|
}]
|
143
126
|
}
|
127
|
+
|
128
|
+
/**
|
129
|
+
*
|
130
|
+
*/
|
131
|
+
onConstructed() {
|
132
|
+
super.onConstructed();
|
133
|
+
this.updateTableViewData()
|
134
|
+
}
|
135
|
+
|
136
|
+
/**
|
137
|
+
*
|
138
|
+
*/
|
139
|
+
updateTableViewData() {
|
140
|
+
let me = this,
|
141
|
+
table = me.getReference('table'),
|
142
|
+
columns = table.headerToolbar.items.length,
|
143
|
+
rows = me.getReference('amount-rows-field').value,
|
144
|
+
inputData = me.up('viewport').createRandomData(columns, rows);
|
145
|
+
|
146
|
+
table.createViewData(inputData)
|
147
|
+
}
|
148
|
+
|
149
|
+
/**
|
150
|
+
*
|
151
|
+
*/
|
152
|
+
updateTableViewData100x() {
|
153
|
+
let interval = this.getReference('interval-field').value,
|
154
|
+
maxRefreshes = 100,
|
155
|
+
intervalId = setInterval(() => {
|
156
|
+
if (maxRefreshes < 1) {
|
157
|
+
clearInterval(intervalId);
|
158
|
+
}
|
159
|
+
|
160
|
+
this.updateTableViewData();
|
161
|
+
maxRefreshes--
|
162
|
+
}, interval)
|
163
|
+
}
|
144
164
|
}
|
145
165
|
|
146
166
|
export default Neo.setupClass(MainContainer);
|
@@ -43,57 +43,41 @@ class MainContainer2 extends Container {
|
|
43
43
|
}, {
|
44
44
|
ntype : 'numberfield',
|
45
45
|
clearable : false,
|
46
|
-
id : 'amountRows2',
|
47
46
|
labelText : 'Rows:',
|
48
47
|
labelWidth: 50,
|
49
48
|
maxValue : 1500,
|
50
49
|
minValue : 1,
|
50
|
+
reference : 'amount-rows-field',
|
51
51
|
value : 50,
|
52
52
|
width : 120
|
53
53
|
}, {
|
54
54
|
ntype : 'numberfield',
|
55
55
|
clearable : false,
|
56
|
-
id : 'interval2',
|
57
56
|
labelText : 'Interval:',
|
58
57
|
labelWidth: 62,
|
59
58
|
maxValue : 5000,
|
60
59
|
minValue : 10,
|
60
|
+
reference : 'interval-field',
|
61
61
|
value : 30,
|
62
62
|
width : 130
|
63
63
|
}, {
|
64
|
+
handler: 'up.updateTableViewData',
|
64
65
|
iconCls: 'fa fa-sync-alt',
|
65
|
-
text : 'Refresh Data'
|
66
|
-
handler: function () {
|
67
|
-
let rows = Neo.getComponent('amountRows2').value;
|
68
|
-
Neo.getComponent('myTableContainer2').createRandomViewData(rows);
|
69
|
-
}
|
66
|
+
text : 'Refresh Data'
|
70
67
|
}, {
|
68
|
+
handler: 'up.updateTableViewData100x',
|
71
69
|
iconCls: 'fa fa-sync-alt',
|
72
70
|
style : {margin: 0},
|
73
|
-
text : 'Refresh 100x'
|
74
|
-
handler: function () {
|
75
|
-
let interval = Neo.getComponent('interval2').value,
|
76
|
-
rows = Neo.getComponent('amountRows2').value,
|
77
|
-
maxRefreshes = 100,
|
78
|
-
intervalId = setInterval(function(){
|
79
|
-
if (maxRefreshes < 1) {
|
80
|
-
clearInterval(intervalId);
|
81
|
-
}
|
82
|
-
|
83
|
-
Neo.getComponent('myTableContainer2').createRandomViewData(rows);
|
84
|
-
maxRefreshes--;
|
85
|
-
}, interval);
|
86
|
-
}
|
71
|
+
text : 'Refresh 100x'
|
87
72
|
}]
|
88
73
|
}, {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
width : '100%',
|
74
|
+
module : TableContainer,
|
75
|
+
reference : 'table',
|
76
|
+
viewConfig: {useRowRecordIds: false},
|
77
|
+
width : '100%',
|
94
78
|
|
95
79
|
columnDefaults: {
|
96
|
-
renderer
|
80
|
+
renderer(data) {
|
97
81
|
return {
|
98
82
|
html : data.value,
|
99
83
|
style: {
|
@@ -140,6 +124,43 @@ class MainContainer2 extends Container {
|
|
140
124
|
}]
|
141
125
|
}]
|
142
126
|
}
|
127
|
+
|
128
|
+
/**
|
129
|
+
*
|
130
|
+
*/
|
131
|
+
onConstructed() {
|
132
|
+
super.onConstructed();
|
133
|
+
this.updateTableViewData()
|
134
|
+
}
|
135
|
+
|
136
|
+
/**
|
137
|
+
*
|
138
|
+
*/
|
139
|
+
updateTableViewData() {
|
140
|
+
let me = this,
|
141
|
+
table = me.getReference('table'),
|
142
|
+
columns = table.headerToolbar.items.length,
|
143
|
+
rows = me.getReference('amount-rows-field').value,
|
144
|
+
inputData = me.up('viewport').createRandomData(columns, rows);
|
145
|
+
|
146
|
+
table.createViewData(inputData)
|
147
|
+
}
|
148
|
+
|
149
|
+
/**
|
150
|
+
*
|
151
|
+
*/
|
152
|
+
updateTableViewData100x() {
|
153
|
+
let interval = this.getReference('interval-field').value,
|
154
|
+
maxRefreshes = 100,
|
155
|
+
intervalId = setInterval(() => {
|
156
|
+
if (maxRefreshes < 1) {
|
157
|
+
clearInterval(intervalId);
|
158
|
+
}
|
159
|
+
|
160
|
+
this.updateTableViewData();
|
161
|
+
maxRefreshes--
|
162
|
+
}, interval)
|
163
|
+
}
|
143
164
|
}
|
144
165
|
|
145
166
|
export default Neo.setupClass(MainContainer2);
|
@@ -33,7 +33,7 @@ class MainContainer3 extends Container {
|
|
33
33
|
|
34
34
|
items: [{
|
35
35
|
ntype: 'label',
|
36
|
-
text : 'TableContainer App3 (Default
|
36
|
+
text : 'TableContainer App3 (Default Scrollbars)',
|
37
37
|
style: {
|
38
38
|
margin: '4px 10px 0 5px'
|
39
39
|
}
|
@@ -43,58 +43,42 @@ class MainContainer3 extends Container {
|
|
43
43
|
}, {
|
44
44
|
ntype : 'numberfield',
|
45
45
|
clearable : false,
|
46
|
-
id : 'amountRows3',
|
47
46
|
labelText : 'Rows:',
|
48
47
|
labelWidth: 50,
|
49
48
|
maxValue : 1500,
|
50
49
|
minValue : 1,
|
50
|
+
reference : 'amount-rows-field',
|
51
51
|
value : 100,
|
52
52
|
width : 120
|
53
53
|
}, {
|
54
54
|
ntype : 'numberfield',
|
55
55
|
clearable : false,
|
56
|
-
id : 'interval3',
|
57
56
|
labelText : 'Interval:',
|
58
57
|
labelWidth: 62,
|
59
58
|
maxValue : 5000,
|
60
59
|
minValue : 10,
|
60
|
+
reference : 'interval-field',
|
61
61
|
value : 50,
|
62
62
|
width : 130
|
63
63
|
}, {
|
64
|
+
handler: 'up.updateTableViewData',
|
64
65
|
iconCls: 'fa fa-sync-alt',
|
65
|
-
text : 'Refresh Data'
|
66
|
-
handler: function () {
|
67
|
-
let rows = Neo.getComponent('amountRows3').value;
|
68
|
-
Neo.getComponent('myTableContainer3').createRandomViewData(rows);
|
69
|
-
}
|
66
|
+
text : 'Refresh Data'
|
70
67
|
}, {
|
68
|
+
handler: 'up.updateTableViewData100x',
|
71
69
|
iconCls: 'fa fa-sync-alt',
|
72
70
|
text : 'Refresh 100x',
|
73
|
-
style : {margin: 0}
|
74
|
-
handler: function () {
|
75
|
-
let interval = Neo.getComponent('interval3').value,
|
76
|
-
rows = Neo.getComponent('amountRows3').value,
|
77
|
-
maxRefreshes = 100,
|
78
|
-
intervalId = setInterval(function(){
|
79
|
-
if (maxRefreshes < 1) {
|
80
|
-
clearInterval(intervalId);
|
81
|
-
}
|
82
|
-
|
83
|
-
Neo.getComponent('myTableContainer3').createRandomViewData(rows);
|
84
|
-
maxRefreshes--;
|
85
|
-
}, interval);
|
86
|
-
}
|
71
|
+
style : {margin: 0}
|
87
72
|
}]
|
88
73
|
}, {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
createRandomData : true,
|
74
|
+
module : TableContainer,
|
75
|
+
reference : 'table',
|
76
|
+
viewConfig : {useRowRecordIds: false},
|
93
77
|
useCustomScrollbars: false,
|
94
78
|
width : '100%',
|
95
79
|
|
96
80
|
columnDefaults: {
|
97
|
-
renderer
|
81
|
+
renderer(data) {
|
98
82
|
return {
|
99
83
|
html : data.value,
|
100
84
|
style: {
|
@@ -143,6 +127,43 @@ class MainContainer3 extends Container {
|
|
143
127
|
}]
|
144
128
|
}]
|
145
129
|
}
|
130
|
+
|
131
|
+
/**
|
132
|
+
*
|
133
|
+
*/
|
134
|
+
onConstructed() {
|
135
|
+
super.onConstructed();
|
136
|
+
this.updateTableViewData()
|
137
|
+
}
|
138
|
+
|
139
|
+
/**
|
140
|
+
*
|
141
|
+
*/
|
142
|
+
updateTableViewData() {
|
143
|
+
let me = this,
|
144
|
+
table = me.getReference('table'),
|
145
|
+
columns = table.headerToolbar.items.length,
|
146
|
+
rows = me.getReference('amount-rows-field').value,
|
147
|
+
inputData = me.up('viewport').createRandomData(columns, rows);
|
148
|
+
|
149
|
+
table.view.createViewData(inputData)
|
150
|
+
}
|
151
|
+
|
152
|
+
/**
|
153
|
+
*
|
154
|
+
*/
|
155
|
+
updateTableViewData100x() {
|
156
|
+
let interval = this.getReference('interval-field').value,
|
157
|
+
maxRefreshes = 100,
|
158
|
+
intervalId = setInterval(() => {
|
159
|
+
if (maxRefreshes < 1) {
|
160
|
+
clearInterval(intervalId);
|
161
|
+
}
|
162
|
+
|
163
|
+
this.updateTableViewData();
|
164
|
+
maxRefreshes--
|
165
|
+
}, interval)
|
166
|
+
}
|
146
167
|
}
|
147
168
|
|
148
169
|
export default Neo.setupClass(MainContainer3);
|
@@ -27,6 +27,27 @@ class Viewport extends BaseViewport {
|
|
27
27
|
style : {marginTop: '20px'}
|
28
28
|
}]
|
29
29
|
}
|
30
|
+
|
31
|
+
/**
|
32
|
+
* @param {Number} amountColumns
|
33
|
+
* @param {Number} amountRows
|
34
|
+
*/
|
35
|
+
createRandomData(amountColumns, amountRows) {
|
36
|
+
let data = [],
|
37
|
+
i = 0,
|
38
|
+
j;
|
39
|
+
|
40
|
+
for (; i < amountRows; i++) {
|
41
|
+
data.push({});
|
42
|
+
|
43
|
+
for (j=0; j < amountColumns; j++) {
|
44
|
+
data[i]['column' + j] = 'Column' + (j + 1) + ' - ' + Math.round(Math.random() / 1.5);
|
45
|
+
data[i]['column' + j + 'style'] = Math.round(Math.random() / 1.7) > 0 ? 'brown' : i%2 ? '#3c3f41' : '#323232'
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
return data
|
50
|
+
}
|
30
51
|
}
|
31
52
|
|
32
53
|
export default Neo.setupClass(Viewport);
|
package/package.json
CHANGED
package/src/DefaultConfig.mjs
CHANGED
@@ -262,12 +262,12 @@ const DefaultConfig = {
|
|
262
262
|
useVdomWorker: true,
|
263
263
|
/**
|
264
264
|
* buildScripts/injectPackageVersion.mjs will update this value
|
265
|
-
* @default '7.
|
265
|
+
* @default '7.11.0'
|
266
266
|
* @memberOf! module:Neo
|
267
267
|
* @name config.version
|
268
268
|
* @type String
|
269
269
|
*/
|
270
|
-
version: '7.
|
270
|
+
version: '7.11.0'
|
271
271
|
};
|
272
272
|
|
273
273
|
Object.assign(DefaultConfig, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import DateField from '../form/field/Date.mjs';
|
2
2
|
import NumberContainer from './NumberContainer.mjs';
|
3
3
|
|
4
4
|
/**
|
@@ -18,9 +18,9 @@ class DateContainer extends NumberContainer {
|
|
18
18
|
*/
|
19
19
|
ntype: 'filter-datecontainer',
|
20
20
|
/**
|
21
|
-
* @member {Neo.form.field.Base} fieldModule=
|
21
|
+
* @member {Neo.form.field.Base} fieldModule=DateField
|
22
22
|
*/
|
23
|
-
fieldModule:
|
23
|
+
fieldModule: DateField
|
24
24
|
}
|
25
25
|
}
|
26
26
|
|
package/src/manager/_export.mjs
CHANGED
@@ -3,6 +3,5 @@ import Component from './Component.mjs';
|
|
3
3
|
import DomEvent from './DomEvent.mjs';
|
4
4
|
import Focus from './Focus.mjs';
|
5
5
|
import Instance from './Instance.mjs';
|
6
|
-
import Store from './Store.mjs';
|
7
6
|
|
8
|
-
export {Base, Component, DomEvent, Instance, Focus
|
7
|
+
export {Base, Component, DomEvent, Instance, Focus};
|
package/src/table/Container.mjs
CHANGED
@@ -23,11 +23,6 @@ class Container extends BaseContainer {
|
|
23
23
|
* @protected
|
24
24
|
*/
|
25
25
|
ntype: 'table-container',
|
26
|
-
/**
|
27
|
-
* todo: testing config, remove when Stores are ready
|
28
|
-
* @member {Number} amountRows=20
|
29
|
-
*/
|
30
|
-
amountRows: 20,
|
31
26
|
/**
|
32
27
|
* @member {String[]} baseCls=['neo-table-container']
|
33
28
|
*/
|
@@ -37,11 +32,6 @@ class Container extends BaseContainer {
|
|
37
32
|
* @member {Object} columnDefaults=null
|
38
33
|
*/
|
39
34
|
columnDefaults: null,
|
40
|
-
/**
|
41
|
-
* todo: testing config, remove when Stores are ready
|
42
|
-
* @member {Boolean} createRandomData=false
|
43
|
-
*/
|
44
|
-
createRandomData: false,
|
45
35
|
/**
|
46
36
|
* @member {Object[]} columns_=[]
|
47
37
|
*/
|
@@ -148,11 +138,10 @@ class Container extends BaseContainer {
|
|
148
138
|
sortable : me.sortable,
|
149
139
|
...me.headerToolbarConfig
|
150
140
|
}, {
|
151
|
-
module
|
152
|
-
containerId
|
153
|
-
id
|
154
|
-
store
|
155
|
-
useRowRecordIds: !me.createRandomData,
|
141
|
+
module : View,
|
142
|
+
containerId: me.id,
|
143
|
+
id : me.viewId,
|
144
|
+
store : me.store,
|
156
145
|
...me.viewConfig
|
157
146
|
}];
|
158
147
|
|
@@ -399,27 +388,17 @@ class Container extends BaseContainer {
|
|
399
388
|
return columns
|
400
389
|
}
|
401
390
|
|
402
|
-
/**
|
403
|
-
* @param {Number} countRows
|
404
|
-
*/
|
405
|
-
createRandomViewData(countRows) {
|
406
|
-
this.loadData(countRows)
|
407
|
-
}
|
408
|
-
|
409
391
|
/**
|
410
392
|
* @param {Array} inputData
|
411
393
|
*/
|
412
394
|
createViewData(inputData) {
|
413
|
-
let me
|
414
|
-
{items} = me;
|
395
|
+
let me = this;
|
415
396
|
|
416
|
-
|
397
|
+
me.view.createViewData(inputData);
|
417
398
|
|
418
399
|
if (me.useCustomScrollbars && me.scrollbarsCssApplied === false) {
|
419
|
-
me.applyCustomScrollbarsCss()
|
400
|
+
me.applyCustomScrollbarsCss()
|
420
401
|
}
|
421
|
-
|
422
|
-
me.items = items
|
423
402
|
}
|
424
403
|
|
425
404
|
/**
|
@@ -452,35 +431,12 @@ class Container extends BaseContainer {
|
|
452
431
|
return `${this.id}__wrapper`
|
453
432
|
}
|
454
433
|
|
455
|
-
/**
|
456
|
-
* @param {Number} countRows
|
457
|
-
*/
|
458
|
-
loadData(countRows) {
|
459
|
-
let me = this,
|
460
|
-
columns = me.items[0].items,
|
461
|
-
countColumns = columns.length;
|
462
|
-
|
463
|
-
Neo.manager.Store.createRandomData([countColumns, countRows]).then(data => {
|
464
|
-
me.createViewData(data)
|
465
|
-
})
|
466
|
-
}
|
467
|
-
|
468
434
|
/**
|
469
435
|
*
|
470
436
|
*/
|
471
437
|
onConstructed() {
|
472
438
|
super.onConstructed();
|
473
|
-
|
474
|
-
let me = this;
|
475
|
-
|
476
|
-
me.selectionModel?.register(me);
|
477
|
-
|
478
|
-
if (me.createRandomData) {
|
479
|
-
// todo: if mounting apply after mount
|
480
|
-
me.timeout(50).then(() => {
|
481
|
-
me.createRandomViewData(me.amountRows)
|
482
|
-
})
|
483
|
-
}
|
439
|
+
this.selectionModel?.register(this)
|
484
440
|
}
|
485
441
|
|
486
442
|
/**
|
@@ -545,7 +501,7 @@ class Container extends BaseContainer {
|
|
545
501
|
* @protected
|
546
502
|
*/
|
547
503
|
removeSortingCss(dataField) {
|
548
|
-
this.
|
504
|
+
this.headerToolbar.items.forEach(column => {
|
549
505
|
if (column.dataField !== dataField) {
|
550
506
|
column.removeSortingCss()
|
551
507
|
}
|
package/src/table/View.mjs
CHANGED
@@ -201,7 +201,7 @@ class View extends Component {
|
|
201
201
|
if (selectedRows?.includes(id)) {
|
202
202
|
trCls.push('neo-selected');
|
203
203
|
|
204
|
-
|
204
|
+
me.parent.fire('select', {
|
205
205
|
record
|
206
206
|
})
|
207
207
|
}
|
@@ -326,7 +326,7 @@ class View extends Component {
|
|
326
326
|
*/
|
327
327
|
getColumn(field, returnIndex=false) {
|
328
328
|
let container = this.parent,
|
329
|
-
columns = container.
|
329
|
+
columns = container.headerToolbar.items,
|
330
330
|
i = 0,
|
331
331
|
len = columns.length,
|
332
332
|
column;
|
package/src/worker/Data.mjs
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import Neo
|
2
|
-
import Base
|
3
|
-
import Compare
|
4
|
-
import Fetch
|
5
|
-
import Util
|
6
|
-
import
|
7
|
-
import Xhr from '../Xhr.mjs';
|
1
|
+
import Neo from '../Neo.mjs';
|
2
|
+
import Base from './Base.mjs';
|
3
|
+
import Compare from '../core/Compare.mjs';
|
4
|
+
import Fetch from '../Fetch.mjs';
|
5
|
+
import Util from '../core/Util.mjs';
|
6
|
+
import Xhr from '../Xhr.mjs';
|
8
7
|
|
9
8
|
/**
|
10
9
|
* The Data worker is responsible to handle all of the communication to the backend (e.g. Ajax-calls).
|
package/src/manager/Store.mjs
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
import Base from './Base.mjs';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* todo: except for createRandomData a legacy class, since stores live directly inside the app worker
|
5
|
-
* @class Neo.manager.Store
|
6
|
-
* @extends Neo.manager.Base
|
7
|
-
* @singleton
|
8
|
-
*/
|
9
|
-
class Store extends Base {
|
10
|
-
static config = {
|
11
|
-
/**
|
12
|
-
* @member {String} className='Neo.manager.Store'
|
13
|
-
* @protected
|
14
|
-
*/
|
15
|
-
className: 'Neo.manager.Store',
|
16
|
-
/**
|
17
|
-
* @member {Boolean} singleton=true
|
18
|
-
* @protected
|
19
|
-
*/
|
20
|
-
singleton: true,
|
21
|
-
/**
|
22
|
-
* @member {Object} listeners={}
|
23
|
-
* @protected
|
24
|
-
*/
|
25
|
-
listeners: {},
|
26
|
-
/**
|
27
|
-
* @member {Object} remote={app: ['createRandomData', 'filter', 'load', 'sort']}
|
28
|
-
* @protected
|
29
|
-
*/
|
30
|
-
remote: {
|
31
|
-
app: ['createRandomData', 'filter', 'load', 'sort']
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Dummy method until we have a data package in place
|
37
|
-
* @param {Number} amountColumns
|
38
|
-
* @param {Number} amountRows
|
39
|
-
*/
|
40
|
-
createRandomData(amountColumns, amountRows) {
|
41
|
-
let data = [],
|
42
|
-
i = 0,
|
43
|
-
j;
|
44
|
-
|
45
|
-
for (; i < amountRows; i++) {
|
46
|
-
data.push({});
|
47
|
-
|
48
|
-
for (j=0; j < amountColumns; j++) {
|
49
|
-
data[i]['column' + j] = 'Column' + (j + 1) + ' - ' + Math.round(Math.random() / 1.5);
|
50
|
-
data[i]['column' + j + 'style'] = Math.round(Math.random() / 1.7) > 0 ? 'brown' : i%2 ? '#3c3f41' : '#323232'
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
54
|
-
return data
|
55
|
-
}
|
56
|
-
|
57
|
-
/**
|
58
|
-
* @param storeId
|
59
|
-
* @param fieldName
|
60
|
-
* @param value
|
61
|
-
*/
|
62
|
-
filter(storeId, fieldName, value) {
|
63
|
-
|
64
|
-
}
|
65
|
-
|
66
|
-
/**
|
67
|
-
* @param storeId
|
68
|
-
* @param params
|
69
|
-
*/
|
70
|
-
load(storeId, params) {
|
71
|
-
|
72
|
-
}
|
73
|
-
|
74
|
-
/**
|
75
|
-
* @param storeId
|
76
|
-
* @param fieldName
|
77
|
-
* @param value
|
78
|
-
*/
|
79
|
-
sort(storeId, fieldName, value) {
|
80
|
-
|
81
|
-
}
|
82
|
-
}
|
83
|
-
|
84
|
-
export default Neo.setupClass(Store);
|