neo.mjs 4.2.7 → 4.3.1
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/realworld/view/HomeComponent.mjs +3 -6
- package/apps/realworld/view/article/CommentComponent.mjs +3 -6
- package/apps/realworld/view/article/Component.mjs +4 -7
- package/apps/realworld/view/article/CreateCommentComponent.mjs +3 -6
- package/apps/realworld/view/article/CreateComponent.mjs +3 -6
- package/apps/realworld/view/article/PreviewComponent.mjs +2 -5
- package/apps/realworld/view/article/TagListComponent.mjs +2 -5
- package/apps/realworld/view/user/ProfileComponent.mjs +3 -6
- package/apps/realworld/view/user/SettingsComponent.mjs +3 -6
- package/apps/realworld/view/user/SignUpComponent.mjs +2 -5
- package/apps/realworld2/view/article/PreviewComponent.mjs +2 -5
- package/apps/realworld2/view/article/TagListComponent.mjs +2 -5
- 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/buildScripts/addConfig.mjs +1 -0
- package/examples/ConfigurationViewport.mjs +1 -1
- package/examples/button/base/MainContainer.mjs +75 -12
- package/examples/tab/container/MainContainer.mjs +3 -3
- package/examples/todoList/version1/MainComponent.mjs +3 -6
- 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/button/Base.scss +41 -3
- package/resources/scss/src/calendar/view/calendars/ColorsList.scss +5 -2
- 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 +3 -4
- package/resources/scss/src/tab/header/Button.scss +6 -1
- package/resources/scss/src/table/Container.scss +3 -1
- package/resources/scss/src/table/header/Button.scss +21 -1
- package/resources/scss/src/tree/List.scss +11 -1
- package/resources/scss/theme-dark/button/Base.scss +7 -1
- package/resources/scss/theme-dark/table/header/Button.scss +11 -9
- package/resources/scss/theme-light/button/Base.scss +7 -1
- package/resources/scss/theme-light/table/header/Button.scss +11 -9
- package/src/button/Base.mjs +151 -43
- package/src/calendar/view/YearComponent.mjs +3 -6
- package/src/calendar/view/calendars/ColorsList.mjs +18 -0
- package/src/calendar/view/calendars/EditContainer.mjs +7 -9
- package/src/calendar/view/month/Component.mjs +3 -6
- package/src/calendar/view/week/Component.mjs +3 -6
- package/src/calendar/view/week/plugin/DragDrop.mjs +6 -9
- package/src/component/Base.mjs +123 -58
- package/src/component/Carousel.mjs +5 -17
- package/src/component/Chip.mjs +2 -7
- package/src/component/Circle.mjs +4 -7
- package/src/component/DateSelector.mjs +5 -8
- package/src/component/Gallery.mjs +4 -7
- package/src/component/Helix.mjs +2 -5
- package/src/component/Splitter.mjs +3 -6
- package/src/component/mwc/Button.mjs +4 -7
- package/src/component/mwc/TextField.mjs +2 -5
- package/src/draggable/DropZone.mjs +3 -7
- package/src/draggable/list/DragZone.mjs +6 -9
- package/src/draggable/toolbar/DragZone.mjs +5 -8
- package/src/form/Fieldset.mjs +3 -6
- package/src/form/field/CheckBox.mjs +2 -5
- package/src/form/field/Range.mjs +3 -6
- package/src/form/field/Text.mjs +2 -5
- package/src/form/field/trigger/Base.mjs +4 -12
- package/src/grid/header/Button.mjs +3 -6
- 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 +28 -36
- package/src/layout/HBox.mjs +1 -1
- package/src/layout/VBox.mjs +1 -1
- package/src/list/Base.mjs +31 -11
- package/src/plugin/Resizable.mjs +3 -6
- package/src/selection/grid/CellModel.mjs +3 -6
- package/src/selection/grid/ColumnModel.mjs +3 -6
- package/src/selection/grid/RowModel.mjs +3 -6
- package/src/selection/table/CellModel.mjs +3 -6
- package/src/selection/table/ColumnModel.mjs +3 -6
- package/src/selection/table/RowModel.mjs +3 -6
- package/src/sitemap/Component.mjs +3 -6
- package/src/tab/Container.mjs +1 -1
- package/src/tab/header/Button.mjs +13 -2
- package/src/table/Container.mjs +11 -3
- package/src/table/header/Button.mjs +9 -5
- package/src/tooltip/Base.mjs +5 -15
- package/src/tree/List.mjs +4 -0
- package/src/util/KeyNavigation.mjs +8 -13
@@ -28,17 +28,14 @@ class RowModel extends Model {
|
|
28
28
|
*
|
29
29
|
*/
|
30
30
|
addDomListener() {
|
31
|
-
let me
|
32
|
-
view
|
33
|
-
domListeners = view.domListeners;
|
31
|
+
let me = this,
|
32
|
+
view = me.view;
|
34
33
|
|
35
|
-
|
34
|
+
view.addDomListeners({
|
36
35
|
click : me.onRowClick,
|
37
36
|
delegate: '.neo-table-row',
|
38
37
|
scope : me
|
39
38
|
});
|
40
|
-
|
41
|
-
view.domListeners = domListeners;
|
42
39
|
}
|
43
40
|
|
44
41
|
/**
|
@@ -50,15 +50,12 @@ class Component extends Base {
|
|
50
50
|
construct(config) {
|
51
51
|
super.construct(config);
|
52
52
|
|
53
|
-
let me
|
54
|
-
domListeners = me.domListeners;
|
53
|
+
let me = this;
|
55
54
|
|
56
|
-
|
55
|
+
me.addDomListeners([
|
57
56
|
{click: me.onItemHandlerClick, delegate: '.neo-action-handler', scope: me},
|
58
57
|
{click: me.onItemClick, delegate: '.neo-action', scope: me}
|
59
|
-
);
|
60
|
-
|
61
|
-
me.domListeners = domListeners;
|
58
|
+
]);
|
62
59
|
}
|
63
60
|
|
64
61
|
/**
|
package/src/tab/Container.mjs
CHANGED
@@ -157,7 +157,7 @@ class Container extends BaseContainer {
|
|
157
157
|
afterSetPlain(value, oldValue) {
|
158
158
|
let me = this,
|
159
159
|
baseCls = me.baseCls,
|
160
|
-
cls = me.cls
|
160
|
+
cls = me.cls;
|
161
161
|
|
162
162
|
NeoArray[value ? 'unshift' : 'remove'](cls, baseCls + '-plain');
|
163
163
|
me.cls = cls;
|
@@ -28,9 +28,13 @@ class Button extends BaseButton {
|
|
28
28
|
* @member {Object} _vdom
|
29
29
|
*/
|
30
30
|
_vdom:
|
31
|
-
{tag: 'button', cn: [
|
31
|
+
{tag: 'button', type: 'button', cn: [
|
32
32
|
{tag: 'span', cls: ['neo-button-glyph']},
|
33
33
|
{tag: 'span', cls: ['neo-button-text']},
|
34
|
+
{cls: ['neo-button-badge']},
|
35
|
+
{cls: ['neo-button-ripple-wrapper'], cn: [
|
36
|
+
{cls: ['neo-button-ripple']}
|
37
|
+
]},
|
34
38
|
{cls: ['neo-tab-button-indicator']}
|
35
39
|
]}
|
36
40
|
}}
|
@@ -45,6 +49,13 @@ class Button extends BaseButton {
|
|
45
49
|
this.updateUseActiveTabIndicator();
|
46
50
|
}
|
47
51
|
|
52
|
+
/**
|
53
|
+
* @param {Object} data
|
54
|
+
*/
|
55
|
+
showRipple(data) {
|
56
|
+
!this.pressed && super.showRipple(data);
|
57
|
+
}
|
58
|
+
|
48
59
|
/**
|
49
60
|
* @param {Boolean} [silent=false]
|
50
61
|
*/
|
@@ -52,7 +63,7 @@ class Button extends BaseButton {
|
|
52
63
|
let me = this,
|
53
64
|
vdom = me.vdom;
|
54
65
|
|
55
|
-
vdom.cn[
|
66
|
+
vdom.cn[4].removeDom = !me.useActiveTabIndicator;
|
56
67
|
|
57
68
|
me[silent ? '_vdom' : 'vdom'] = vdom;
|
58
69
|
}
|
package/src/table/Container.mjs
CHANGED
@@ -135,7 +135,7 @@ class Container extends BaseContainer {
|
|
135
135
|
...me.viewConfig
|
136
136
|
}];
|
137
137
|
|
138
|
-
me.vdom.id = me.
|
138
|
+
me.vdom.id = me.getWrapperId();
|
139
139
|
|
140
140
|
me.createColumns(me.columns);
|
141
141
|
}
|
@@ -179,14 +179,15 @@ class Container extends BaseContainer {
|
|
179
179
|
*/
|
180
180
|
applyCustomScrollbarsCss() {
|
181
181
|
let me = this,
|
182
|
+
id = me.getWrapperId(),
|
182
183
|
cssRules = [];
|
183
184
|
|
184
185
|
if (me.dockLeftMargin) {
|
185
|
-
cssRules.push('#' +
|
186
|
+
cssRules.push('#' + id + '::-webkit-scrollbar-track:horizontal {margin-left: ' + me.dockLeftMargin + 'px;}');
|
186
187
|
}
|
187
188
|
|
188
189
|
if (me.dockRightMargin) {
|
189
|
-
cssRules.push('#' +
|
190
|
+
cssRules.push('#' + id + '::-webkit-scrollbar-track:horizontal {margin-right: ' + me.dockRightMargin + 'px;}');
|
190
191
|
}
|
191
192
|
if (cssRules.length > 0) {
|
192
193
|
Css.insertRules(cssRules);
|
@@ -368,6 +369,13 @@ class Container extends BaseContainer {
|
|
368
369
|
return this.vnode.childNodes[0];
|
369
370
|
}
|
370
371
|
|
372
|
+
/**
|
373
|
+
* @returns {String}
|
374
|
+
*/
|
375
|
+
getWrapperId() {
|
376
|
+
return `${this.id}__wrapper`;
|
377
|
+
}
|
378
|
+
|
371
379
|
/**
|
372
380
|
* @param {Number} countRows
|
373
381
|
*/
|
@@ -88,13 +88,17 @@ class Button extends BaseButton {
|
|
88
88
|
*/
|
89
89
|
showHeaderFilter_: false,
|
90
90
|
/**
|
91
|
-
* @member {
|
91
|
+
* @member {Object} _vdom
|
92
92
|
*/
|
93
93
|
_vdom:
|
94
94
|
{tag: 'th', cn: [
|
95
95
|
{tag: 'button', cn: [
|
96
96
|
{tag: 'span', cls: ['neo-button-glyph']},
|
97
|
-
{tag: 'span', cls: ['neo-button-text']}
|
97
|
+
{tag: 'span', cls: ['neo-button-text']},
|
98
|
+
{tag: 'span', cls: ['neo-button-badge']},
|
99
|
+
{tag: 'span', cls: ['neo-button-ripple-wrapper'], cn: [
|
100
|
+
{tag: 'span', cls: ['neo-button-ripple']}
|
101
|
+
]}
|
98
102
|
]}
|
99
103
|
]}
|
100
104
|
}}
|
@@ -122,7 +126,7 @@ class Button extends BaseButton {
|
|
122
126
|
});
|
123
127
|
}
|
124
128
|
|
125
|
-
me.
|
129
|
+
me.addDomListeners(listeners);
|
126
130
|
}
|
127
131
|
|
128
132
|
/**
|
@@ -146,8 +150,8 @@ class Button extends BaseButton {
|
|
146
150
|
|
147
151
|
/**
|
148
152
|
* Triggered after the isSorted config got changed
|
149
|
-
* @param {
|
150
|
-
* @param {
|
153
|
+
* @param {String|null} value
|
154
|
+
* @param {String|null} oldValue
|
151
155
|
* @protected
|
152
156
|
*/
|
153
157
|
afterSetIsSorted(value, oldValue) {
|
package/src/tooltip/Base.mjs
CHANGED
@@ -90,21 +90,14 @@ class Base extends Container {
|
|
90
90
|
}
|
91
91
|
|
92
92
|
if (value) {
|
93
|
-
let me
|
94
|
-
component = Neo.getComponent(value),
|
95
|
-
domListeners = component.domListeners || [];
|
93
|
+
let me = this;
|
96
94
|
|
97
|
-
|
95
|
+
Neo.getComponent(value).addDomListeners({
|
98
96
|
mouseenter: me.showDelayed,
|
99
|
-
delegate : me.delegate,
|
100
|
-
scope : me
|
101
|
-
}, {
|
102
97
|
mouseleave: me.hideDelayed,
|
103
98
|
delegate : me.delegate,
|
104
99
|
scope : me
|
105
100
|
});
|
106
|
-
|
107
|
-
component.domListeners = domListeners;
|
108
101
|
}
|
109
102
|
}
|
110
103
|
|
@@ -120,15 +113,12 @@ class Base extends Container {
|
|
120
113
|
}
|
121
114
|
|
122
115
|
if (value) {
|
123
|
-
let me
|
124
|
-
domListeners = me.domListeners || [];
|
116
|
+
let me = this;
|
125
117
|
|
126
|
-
|
118
|
+
me.addDomListeners([
|
127
119
|
{mouseenter: me.onMouseEnter, scope: me},
|
128
120
|
{mouseleave: me.onMouseLeave, scope: me}
|
129
|
-
);
|
130
|
-
|
131
|
-
me.domListeners = domListeners;
|
121
|
+
]);
|
132
122
|
}
|
133
123
|
}
|
134
124
|
|
package/src/tree/List.mjs
CHANGED
@@ -141,23 +141,18 @@ class KeyNavigation extends Base {
|
|
141
141
|
* @param {Neo.component.Base} component
|
142
142
|
*/
|
143
143
|
register(component) {
|
144
|
-
let me
|
145
|
-
domListeners = component.domListeners;
|
144
|
+
let me = this;
|
146
145
|
|
147
146
|
me.component = component;
|
148
147
|
me.keys = me.parseKeys(me.keys);
|
149
148
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
});
|
158
|
-
|
159
|
-
component.domListeners = domListeners;
|
160
|
-
}
|
149
|
+
component.addDomListeners({
|
150
|
+
keydown: {
|
151
|
+
bubble: me.keyDownEventBubble,
|
152
|
+
fn : me.onKeyDown,
|
153
|
+
scope : me
|
154
|
+
}
|
155
|
+
});
|
161
156
|
}
|
162
157
|
|
163
158
|
/**
|