neo.mjs 8.1.0 → 8.1.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/ServiceWorker.mjs +2 -2
- package/apps/portal/index.html +1 -1
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/component/toast/MainContainerController.mjs +4 -2
- package/package.json +1 -1
- package/resources/scss/src/grid/Container.scss +5 -3
- package/resources/scss/src/grid/View.scss +5 -4
- package/resources/scss/src/grid/header/Toolbar.scss +1 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/component/Toast.mjs +2 -2
- package/src/grid/Container.mjs +10 -4
- package/src/grid/header/Button.mjs +2 -2
- package/src/grid/header/Toolbar.mjs +30 -11
- package/src/main/addon/HighlightJS.mjs +2 -2
- package/src/manager/DomEvent.mjs +2 -2
- /package/examples/component/toast/resources/{highlight → lib/highlight}/CHANGES.md +0 -0
- /package/examples/component/toast/resources/{highlight → lib/highlight}/LICENSE +0 -0
- /package/examples/component/toast/resources/{highlight → lib/highlight}/README.md +0 -0
- /package/examples/component/toast/resources/{highlight → lib/highlight}/highlight.pack.js +0 -0
- /package/examples/component/toast/resources/{highlightjs-custom-dark-theme.css → lib/highlightjs-custom-dark-theme.css} +0 -0
- /package/examples/component/toast/resources/{highlightjs-custom-github-theme.css → lib/highlightjs-custom-github-theme.css} +0 -0
package/apps/ServiceWorker.mjs
CHANGED
package/apps/portal/index.html
CHANGED
@@ -20,7 +20,7 @@ class MainContainerController extends ComponentController {
|
|
20
20
|
construct(config) {
|
21
21
|
super.construct(config);
|
22
22
|
Neo.main.addon.HighlightJS.switchTheme('dark');
|
23
|
-
Neo.main.addon.HighlightJS.
|
23
|
+
Neo.main.addon.HighlightJS.loadFiles({})
|
24
24
|
}
|
25
25
|
|
26
26
|
/**
|
@@ -72,7 +72,9 @@ class MainContainerController extends ComponentController {
|
|
72
72
|
}
|
73
73
|
})
|
74
74
|
|
75
|
-
values.appName
|
75
|
+
values.appName = me.component.appName;
|
76
|
+
values.windowId = me.component.windowId;
|
77
|
+
|
76
78
|
Neo.toast(values)
|
77
79
|
}
|
78
80
|
|
package/package.json
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
.neo-grid-view-wrapper {
|
2
|
-
height
|
3
|
-
overflow-
|
4
|
-
overflow-
|
5
|
-
|
2
|
+
height : 100%;
|
3
|
+
overflow-anchor: none;
|
4
|
+
overflow-x : hidden;
|
5
|
+
overflow-y : auto;
|
6
|
+
position : relative;
|
6
7
|
|
7
8
|
.neo-grid-scrollbar {
|
8
9
|
height : 1px;
|
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 '8.1.
|
265
|
+
* @default '8.1.2'
|
266
266
|
* @memberOf! module:Neo
|
267
267
|
* @name config.version
|
268
268
|
* @type String
|
269
269
|
*/
|
270
|
-
version: '8.1.
|
270
|
+
version: '8.1.2'
|
271
271
|
};
|
272
272
|
|
273
273
|
Object.assign(DefaultConfig, {
|
package/src/component/Toast.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import Component from '../component/Base.mjs';
|
2
2
|
import NeoArray from "../util/Array.mjs";
|
3
3
|
import ToastManager from '../manager/Toast.mjs';
|
4
4
|
|
@@ -20,7 +20,7 @@ import ToastManager from '../manager/Toast.mjs';
|
|
20
20
|
title : 'Alarm Clock' // null
|
21
21
|
})
|
22
22
|
*/
|
23
|
-
class Toast extends
|
23
|
+
class Toast extends Component {
|
24
24
|
/**
|
25
25
|
* Valid values for positions
|
26
26
|
* @member {String[]} positions = ['tl','tc','tr','bl','bc','br']
|
package/src/grid/Container.mjs
CHANGED
@@ -614,10 +614,16 @@ class GridContainer extends BaseContainer {
|
|
614
614
|
let me = this,
|
615
615
|
[containerRect, headerRect] = await me.getDomRect([me.id, me.headerToolbarId]);
|
616
616
|
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
617
|
+
// delay for slow connections, where the container-sizing is not done yet
|
618
|
+
if (containerRect.height === headerRect.height) {
|
619
|
+
await me.timeout(100);
|
620
|
+
await me.passSizeToView(silent)
|
621
|
+
} else {
|
622
|
+
me.view[silent ? 'setSilent' : 'set']({
|
623
|
+
availableHeight: containerRect.height - headerRect.height,
|
624
|
+
containerWidth : containerRect.width
|
625
|
+
})
|
626
|
+
}
|
621
627
|
}
|
622
628
|
|
623
629
|
/**
|
@@ -28,9 +28,9 @@ class Button extends BaseButton {
|
|
28
28
|
*/
|
29
29
|
ntype: 'grid-header-button',
|
30
30
|
/**
|
31
|
-
* @member {String[]} baseCls=['neo-grid-header-button']
|
31
|
+
* @member {String[]} baseCls=['neo-grid-header-button','neo-button']
|
32
32
|
*/
|
33
|
-
baseCls: ['neo-grid-header-button'],
|
33
|
+
baseCls: ['neo-grid-header-button', 'neo-button'],
|
34
34
|
/**
|
35
35
|
* Alignment of the matching grid cells. Valid values are left, center, right
|
36
36
|
* @member {String} cellAlign_='left'
|
@@ -131,11 +131,12 @@ class Toolbar extends BaseToolbar {
|
|
131
131
|
if (item.dock) {
|
132
132
|
NeoArray.add(item.vdom.cls, 'neo-locked');
|
133
133
|
|
134
|
-
if (item.dock === 'left') {
|
134
|
+
/*if (item.dock === 'left') {
|
135
135
|
style.left = dockLeftWidth + 'px'
|
136
136
|
}
|
137
137
|
|
138
138
|
dockLeftWidth += (item.width + 1) // todo: borders fix
|
139
|
+
*/
|
139
140
|
}
|
140
141
|
|
141
142
|
item.sortable = me.sortable;
|
@@ -144,14 +145,14 @@ class Toolbar extends BaseToolbar {
|
|
144
145
|
// inverse loop direction
|
145
146
|
item = items[len - index -1];
|
146
147
|
|
147
|
-
if (item.dock === 'right') {
|
148
|
+
/*if (item.dock === 'right') {
|
148
149
|
style = item.wrapperStyle;
|
149
150
|
style.right = dockRightWidth + 'px';
|
150
151
|
|
151
152
|
item.wrapperStyle = style;
|
152
153
|
|
153
154
|
dockRightWidth += (item.width + 1) // todo: borders fix
|
154
|
-
}
|
155
|
+
}*/
|
155
156
|
});
|
156
157
|
|
157
158
|
me.update()
|
@@ -178,14 +179,32 @@ class Toolbar extends BaseToolbar {
|
|
178
179
|
* @returns {Promise<void>}
|
179
180
|
*/
|
180
181
|
async passSizeToView(silent=false) {
|
181
|
-
let me
|
182
|
-
rects
|
183
|
-
lastItem
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
182
|
+
let me = this,
|
183
|
+
rects = await me.getDomRect(me.items.map(item => item.id)),
|
184
|
+
lastItem = rects[rects.length - 1],
|
185
|
+
columnPositions = rects.map(item => ({width: item.width, x: item.x - rects[0].x})),
|
186
|
+
i = 1,
|
187
|
+
len = columnPositions.length,
|
188
|
+
layoutFinished = true;
|
189
|
+
|
190
|
+
// If the css sizing is not done, columns after the first one can get x = 0
|
191
|
+
for (; i < len; i++) {
|
192
|
+
if (columnPositions[i].x === 0) {
|
193
|
+
layoutFinished = false;
|
194
|
+
break;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
// Delay for slow connections, where the container-sizing is not done yet
|
199
|
+
if (!layoutFinished) {
|
200
|
+
await me.timeout(100);
|
201
|
+
await me.passSizeToView(silent)
|
202
|
+
} else {
|
203
|
+
me.gridContainer.view[silent ? 'setSilent' : 'set']({
|
204
|
+
availableWidth: lastItem.x + lastItem.width - rects[0].x,
|
205
|
+
columnPositions
|
206
|
+
})
|
207
|
+
}
|
189
208
|
}
|
190
209
|
}
|
191
210
|
|
@@ -126,8 +126,8 @@ class HighlightJS extends Base {
|
|
126
126
|
*/
|
127
127
|
switchTheme(theme) {
|
128
128
|
let definedThemes = {
|
129
|
-
dark : './resources/highlightjs-custom-dark-theme.css',
|
130
|
-
light: './resources/highlightjs-custom-github-theme.css'
|
129
|
+
dark : './resources/lib/highlightjs-custom-dark-theme.css',
|
130
|
+
light: './resources/lib/highlightjs-custom-github-theme.css'
|
131
131
|
},
|
132
132
|
switchToTheme = definedThemes[theme];
|
133
133
|
|
package/src/manager/DomEvent.mjs
CHANGED
@@ -427,9 +427,9 @@ class DomEvent extends Base {
|
|
427
427
|
if (!eventConfigKeys.includes(key)) {
|
428
428
|
me.register({
|
429
429
|
bubble : domListener.bubble || value.bubble,
|
430
|
-
delegate : domListener.delegate || value.delegate || '#' + component.vdom.id,
|
430
|
+
delegate : domListener.delegate || value.delegate || '#' + (component.vdom.id || component.id),
|
431
431
|
eventName : key,
|
432
|
-
id : component.vdom.id, // honor wrapper nodes
|
432
|
+
id : component.vdom.id || component.id, // honor wrapper nodes
|
433
433
|
opts : value,
|
434
434
|
originalConfig: domListener,
|
435
435
|
ownerId : component.id,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|