neo.mjs 6.24.0 → 6.26.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/view/ViewportController.mjs +13 -6
- package/apps/portal/view/learn/MainContainer.mjs +13 -10
- package/apps/portal/view/learn/MainContainerController.mjs +14 -0
- package/apps/portal/view/learn/MainContainerModel.mjs +2 -0
- package/apps/portal/view/learn/PageSectionsContainer.mjs +16 -4
- package/apps/portal/view/learn/PageSectionsList.mjs +2 -0
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +1 -1
- package/resources/scss/src/apps/portal/HeaderToolbar.scss +4 -0
- package/resources/scss/src/apps/portal/learn/ContentTreeList.scss +18 -26
- package/resources/scss/src/apps/portal/learn/MainContainer.scss +30 -23
- package/resources/scss/src/apps/portal/learn/PageSectionsContainer.scss +31 -1
- package/src/DefaultConfig.mjs +2 -2
package/apps/ServiceWorker.mjs
CHANGED
@@ -28,9 +28,9 @@ class ViewportController extends Controller {
|
|
28
28
|
*/
|
29
29
|
ntype: 'viewport-controller',
|
30
30
|
/**
|
31
|
-
* @member {Number|null}
|
31
|
+
* @member {Number|null} activeIndex_=null
|
32
32
|
*/
|
33
|
-
|
33
|
+
activeIndex_: null,
|
34
34
|
/**
|
35
35
|
* @member {String|null} defaultHash='/home'
|
36
36
|
*/
|
@@ -305,7 +305,7 @@ class ViewportController extends Controller {
|
|
305
305
|
/**
|
306
306
|
*
|
307
307
|
*/
|
308
|
-
updateHeaderToolbar() {
|
308
|
+
async updateHeaderToolbar() {
|
309
309
|
let me = this,
|
310
310
|
{activeIndex, size} = me;
|
311
311
|
|
@@ -315,13 +315,20 @@ class ViewportController extends Controller {
|
|
315
315
|
vertical = size === 'x-small',
|
316
316
|
hidden = activeIndex !== 0 && vertical;
|
317
317
|
|
318
|
-
|
318
|
+
NeoArray.toggle(cls, 'hide-sidebar', hidden);
|
319
319
|
|
320
320
|
if (!hidden) {
|
321
|
-
NeoArray.toggle(cls, 'separate-bar', vertical)
|
321
|
+
NeoArray.toggle(cls, 'separate-bar', vertical)
|
322
|
+
}
|
323
|
+
|
324
|
+
headerSocialIcons.cls = cls
|
322
325
|
|
323
|
-
|
326
|
+
|
327
|
+
if (hidden && vertical) {
|
328
|
+
await me.timeout(200)
|
324
329
|
}
|
330
|
+
|
331
|
+
headerSocialIcons.hidden = hidden;
|
325
332
|
}
|
326
333
|
}
|
327
334
|
}
|
@@ -29,17 +29,22 @@ class MainContainer extends Container {
|
|
29
29
|
* @member {Object[]} items
|
30
30
|
*/
|
31
31
|
items: [{
|
32
|
-
module
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
tag :'aside',
|
38
|
-
width : 350,
|
32
|
+
module : Container,
|
33
|
+
cls : ['sidenav-container'],
|
34
|
+
layout : 'fit',
|
35
|
+
reference: 'sidenav-container',
|
36
|
+
tag : 'aside',
|
39
37
|
|
40
38
|
items: [{
|
41
39
|
module : ContentTreeList,
|
42
40
|
reference: 'tree'
|
41
|
+
}, {
|
42
|
+
ntype : 'button',
|
43
|
+
bind : {hidden: data => data.size !== 'x-small'},
|
44
|
+
cls : ['sidenav-button'],
|
45
|
+
handler: 'onSideNavToggleButtonClick',
|
46
|
+
iconCls: 'fas fa-bars',
|
47
|
+
ui : 'secondary'
|
43
48
|
}]
|
44
49
|
}, {
|
45
50
|
module : Splitter,
|
@@ -51,9 +56,7 @@ class MainContainer extends Container {
|
|
51
56
|
module: PageContainer
|
52
57
|
}, {
|
53
58
|
module : PageSectionsContainer,
|
54
|
-
|
55
|
-
reference: 'page-sections-container',
|
56
|
-
width : 250
|
59
|
+
reference: 'page-sections-container'
|
57
60
|
}],
|
58
61
|
/**
|
59
62
|
* @member {Object} layout={ntype:'hbox',align:'stretch'}
|
@@ -121,6 +121,13 @@ class MainContainerController extends Controller {
|
|
121
121
|
this.navigateTo(this.getModel().getData('nextPageRecord').id)
|
122
122
|
}
|
123
123
|
|
124
|
+
/**
|
125
|
+
* @param {Object} data
|
126
|
+
*/
|
127
|
+
onPageSectionsToggleButtonClick(data) {
|
128
|
+
this.getReference('page-sections-container').toggleCls('neo-expanded')
|
129
|
+
}
|
130
|
+
|
124
131
|
/**
|
125
132
|
* @param {Object} data
|
126
133
|
*/
|
@@ -155,6 +162,13 @@ class MainContainerController extends Controller {
|
|
155
162
|
})
|
156
163
|
}
|
157
164
|
}
|
165
|
+
|
166
|
+
/**
|
167
|
+
* @param {Object} data
|
168
|
+
*/
|
169
|
+
onSideNavToggleButtonClick(data) {
|
170
|
+
this.getReference('sidenav-container').toggleCls('neo-expanded')
|
171
|
+
}
|
158
172
|
}
|
159
173
|
|
160
174
|
Neo.setupClass(MainContainerController);
|
@@ -20,21 +20,26 @@ class PageSectionsContainer extends Container {
|
|
20
20
|
* @member {Object[]} items
|
21
21
|
*/
|
22
22
|
items: [{
|
23
|
+
ntype : 'button',
|
24
|
+
bind : {hidden: data => data.size === 'large'},
|
25
|
+
cls : ['sections-container-button'],
|
26
|
+
handler: 'onPageSectionsToggleButtonClick',
|
27
|
+
iconCls: 'fas fa-bars',
|
28
|
+
ui : 'secondary'
|
29
|
+
}, {
|
23
30
|
vdom:
|
24
31
|
{cn: [
|
25
32
|
{tag: 'h3', html: 'On this page'}
|
26
33
|
]}
|
27
|
-
|
28
34
|
}, {
|
29
35
|
module : PageSectionsList,
|
36
|
+
listeners: {pageListSelect: 'up.onPageListSelect'},
|
30
37
|
reference: 'list'
|
31
38
|
}],
|
32
39
|
/**
|
33
40
|
* @member {Object} layout={ntype:'vbox'}
|
34
41
|
*/
|
35
|
-
layout: {
|
36
|
-
ntype: 'vbox'
|
37
|
-
}
|
42
|
+
layout: {ntype: 'vbox'}
|
38
43
|
}
|
39
44
|
|
40
45
|
/**
|
@@ -44,6 +49,13 @@ class PageSectionsContainer extends Container {
|
|
44
49
|
get list() {
|
45
50
|
return this.getReference('list')
|
46
51
|
}
|
52
|
+
|
53
|
+
/**
|
54
|
+
* @param {Object} data
|
55
|
+
*/
|
56
|
+
onPageListSelect(data) {
|
57
|
+
this.toggleCls('neo-expanded', false)
|
58
|
+
}
|
47
59
|
}
|
48
60
|
|
49
61
|
Neo.setupClass(PageSectionsContainer);
|
package/package.json
CHANGED
@@ -9,17 +9,33 @@
|
|
9
9
|
&.neo-tree-list {
|
10
10
|
.neo-list-container {
|
11
11
|
.neo-list-item {
|
12
|
+
&.neo-list-item-leaf {
|
13
|
+
.neo-list-item-content:after {
|
14
|
+
content: none !important;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
12
18
|
.neo-list-item-content:before {
|
13
19
|
content: unset !important;
|
14
20
|
}
|
15
21
|
|
16
22
|
&.neo-list-folder {
|
23
|
+
.neo-list-item-content:after {
|
24
|
+
content: "\e5cc" !important;
|
25
|
+
}
|
26
|
+
|
17
27
|
.neo-list-item-content:before {
|
18
28
|
content: unset !important;
|
19
29
|
}
|
20
30
|
|
21
|
-
&.neo-folder-open
|
22
|
-
content:
|
31
|
+
&.neo-folder-open {
|
32
|
+
.neo-list-item-content:after {
|
33
|
+
content: "\e5cf" !important;
|
34
|
+
}
|
35
|
+
|
36
|
+
.neo-list-item-content:before {
|
37
|
+
content: unset !important;
|
38
|
+
}
|
23
39
|
}
|
24
40
|
}
|
25
41
|
}
|
@@ -78,28 +94,4 @@
|
|
78
94
|
}
|
79
95
|
}
|
80
96
|
}
|
81
|
-
|
82
|
-
&.neo-tree-list {
|
83
|
-
.neo-list-container {
|
84
|
-
.neo-list-item {
|
85
|
-
&.neo-list-item-leaf {
|
86
|
-
.neo-list-item-content:after {
|
87
|
-
content: none !important;
|
88
|
-
}
|
89
|
-
}
|
90
|
-
|
91
|
-
&.neo-list-folder {
|
92
|
-
.neo-list-item-content:after {
|
93
|
-
content: "\e5cc" !important;
|
94
|
-
}
|
95
|
-
|
96
|
-
&.neo-folder-open {
|
97
|
-
.neo-list-item-content:after {
|
98
|
-
content: "\e5cf" !important;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
}
|
102
|
-
}
|
103
|
-
}
|
104
|
-
}
|
105
97
|
}
|
@@ -4,32 +4,39 @@
|
|
4
4
|
.main-content-splitter {
|
5
5
|
margin: 0;
|
6
6
|
}
|
7
|
-
}
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
width: 6px;
|
13
|
-
}
|
8
|
+
.sidenav-button {
|
9
|
+
display: none;
|
10
|
+
}
|
14
11
|
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
.sidenav-container {
|
13
|
+
min-width: 350px;
|
14
|
+
width : 350px;
|
15
|
+
}
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
@media (max-width: 640px) {
|
18
|
+
.sidenav-container {
|
19
|
+
box-shadow: 0 5px 10px rgba(0,0,0,.3);
|
20
|
+
left : -350px;
|
21
|
+
overflow : visible;
|
22
|
+
position : fixed;
|
23
|
+
transition: left 250ms ease-out;
|
24
|
+
z-index : 101;
|
22
25
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
border-radius: 100px;
|
27
|
-
}
|
28
|
-
}
|
26
|
+
&.neo-expanded {
|
27
|
+
left: 0;
|
28
|
+
}
|
29
29
|
|
30
|
-
.
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
.sidenav-button {
|
31
|
+
box-shadow: 0 5px 10px rgba(0,0,0,.3);
|
32
|
+
display : flex;
|
33
|
+
height : 35px;
|
34
|
+
min-width : 35px;
|
35
|
+
position : absolute;
|
36
|
+
right : -42px;
|
37
|
+
width : 35px;
|
38
|
+
z-index : 101;
|
39
|
+
}
|
40
|
+
}
|
34
41
|
}
|
35
|
-
}
|
42
|
+
}
|
@@ -3,12 +3,42 @@
|
|
3
3
|
border : none; // reset the default 1px
|
4
4
|
display : block;
|
5
5
|
flex-shrink : 0;
|
6
|
+
min-width : 250px;
|
6
7
|
position : fixed;
|
7
8
|
right : 0;
|
8
9
|
width : 250px;
|
9
10
|
z-index : 1;
|
10
11
|
|
11
12
|
h3 {
|
12
|
-
margin-
|
13
|
+
margin-bottom: .4em;
|
14
|
+
margin-left : 16px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.sections-container-button {
|
18
|
+
display: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
@media (max-width: 1296px) {
|
22
|
+
background-color: #fff;
|
23
|
+
box-shadow : 0 5px 10px rgba(0,0,0,.3);
|
24
|
+
overflow : visible;
|
25
|
+
right : -250px;
|
26
|
+
transition : right 250ms ease-out;
|
27
|
+
z-index : 100;
|
28
|
+
|
29
|
+
&.neo-expanded {
|
30
|
+
right: 0;
|
31
|
+
}
|
32
|
+
|
33
|
+
.sections-container-button {
|
34
|
+
background-color: #fff;
|
35
|
+
box-shadow : 0 5px 10px rgba(0,0,0,.3);
|
36
|
+
display : flex;
|
37
|
+
height : 35px;
|
38
|
+
min-width : 35px;
|
39
|
+
position : absolute;
|
40
|
+
left : -42px;
|
41
|
+
width : 35px;
|
42
|
+
}
|
13
43
|
}
|
14
44
|
}
|
package/src/DefaultConfig.mjs
CHANGED
@@ -260,12 +260,12 @@ const DefaultConfig = {
|
|
260
260
|
useVdomWorker: true,
|
261
261
|
/**
|
262
262
|
* buildScripts/injectPackageVersion.mjs will update this value
|
263
|
-
* @default '6.
|
263
|
+
* @default '6.26.0'
|
264
264
|
* @memberOf! module:Neo
|
265
265
|
* @name config.version
|
266
266
|
* @type String
|
267
267
|
*/
|
268
|
-
version: '6.
|
268
|
+
version: '6.26.0'
|
269
269
|
};
|
270
270
|
|
271
271
|
Object.assign(DefaultConfig, {
|