neo.mjs 7.10.0 → 7.12.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.
Files changed (35) hide show
  1. package/apps/ServiceWorker.mjs +2 -2
  2. package/apps/portal/index.html +1 -1
  3. package/apps/portal/resources/data/examples_devmode.json +24 -17
  4. package/apps/portal/resources/data/examples_dist_dev.json +24 -17
  5. package/apps/portal/resources/data/examples_dist_prod.json +24 -17
  6. package/apps/portal/view/home/FooterContainer.mjs +1 -1
  7. package/apps/portal/view/home/parts/AfterMath.mjs +7 -10
  8. package/apps/portal/view/learn/ContentComponent.mjs +1 -1
  9. package/apps/portal/view/services/Component.mjs +4 -4
  10. package/examples/ServiceWorker.mjs +2 -2
  11. package/examples/component/multiWindowCoronaGallery/ViewportController.mjs +9 -2
  12. package/examples/component/multiWindowHelix/ViewportController.mjs +9 -2
  13. package/examples/dialog/DemoDialog.mjs +7 -0
  14. package/examples/dialog/MainContainer.mjs +40 -31
  15. package/examples/tablePerformance/MainContainer.mjs +48 -28
  16. package/examples/tablePerformance/MainContainer2.mjs +48 -27
  17. package/examples/tablePerformance/MainContainer3.mjs +48 -27
  18. package/examples/tablePerformance/Viewport.mjs +21 -0
  19. package/package.json +1 -1
  20. package/resources/scss/src/apps/portal/about/MemberContainer.scss +7 -5
  21. package/resources/scss/src/apps/portal/home/ContentBox.scss +74 -41
  22. package/resources/scss/src/apps/portal/home/parts/AfterMath.scss +16 -2
  23. package/resources/scss/src/apps/portal/home/parts/Features.scss +25 -3
  24. package/resources/scss/src/apps/portal/learn/ContentComponent.scss +19 -20
  25. package/resources/scss/src/apps/portal/services/Component.scss +23 -8
  26. package/src/DefaultConfig.mjs +2 -2
  27. package/src/filter/DateContainer.mjs +3 -3
  28. package/src/list/Circle.mjs +1 -0
  29. package/src/manager/_export.mjs +1 -2
  30. package/src/tab/Container.mjs +25 -36
  31. package/src/table/Container.mjs +9 -53
  32. package/src/table/View.mjs +2 -2
  33. package/src/table/header/Button.mjs +1 -0
  34. package/src/worker/Data.mjs +6 -7
  35. package/src/manager/Store.mjs +0 -84
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='7.10.0'
23
+ * @member {String} version='7.12.0'
24
24
  */
25
- version: '7.10.0'
25
+ version: '7.12.0'
26
26
  }
27
27
 
28
28
  /**
@@ -16,7 +16,7 @@
16
16
  "@type": "Organization",
17
17
  "name": "Neo.mjs"
18
18
  },
19
- "datePublished": "2024-09-30",
19
+ "datePublished": "2024-10-02",
20
20
  "publisher": {
21
21
  "@type": "Organization",
22
22
  "name": "Neo.mjs"
@@ -1,85 +1,92 @@
1
1
  [{
2
- "id" : 22,
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" : 21,
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" : 20,
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" : 19,
22
- "image" : "devmode/coronaGallery.png",
23
- "name" : "COVID-19 Gallery",
24
- "sourceUrl": "examples/component/coronaGallery",
25
- "url" : "examples/component/coronaGallery/index.html"
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" : 18,
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" : 17,
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" : 16,
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" : 15,
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" : 14,
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" : 13,
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" : 12,
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" : 11,
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" : 10,
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" : 21,
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" : 20,
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" : 19,
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" : 18,
22
- "image" : "devmode/coronaGallery.png",
23
- "name" : "COVID-19 Gallery",
24
- "sourceUrl": "examples/component/coronaGallery",
25
- "url" : "dist/development/examples/component/coronaGallery/index.html"
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" : 17,
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" : 16,
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" : 15,
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" : 14,
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" : 13,
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" : 12,
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" : 11,
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" : 10,
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" : 9,
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" : 21,
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" : 20,
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" : 19,
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" : 18,
22
- "image" : "devmode/coronaGallery.png",
23
- "name" : "COVID-19 Gallery",
24
- "sourceUrl": "examples/component/coronaGallery",
25
- "url" : "dist/production/examples/component/coronaGallery/index.html"
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" : 17,
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" : 16,
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" : 15,
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" : 14,
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" : 13,
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" : 12,
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" : 11,
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" : 10,
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" : 9,
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",
@@ -111,7 +111,7 @@ class FooterContainer extends Container {
111
111
  }, {
112
112
  module: Component,
113
113
  cls : ['neo-version'],
114
- html : 'v7.10.0'
114
+ html : 'v7.12.0'
115
115
  }]
116
116
  }],
117
117
  /**
@@ -33,17 +33,14 @@ class AfterMath extends BaseContainer {
33
33
  }, {
34
34
  cls : ['neo-content'],
35
35
  flex: 'none',
36
+ tag : 'ul',
37
+
36
38
  html: `
37
- <p>
38
- To learn more about Neo.mjs please read <a href="#/learn">the Learning Section</a> or browse <a href="#/blog">the blog</a>.
39
- </p>
40
- <p>
41
- To arrange a demo or to talk to an engineer email <a href="mailto:info@neomjs.com">info@neomjs.com</a>.
42
- <br>For help starting a project email <a href="mailto:services@neomjs.com">services@neomjs.com</a>.
43
- <br>For questions about private training email <a href="mailto:training@neomjs.com">training@neomjs.com</a>.
44
- </p>
45
- `,
46
- tag : 'div'
39
+ <li>To learn more about Neo.mjs please read the <a href="#/learn">Learning Section</a> or browse the <a href="#/blog">Blog</a></li>
40
+ <li>To arrange a demo or to talk to an engineer email <a href="mailto:info@neomjs.com">info@neomjs.com</a></li>
41
+ <li>For help starting a project email <a href="mailto:services@neomjs.com">services@neomjs.com</a></li>
42
+ <li>For questions about private training email <a href="mailto:training@neomjs.com">training@neomjs.com</a></li>
43
+ `
47
44
  }, {
48
45
  flex: 1
49
46
  }, {
@@ -184,7 +184,7 @@ class ContentComponent extends Component {
184
184
  data = await fetch(path);
185
185
  content = await data.text();
186
186
  content = me.updateContentSectionsStore(content); // also replaces ## with h2 tags
187
- content = `# ${record.name}\n${content}`;
187
+ content = `<h1 class='neo-h1'>${record.name}</h1>\n${content}`;
188
188
  modifiedHtml = await me.highlightPreContent(content);
189
189
  neoComponents = {};
190
190
  neoDivs = {};
@@ -20,9 +20,9 @@ class Component extends BaseComponent {
20
20
  */
