neo.mjs 6.15.0 → 6.15.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/ServiceWorker.mjs +2 -2
- package/apps/portal/view/learn/MainContainerController.mjs +33 -26
- package/apps/website/neo-config.json +1 -1
- package/docs/app/view/classdetails/MembersList.mjs +1 -0
- package/docs/app/view/classdetails/SourceViewComponent.mjs +1 -1
- package/docs/resources/highlightjs-custom-dark-theme.css +2 -2
- package/docs/resources/highlightjs-custom-github-theme.css +2 -2
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +1 -1
- package/resources/scss/theme-neo-light/Global.scss +0 -19
- package/resources/scss/theme-neo-light/component/Splitter.scss +18 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/main/DomEvents.mjs +1 -1
- package/src/worker/Base.mjs +8 -6
package/apps/ServiceWorker.mjs
CHANGED
@@ -67,12 +67,13 @@ class MainContainerController extends Controller {
|
|
67
67
|
/**
|
68
68
|
* @param {Object} data
|
69
69
|
* @param {String} data.appName
|
70
|
+
* @param {Number} data.windowId
|
70
71
|
*/
|
71
|
-
async onAppConnect(data) {
|
72
|
+
async onAppConnect(data) {console.log(data);
|
72
73
|
let me = this,
|
73
74
|
app = Neo.apps[data.appName],
|
74
75
|
mainView = app.mainView,
|
75
|
-
windowId
|
76
|
+
{windowId} = data,
|
76
77
|
searchString = await Neo.Main.getByPath({path: 'location.search', windowId}),
|
77
78
|
livePreviewId = me.decodeUri(searchString.substring(1)).id,
|
78
79
|
livePreview = Neo.getComponent(livePreviewId),
|
@@ -91,32 +92,38 @@ class MainContainerController extends Controller {
|
|
91
92
|
/**
|
92
93
|
* @param {Object} data
|
93
94
|
* @param {String} data.appName
|
95
|
+
* @param {Number} data.windowId
|
94
96
|
*/
|
95
97
|
async onAppDisconnect(data) {
|
96
|
-
let me
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
98
|
+
let me = this,
|
99
|
+
{appName, windowId} = data,
|
100
|
+
app = Neo.apps[appName],
|
101
|
+
mainView = app.mainView;
|
102
|
+
|
103
|
+
// Closing a code preview window needs to drop the preview back into the related main app
|
104
|
+
if (appName !== 'Portal') {
|
105
|
+
let searchString = await Neo.Main.getByPath({path: 'location.search', windowId}),
|
106
|
+
livePreviewId = me.decodeUri(searchString.substring(1)).id,
|
107
|
+
livePreview = Neo.getComponent(livePreviewId),
|
108
|
+
sourceContainer = livePreview.getReference('preview'),
|
109
|
+
tabContainer = livePreview.tabContainer,
|
110
|
+
sourceView = mainView.removeAt(0, false);
|
111
|
+
|
112
|
+
livePreview.previewContainer = null;
|
113
|
+
sourceContainer.add(sourceView);
|
114
|
+
|
115
|
+
tabContainer.activeIndex = 1; // switch to the source view
|
116
|
+
|
117
|
+
livePreview.getReference('popout-window-button').disabled = false;
|
118
|
+
tabContainer.getTabAtIndex(1).disabled = false
|
119
|
+
}
|
120
|
+
// Close popup windows when closing or reloading the main window
|
121
|
+
else {
|
122
|
+
Neo.Main.windowClose({
|
123
|
+
names: me.connectedApps,
|
124
|
+
windowId
|
125
|
+
})
|
126
|
+
}
|
120
127
|
}
|
121
128
|
|
122
129
|
/**
|
@@ -14,7 +14,7 @@ pre.hljs {
|
|
14
14
|
display : block;
|
15
15
|
font-size : 12px;
|
16
16
|
overflow-x: auto;
|
17
|
-
padding : 0
|
17
|
+
padding : 0;
|
18
18
|
}
|
19
19
|
|
20
20
|
.hljs-comment,
|
@@ -133,4 +133,4 @@ pre.hljs {
|
|
133
133
|
|
134
134
|
.neo-highlighted-line {
|
135
135
|
background-color: #cee8fc !important;
|
136
|
-
}
|
136
|
+
}
|
package/package.json
CHANGED
@@ -56,22 +56,3 @@ mark {
|
|
56
56
|
color : black;
|
57
57
|
padding : 0.1em 0.2em;
|
58
58
|
}
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
.neo-splitter {
|
63
|
-
opacity: 1;
|
64
|
-
margin: 8px 2px;
|
65
|
-
border-radius: 100px;
|
66
|
-
border: unset !important;
|
67
|
-
|
68
|
-
&:hover, &:active {
|
69
|
-
background-color: #5595F5 !important;
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
.neo-dragproxy {
|
74
|
-
&.neo-splitter {
|
75
|
-
background-color: #5595F5 !important;
|
76
|
-
}
|
77
|
-
}
|
@@ -1,5 +1,22 @@
|
|
1
1
|
:root .neo-theme-neo-light { // .neo-splitter
|
2
2
|
--splitter-background-color: #f2f2f2;
|
3
3
|
--splitter-border : 1px solid #ddd;
|
4
|
-
--splitter-hover-color : #5d83a7
|
4
|
+
--splitter-hover-color : #5d83a7;
|
5
|
+
|
6
|
+
.neo-splitter {
|
7
|
+
opacity: 1;
|
8
|
+
margin: 8px 2px;
|
9
|
+
border-radius: 100px;
|
10
|
+
border: unset !important;
|
11
|
+
|
12
|
+
&:hover, &:active {
|
13
|
+
background-color: #5595F5 !important;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
.neo-dragproxy {
|
18
|
+
&.neo-splitter {
|
19
|
+
background-color: #5595F5 !important;
|
20
|
+
}
|
21
|
+
}
|
5
22
|
}
|
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.15.
|
263
|
+
* @default '6.15.1'
|
264
264
|
* @memberOf! module:Neo
|
265
265
|
* @name config.version
|
266
266
|
* @type String
|
267
267
|
*/
|
268
|
-
version: '6.15.
|
268
|
+
version: '6.15.1'
|
269
269
|
};
|
270
270
|
|
271
271
|
Object.assign(DefaultConfig, {
|
package/src/main/DomEvents.mjs
CHANGED
@@ -412,7 +412,7 @@ class DomEvents extends Base {
|
|
412
412
|
let manager = Neo.worker.Manager;
|
413
413
|
|
414
414
|
manager.appNames.forEach(appName => {
|
415
|
-
manager.broadcast({action: 'disconnect', appName})
|
415
|
+
manager.broadcast({action: 'disconnect', appName, windowId: manager.windowId})
|
416
416
|
})
|
417
417
|
}
|
418
418
|
|
package/src/worker/Base.mjs
CHANGED
@@ -109,11 +109,12 @@ class Base extends CoreBase {
|
|
109
109
|
* Only relevant for SharedWorkers
|
110
110
|
* @param {Object} data
|
111
111
|
*/
|
112
|
-
onConnect(data) {
|
112
|
+
async onConnect(data) {
|
113
113
|
// short delay to ensure app VCs are in place
|
114
|
-
|
115
|
-
|
116
|
-
|
114
|
+
await this.timeout(10);
|
115
|
+
|
116
|
+
let {appName, windowId} = data;
|
117
|
+
this.fire('connect', {appName, windowId})
|
117
118
|
}
|
118
119
|
|
119
120
|
/**
|
@@ -162,7 +163,8 @@ class Base extends CoreBase {
|
|
162
163
|
* @param {Object} data
|
163
164
|
*/
|
164
165
|
onDisconnect(data) {
|
165
|
-
|
166
|
+
let {appName, windowId} = data;
|
167
|
+
this.fire('disconnect', {appName, windowId})
|
166
168
|
}
|
167
169
|
|
168
170
|
/**
|
@@ -212,7 +214,7 @@ class Base extends CoreBase {
|
|
212
214
|
for (port of me.ports) {
|
213
215
|
if (!port.appName) {
|
214
216
|
port.appName = appName;
|
215
|
-
me.onConnect({appName});
|
217
|
+
me.onConnect({appName, windowId: port.windowId});
|
216
218
|
break
|
217
219
|
}
|
218
220
|
}
|