neo.mjs 8.1.1 → 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/src/DefaultConfig.mjs +2 -2
- package/src/component/Toast.mjs +2 -2
- package/src/grid/Container.mjs +10 -4
- package/src/grid/header/Toolbar.mjs +26 -8
- package/src/main/addon/HighlightJS.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
|
/**
|
@@ -179,14 +179,32 @@ class Toolbar extends BaseToolbar {
|
|
179
179
|
* @returns {Promise<void>}
|
180
180
|
*/
|
181
181
|
async passSizeToView(silent=false) {
|
182
|
-
let me
|
183
|
-
rects
|
184
|
-
lastItem
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
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
|
+
}
|
190
208
|
}
|
191
209
|
}
|
192
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
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|