21
21
  vdom:
22
22
  {cn: [
23
- {tag: 'h1', html: 'Services'},
23
+ {tag: 'h1', cls: ['neo-h1'], html: 'Services'},
24
24
  {cls: ['info-block'], cn: [
25
- {tag: 'h2', html: 'Weekly Workshops'},
25
+ {tag: 'h2', cls: ['neo-h2'], html: 'Weekly Workshops'},
26
26
  {tag: 'p', html: [
27
27
  'We are doing weekly workshops on Thursdays 18:30 CEST (12:30am EST) for 60m free of charge.</br>',
28
28
  'Ping us inside our ',
@@ -31,7 +31,7 @@ class Component extends BaseComponent {
31
31
  ].join('')},
32
32
  ]},
33
33
  {cls: ['info-block'], cn: [
34
- {tag: 'h2', html: 'Professional Trainings'},
34
+ {tag: 'h2', cls: ['neo-h2'], html: 'Professional Trainings'},
35
35
  {tag: 'p', html: [
36
36
  'While we do have a self-study based Learning Section online, you can also hire us ',
37
37
  'in case you prefer an Instructor-led Training for bringing your team up to speed.'
@@ -47,7 +47,7 @@ class Component extends BaseComponent {
47
47
  ].join('')},
48
48
  ]},
49
49
  {cls: ['info-block'], cn: [
50
- {tag: 'h2', html: 'Professional Services'},
50
+ {tag: 'h2', cls: ['neo-h2'], html: 'Professional Services'},
51
51
  {tag: 'p', html: [
52
52
  'We can help you to ensure your Neo.mjs based projects run successfully.',
53
53
  ].join('')},
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='7.10.0'
23
+ * @member {String} version='7.12.0'
24
24
  */
25
- version: '7.10.0'
25
+ version: '7.12.0'
26
26
  }
27
27
 
28
28
  /**
@@ -37,9 +37,16 @@ class ViewportController extends Controller {
37
37
  basePath = `${basePath + environment}/`
38
38
  }
39
39
 
40
- height -= 62; // popup header in Chrome
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 -= 62; // popup header in Chrome
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.
@@ -48,6 +48,12 @@ class DemoDialog extends Dialog {
48
48
  }
49
49
  }
50
50
 
51
+ /**
52
+ * Custom class field to store the created dialog.Base instance
53
+ * @member {Neo.dialog.Base|null} dialog=null
54
+ */
55
+ dialog = null
56
+
51
57
  /**
52
58
  * @param {Object} config
53
59
  */
@@ -154,6 +160,7 @@ class DemoDialog extends Dialog {
154
160
  *
155
161
  */
156
162
  onWindowClose() {
163
+ this.dialog = null;
157
164
  this.getReference('create-dialog-button').disabled = false
158
165
  }
159
166
  }
@@ -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
- * Custom config which gets passed to the dialog
19
- * Either a dom node id, 'document.body' or null
20
- * @member {String|null} boundaryContainerId='document.body'
20
+ * We are not using a container layout here
21
+ * @member {String} layout='base'
21
22
  */
22
- boundaryContainerId: 'document.body',
23
+ layout: 'base',
23
24
  /**
24
- * Custom config
25
- * @member {Neo.dialog.Base|null} dialog=null
25
+ * @member {Object} style={padding:'20px'}
26
26
  */
27
- dialog: null
28
- }
29
-
30
- /**
31
- * @param {Object} config
32
- */
33
- construct(config) {
34
- super.construct(config);
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 : me.createDialog.bind(me),
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: me.onBoundaryContainerIdChange.bind(me)},
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: me.onConfigChange.bind(me, 'animated')},
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: me.onConfigChange.bind(me, 'modal')},
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: me.switchTheme.bind(me),
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(config, opts) {
131
+ onConfigChange(opts) {
124
132
  if (this.dialog) {
125
- this.dialog[config] = opts.value
133
+ this.dialog[opts.component.targetConfig] = opts.value
126
134
  }
127
135
  }
128
136
 
@@ -130,6 +138,7 @@ class MainContainer extends Viewport {
130
138
  *
131
139
  */
132
140
  onWindowClose() {
141
+ this.dialog = null;
133
142
  this.getReference('create-dialog-button').disabled = false
134
143
  }
135
144