neo.mjs 4.3.0 → 4.3.2
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/website/view/MainContainer.mjs +1 -0
- package/apps/website/view/MainContainerController.mjs +7 -0
- package/apps/website/view/blog/List.mjs +41 -3
- package/apps/website/view/examples/List.mjs +28 -3
- package/apps/website/view/examples/TabContainer.mjs +7 -4
- package/apps/website/view/home/DeveloperIntroComponent.mjs +227 -225
- package/apps/website/view/home/ExecutiveIntroComponent.mjs +242 -240
- package/buildScripts/addConfig.mjs +1 -0
- package/examples/tab/container/MainContainer.mjs +78 -5
- package/package.json +1 -1
- package/resources/scss/src/apps/website/blog/List.scss +2 -2
- package/resources/scss/src/apps/website/examples/List.scss +2 -2
- package/resources/scss/src/apps/website/home/TabContainer.scss +6 -1
- package/resources/scss/src/button/Base.scss +10 -8
- package/resources/scss/src/calendar/view/calendars/ColorsList.scss +5 -2
- package/resources/scss/src/component/Label.scss +2 -1
- package/resources/scss/src/form/field/Radio.scss +6 -4
- package/resources/scss/src/form/field/Text.scss +4 -3
- package/resources/scss/src/layout/Card.scss +6 -10
- package/resources/scss/src/list/Base.scss +11 -3
- package/resources/scss/src/tab/Container.scss +2 -1
- package/resources/scss/src/tab/header/Toolbar.scss +1 -1
- package/resources/scss/src/table/Container.scss +3 -1
- package/resources/scss/src/toolbar/Base.scss +69 -3
- package/resources/scss/src/tree/List.scss +11 -1
- package/resources/scss/theme-dark/button/Base.scss +4 -0
- package/resources/scss/theme-light/button/Base.scss +4 -0
- package/src/calendar/view/calendars/ColorsList.mjs +18 -0
- package/src/calendar/view/calendars/EditContainer.mjs +7 -9
- package/src/component/Base.mjs +184 -114
- package/src/container/Base.mjs +3 -3
- package/src/draggable/toolbar/DragZone.mjs +5 -6
- package/src/form/field/Text.mjs +3 -1
- package/src/layout/Base.mjs +5 -7
- package/src/layout/Card.mjs +32 -35
- package/src/layout/Fit.mjs +11 -11
- package/src/layout/Flexbox.mjs +32 -40
- package/src/layout/HBox.mjs +1 -1
- package/src/layout/VBox.mjs +1 -1
- package/src/list/Base.mjs +27 -5
- package/src/tab/Container.mjs +11 -11
- package/src/tab/header/Button.mjs +2 -2
- package/src/table/Container.mjs +11 -3
- package/src/tree/List.mjs +4 -0
@@ -13,7 +13,8 @@ class MainContainer extends ConfigurationViewport {
|
|
13
13
|
static getConfig() {return {
|
14
14
|
className : 'Neo.examples.tab.container.MainContainer',
|
15
15
|
autoMount : true,
|
16
|
-
configItemLabelWidth:
|
16
|
+
configItemLabelWidth: 160,
|
17
|
+
configItemWidth : 280,
|
17
18
|
layout : {ntype: 'hbox', align: 'stretch'}
|
18
19
|
}}
|
19
20
|
|
@@ -121,6 +122,45 @@ class MainContainer extends ConfigurationViewport {
|
|
121
122
|
labelText: 'Tab 1 text',
|
122
123
|
listeners: {change: me.onFirstTabHeaderConfigChange.bind(me, 'text')},
|
123
124
|
value : me.getFirstTabHeader().text
|
125
|
+
}, {
|
126
|
+
module : Radio,
|
127
|
+
checked : me.getBadgeTabHeader().badgePosition === 'bottom-left',
|
128
|
+
hideValueLabel: false,
|
129
|
+
labelText : 'badgePosition',
|
130
|
+
listeners : {change: me.onBadgeRadioChange.bind(me, 'badgePosition', 'bottom-left')},
|
131
|
+
name : 'badgePosition',
|
132
|
+
style : {marginTop: '50px'},
|
133
|
+
valueLabelText: 'bottom-left'
|
134
|
+
}, {
|
135
|
+
module : Radio,
|
136
|
+
checked : me.getBadgeTabHeader().badgePosition === 'bottom-right',
|
137
|
+
hideValueLabel: false,
|
138
|
+
labelText : '',
|
139
|
+
listeners : {change: me.onBadgeRadioChange.bind(me, 'badgePosition', 'bottom-right')},
|
140
|
+
name : 'badgePosition',
|
141
|
+
valueLabelText: 'bottom-right'
|
142
|
+
}, {
|
143
|
+
module : Radio,
|
144
|
+
checked : me.getBadgeTabHeader().badgePosition === 'top-left',
|
145
|
+
hideValueLabel: false,
|
146
|
+
labelText : '',
|
147
|
+
listeners : {change: me.onBadgeRadioChange.bind(me, 'badgePosition', 'top-left')},
|
148
|
+
name : 'badgePosition',
|
149
|
+
valueLabelText: 'top-left'
|
150
|
+
}, {
|
151
|
+
module : Radio,
|
152
|
+
checked : me.getBadgeTabHeader().badgePosition === 'top-right',
|
153
|
+
hideValueLabel: false,
|
154
|
+
labelText : '',
|
155
|
+
listeners : {change: me.onBadgeRadioChange.bind(me, 'badgePosition', 'top-right')},
|
156
|
+
name : 'badgePosition',
|
157
|
+
valueLabelText: 'top-right'
|
158
|
+
}, {
|
159
|
+
module : TextField,
|
160
|
+
labelText: 'badgeText',
|
161
|
+
listeners: {change: me.onBadgeConfigChange.bind(me, 'badgeText')},
|
162
|
+
style : {marginTop: '10px'},
|
163
|
+
value : me.getBadgeTabHeader().badgeText
|
124
164
|
}];
|
125
165
|
}
|
126
166
|
|
@@ -158,11 +198,17 @@ class MainContainer extends ConfigurationViewport {
|
|
158
198
|
}
|
159
199
|
|
160
200
|
/**
|
161
|
-
* @
|
162
|
-
* @param {Object} opts
|
201
|
+
* @returns {Neo.tab.header.Button}
|
163
202
|
*/
|
164
|
-
|
165
|
-
this.exampleComponent.getTabBar().items
|
203
|
+
getBadgeTabHeader() {
|
204
|
+
let tabHeaders = this.exampleComponent.getTabBar().items,
|
205
|
+
item
|
206
|
+
|
207
|
+
for (item of tabHeaders) {
|
208
|
+
if (item.text === 'Tab 3') {
|
209
|
+
return item;
|
210
|
+
}
|
211
|
+
}
|
166
212
|
}
|
167
213
|
|
168
214
|
/**
|
@@ -172,6 +218,33 @@ class MainContainer extends ConfigurationViewport {
|
|
172
218
|
return this.exampleComponent.getTabBar().items[0];
|
173
219
|
}
|
174
220
|
|
221
|
+
/**
|
222
|
+
* @param {String} config
|
223
|
+
* @param {Object} opts
|
224
|
+
*/
|
225
|
+
onBadgeConfigChange(config, opts) {
|
226
|
+
this.getBadgeTabHeader()[config] = opts.value;
|
227
|
+
}
|
228
|
+
|
229
|
+
/**
|
230
|
+
* @param {String} config
|
231
|
+
* @param {String} value
|
232
|
+
* @param {Object} opts
|
233
|
+
*/
|
234
|
+
onBadgeRadioChange(config, value, opts) {
|
235
|
+
if (opts.value === true) { // we only want to listen to check events, not uncheck
|
236
|
+
this.getBadgeTabHeader()[config] = value;
|
237
|
+
}
|
238
|
+
}
|
239
|
+
|
240
|
+
/**
|
241
|
+
* @param {String} config
|
242
|
+
* @param {Object} opts
|
243
|
+
*/
|
244
|
+
onFirstTabHeaderConfigChange(config, opts) {
|
245
|
+
this.exampleComponent.getTabBar().items[0][config] = opts.value;
|
246
|
+
}
|
247
|
+
|
175
248
|
/**
|
176
249
|
* @param {Object} data
|
177
250
|
* @param {Neo.component.Base} data.component
|
package/package.json
CHANGED
@@ -8,8 +8,13 @@
|
|
8
8
|
flex : auto !important;
|
9
9
|
font-weight: 400;
|
10
10
|
overflow-y : auto;
|
11
|
+
position : relative;
|
11
12
|
word-break : break-word;
|
12
13
|
|
14
|
+
.neo-absolute {
|
15
|
+
position: absolute;
|
16
|
+
}
|
17
|
+
|
13
18
|
a {
|
14
19
|
color: #1c60a0;
|
15
20
|
}
|
@@ -109,4 +114,4 @@
|
|
109
114
|
}
|
110
115
|
}
|
111
116
|
}
|
112
|
-
}
|
117
|
+
}
|
@@ -64,27 +64,29 @@
|
|
64
64
|
color : v(button-badge-color);
|
65
65
|
margin-left : auto;
|
66
66
|
padding : 3px;
|
67
|
+
pointer-events : none;
|
67
68
|
position : absolute;
|
69
|
+
user-select : none;
|
68
70
|
z-index : 2;
|
69
71
|
|
70
72
|
&.neo-bottom-left {
|
71
|
-
bottom: -
|
72
|
-
left : -
|
73
|
+
bottom: v(button-badge-margin-top);
|
74
|
+
left : v(button-badge-margin-left);
|
73
75
|
}
|
74
76
|
|
75
77
|
&.neo-bottom-right {
|
76
|
-
bottom: -
|
77
|
-
right : -
|
78
|
+
bottom: v(button-badge-margin-top);
|
79
|
+
right : v(button-badge-margin-left);
|
78
80
|
}
|
79
81
|
|
80
82
|
&.neo-top-left {
|
81
|
-
left: -
|
82
|
-
top : -
|
83
|
+
left: v(button-badge-margin-left);
|
84
|
+
top : v(button-badge-margin-top);
|
83
85
|
}
|
84
86
|
|
85
87
|
&.neo-top-right {
|
86
|
-
right: -
|
87
|
-
top : -
|
88
|
+
right: v(button-badge-margin-left);
|
89
|
+
top : v(button-badge-margin-top);
|
88
90
|
}
|
89
91
|
}
|
90
92
|
|
@@ -1,4 +1,6 @@
|
|
1
1
|
.neo-calendars-colors-list {
|
2
|
+
overflow: visible;
|
3
|
+
|
2
4
|
&:focus {
|
3
5
|
outline: none;
|
4
6
|
}
|
@@ -7,11 +9,12 @@
|
|
7
9
|
border-radius: 50%;
|
8
10
|
display : inline-block;
|
9
11
|
height : 1.5em;
|
10
|
-
margin
|
12
|
+
margin : 0.3em 0.3em 0.3em 0;
|
13
|
+
transition : box-shadow .2s;
|
11
14
|
width : 1.5em;
|
12
15
|
|
13
16
|
&.neo-selected {
|
14
|
-
box-shadow: 0 0 0
|
17
|
+
box-shadow: 0 0 0 0.25em currentColor;
|
15
18
|
}
|
16
19
|
}
|
17
20
|
}
|
@@ -26,11 +26,13 @@
|
|
26
26
|
}
|
27
27
|
|
28
28
|
.neo-radio-label {
|
29
|
-
color
|
30
|
-
display: inline-block;
|
29
|
+
color : v(textfield-label-color);
|
30
|
+
display : inline-block;
|
31
|
+
user-select: none;
|
31
32
|
}
|
32
33
|
|
33
34
|
.neo-radio-value-label {
|
34
|
-
color: v(textfield-label-color);
|
35
|
+
color : v(textfield-label-color);
|
36
|
+
user-select: none;
|
35
37
|
}
|
36
|
-
}
|
38
|
+
}
|
@@ -1,16 +1,12 @@
|
|
1
1
|
.neo-layout-card {
|
2
2
|
display : flex;
|
3
3
|
align-items: stretch;
|
4
|
-
}
|
5
|
-
|
6
|
-
.neo-layout-card-item {
|
7
|
-
flex: 1 0 100%;
|
8
4
|
|
9
|
-
|
5
|
+
> * {
|
6
|
+
flex: 1 0 100%;
|
10
7
|
|
8
|
+
&.neo-inactive-item {
|
9
|
+
display: none !important;
|
10
|
+
}
|
11
11
|
}
|
12
|
-
|
13
|
-
&.inactive-item {
|
14
|
-
display: none !important;
|
15
|
-
}
|
16
|
-
}
|
12
|
+
}
|
@@ -1,7 +1,8 @@
|
|
1
|
-
.neo-list-
|
1
|
+
.neo-list-wrapper {
|
2
2
|
background-color: v(list-container-background-color);
|
3
3
|
border : v(list-container-border);
|
4
|
-
overflow :
|
4
|
+
overflow : hidden;
|
5
|
+
position : relative;
|
5
6
|
}
|
6
7
|
|
7
8
|
.neo-list {
|
@@ -12,6 +13,7 @@
|
|
12
13
|
margin-inline-start : 0;
|
13
14
|
margin-inline-end : 0;
|
14
15
|
padding-inline-start: 0;
|
16
|
+
overflow : auto;
|
15
17
|
|
16
18
|
&.neo-use-checkicons {
|
17
19
|
.neo-list-item:before {
|
@@ -28,6 +30,12 @@
|
|
28
30
|
}
|
29
31
|
}
|
30
32
|
|
33
|
+
&.neo-use-wrapper-node {
|
34
|
+
height : 100%;
|
35
|
+
position: absolute;
|
36
|
+
width : 100%;
|
37
|
+
}
|
38
|
+
|
31
39
|
.neo-list-item {
|
32
40
|
background-color: v(list-item-background-color);
|
33
41
|
cursor : pointer;
|
@@ -51,4 +59,4 @@
|
|
51
59
|
color: v(list-item-highlight-search-color);
|
52
60
|
}
|
53
61
|
}
|
54
|
-
}
|
62
|
+
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
.neo-table-wrapper {
|
2
2
|
overflow: auto;
|
3
|
+
position: relative;
|
3
4
|
height : 100%;
|
4
5
|
}
|
5
6
|
|
@@ -12,6 +13,7 @@
|
|
12
13
|
font-weight : 400;
|
13
14
|
line-height : 19px;
|
14
15
|
overflow : auto;
|
16
|
+
position : absolute;
|
15
17
|
|
16
18
|
tr {
|
17
19
|
height : 32px !important;
|
@@ -118,4 +120,4 @@
|
|
118
120
|
}
|
119
121
|
}
|
120
122
|
|
121
|
-
#myTableContainer ::-webkit-scrollbar-track:horizontal {margin-left: 400px;}
|
123
|
+
#myTableContainer ::-webkit-scrollbar-track:horizontal {margin-left: 400px;}
|
@@ -24,12 +24,45 @@
|
|
24
24
|
}
|
25
25
|
}
|
26
26
|
|
27
|
+
.neo-button-badge {
|
28
|
+
transform : rotate(180deg);
|
29
|
+
writing-mode: vertical-rl;
|
30
|
+
|
31
|
+
&.neo-bottom-left {
|
32
|
+
bottom: v(button-badge-margin-top);
|
33
|
+
left : unset;
|
34
|
+
right : v(button-badge-margin-left);
|
35
|
+
top : unset;
|
36
|
+
}
|
37
|
+
|
38
|
+
&.neo-bottom-right {
|
39
|
+
bottom: unset;
|
40
|
+
left : unset;
|
41
|
+
right : v(button-badge-margin-left);
|
42
|
+
top : v(button-badge-margin-top);
|
43
|
+
}
|
44
|
+
|
45
|
+
&.neo-top-left {
|
46
|
+
bottom: v(button-badge-margin-top);
|
47
|
+
left : v(button-badge-margin-left);
|
48
|
+
right : unset;
|
49
|
+
top : unset;
|
50
|
+
}
|
51
|
+
|
52
|
+
&.neo-top-right {
|
53
|
+
bottom: unset;
|
54
|
+
left : v(button-badge-margin-left);
|
55
|
+
right : unset;
|
56
|
+
top : v(button-badge-margin-top);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
27
60
|
.neo-button-glyph {
|
28
61
|
transform: rotate(-90deg);
|
29
62
|
}
|
30
63
|
|
31
64
|
.neo-button-text {
|
32
|
-
transform: rotate(180deg);
|
65
|
+
transform : rotate(180deg);
|
33
66
|
writing-mode: vertical-rl;
|
34
67
|
}
|
35
68
|
|
@@ -58,6 +91,38 @@
|
|
58
91
|
}
|
59
92
|
}
|
60
93
|
|
94
|
+
.neo-button-badge {
|
95
|
+
writing-mode: vertical-lr;
|
96
|
+
|
97
|
+
&.neo-bottom-left {
|
98
|
+
bottom: unset;
|
99
|
+
left : v(button-badge-margin-left);
|
100
|
+
right : unset;
|
101
|
+
top : v(button-badge-margin-top);
|
102
|
+
}
|
103
|
+
|
104
|
+
&.neo-bottom-right {
|
105
|
+
bottom: v(button-badge-margin-top);
|
106
|
+
left : v(button-badge-margin-left);
|
107
|
+
right : unset;
|
108
|
+
top : unset;
|
109
|
+
}
|
110
|
+
|
111
|
+
&.neo-top-left {
|
112
|
+
bottom: unset;
|
113
|
+
left : unset;
|
114
|
+
right : v(button-badge-margin-left);
|
115
|
+
top : v(button-badge-margin-top);
|
116
|
+
}
|
117
|
+
|
118
|
+
&.neo-top-right {
|
119
|
+
bottom: v(button-badge-margin-top);
|
120
|
+
left : unset;
|
121
|
+
right : v(button-badge-margin-left);
|
122
|
+
top : unset;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
61
126
|
.neo-button-glyph {
|
62
127
|
transform: rotate(90deg);
|
63
128
|
}
|
@@ -73,7 +138,8 @@
|
|
73
138
|
}
|
74
139
|
}
|
75
140
|
|
76
|
-
&.neo-dock-bottom,
|
141
|
+
&.neo-dock-bottom,
|
142
|
+
&.neo-dock-top {
|
77
143
|
.neo-button {
|
78
144
|
&.icon-left {
|
79
145
|
.neo-button-glyph {
|
@@ -85,4 +151,4 @@
|
|
85
151
|
margin: 0 10px 0 5px;
|
86
152
|
}
|
87
153
|
}
|
88
|
-
}
|
154
|
+
}
|
@@ -4,6 +4,16 @@
|
|
4
4
|
display : flex;
|
5
5
|
position: relative;
|
6
6
|
|
7
|
+
.neo-list {
|
8
|
+
overflow: visible;
|
9
|
+
}
|
10
|
+
|
11
|
+
.neo-list-container {
|
12
|
+
background-color: v(list-container-background-color);
|
13
|
+
border : v(list-container-border);
|
14
|
+
overflow : auto;
|
15
|
+
}
|
16
|
+
|
7
17
|
.neo-list-folder {
|
8
18
|
+ .neo-list {
|
9
19
|
display: none;
|
@@ -85,4 +95,4 @@
|
|
85
95
|
content: "\f07c";
|
86
96
|
}
|
87
97
|
}
|
88
|
-
}
|
98
|
+
}
|
@@ -8,6 +8,8 @@ $neoMap: map-merge($neoMap, (
|
|
8
8
|
'button-background-gradient-start': #434749,
|
9
9
|
'button-badge-background-color' : #64b5f6,
|
10
10
|
'button-badge-color' : #282828,
|
11
|
+
'button-badge-margin-left' : -10px,
|
12
|
+
'button-badge-margin-top' : -10px,
|
11
13
|
'button-border' : 1px solid #2b2b2b,
|
12
14
|
'button-border-radius' : 0,
|
13
15
|
'button-glyph-color' : #bbb,
|
@@ -38,6 +40,8 @@ $neoMap: map-merge($neoMap, (
|
|
38
40
|
--button-background-gradient-start: #{neo(button-background-gradient-start)};
|
39
41
|
--button-badge-background-color : #{neo(button-badge-background-color)};
|
40
42
|
--button-badge-color : #{neo(button-badge-color)};
|
43
|
+
--button-badge-margin-left : #{neo(button-badge-margin-left)};
|
44
|
+
--button-badge-margin-top : #{neo(button-badge-margin-top)};
|
41
45
|
--button-border : #{neo(button-border)};
|
42
46
|
--button-border-radius : #{neo(button-border-radius)};
|
43
47
|
--button-glyph-color : #{neo(button-glyph-color)};
|
@@ -8,6 +8,8 @@ $neoMap: map-merge($neoMap, (
|
|
8
8
|
'button-background-gradient-start': #434749,
|
9
9
|
'button-badge-background-color' : #1c60a0,
|
10
10
|
'button-badge-color' : #fff,
|
11
|
+
'button-badge-margin-left' : -10px,
|
12
|
+
'button-badge-margin-top' : -10px,
|
11
13
|
'button-border' : 1px solid #ddd,
|
12
14
|
'button-border-radius' : 3px,
|
13
15
|
'button-glyph-color' : #1c60a0,
|
@@ -38,6 +40,8 @@ $neoMap: map-merge($neoMap, (
|
|
38
40
|
--button-background-gradient-start: #{neo(button-background-gradient-start)};
|
39
41
|
--button-badge-background-color : #{neo(button-badge-background-color)};
|
40
42
|
--button-badge-color : #{neo(button-badge-color)};
|
43
|
+
--button-badge-margin-left : #{neo(button-badge-margin-left)};
|
44
|
+
--button-badge-margin-top : #{neo(button-badge-margin-top)};
|
41
45
|
--button-border : #{neo(button-border)};
|
42
46
|
--button-border-radius : #{neo(button-border-radius)};
|
43
47
|
--button-glyph-color : #{neo(button-glyph-color)};
|
@@ -21,6 +21,10 @@ class ColorsList extends List {
|
|
21
21
|
* @member {String[]} cls=['neo-calendars-colors-list','neo-list']
|
22
22
|
*/
|
23
23
|
cls: ['neo-calendars-colors-list', 'neo-list'],
|
24
|
+
/**
|
25
|
+
* @member {Boolean} useWrapperNode=false
|
26
|
+
*/
|
27
|
+
useWrapperNode: false,
|
24
28
|
/**
|
25
29
|
* The list gets used as a form field, so we are adjusting the selection based on this config
|
26
30
|
* @member {String} value_=null
|
@@ -63,6 +67,20 @@ class ColorsList extends List {
|
|
63
67
|
}};
|
64
68
|
}
|
65
69
|
|
70
|
+
/**
|
71
|
+
* @returns {Object}
|
72
|
+
*/
|
73
|
+
getVdomRoot() {
|
74
|
+
return this.vdom;
|
75
|
+
}
|
76
|
+
|
77
|
+
/**
|
78
|
+
* @returns {Object}
|
79
|
+
*/
|
80
|
+
getVnodeRoot() {
|
81
|
+
return this.vnode;
|
82
|
+
}
|
83
|
+
|
66
84
|
/**
|
67
85
|
*
|
68
86
|
*/
|
@@ -64,9 +64,7 @@ class EditContainer extends FormContainer {
|
|
64
64
|
afterSetMounted(value, oldValue) {
|
65
65
|
super.afterSetMounted(value, oldValue);
|
66
66
|
|
67
|
-
|
68
|
-
this.getField('name').focus();
|
69
|
-
}
|
67
|
+
value && this.getField('name').focus();
|
70
68
|
}
|
71
69
|
|
72
70
|
/**
|
@@ -117,12 +115,12 @@ class EditContainer extends FormContainer {
|
|
117
115
|
|
118
116
|
if (record) {
|
119
117
|
me.colorsList = Neo.create({
|
120
|
-
module
|
121
|
-
appName
|
122
|
-
listeners: {change: me.onColorChange, scope: me},
|
123
|
-
parentId
|
124
|
-
|
125
|
-
|
118
|
+
module : ColorsList,
|
119
|
+
appName : me.appName,
|
120
|
+
listeners : {change: me.onColorChange, scope: me},
|
121
|
+
parentId : me.parentId,
|
122
|
+
value : record.color,
|
123
|
+
wrapperStyle: {marginTop: '0.2em'},
|
126
124
|
...me.colorsListConfig
|
127
125
|
});
|
128
126
|
|