neo.mjs 9.10.4 → 9.11.0
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/ServiceWorker.mjs +2 -2
- package/apps/portal/index.html +1 -1
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/sharedcovid/view/MainContainer.mjs +7 -6
- package/buildScripts/createApp.mjs +153 -156
- package/buildScripts/injectPackageVersion.mjs +8 -12
- package/package.json +1 -1
- package/resources/scss/src/apps/docs/MainContainer.scss +1 -1
- package/resources/scss/src/calendar/view/SettingsContainer.scss +1 -1
- package/resources/scss/src/code/LivePreview.scss +1 -1
- package/resources/scss/src/tab/Container.scss +5 -5
- package/src/DefaultConfig.mjs +2 -2
- package/src/tab/BodyContainer.mjs +39 -0
- package/src/tab/Container.mjs +31 -46
- package/src/worker/App.mjs +6 -6
- package/src/worker/Base.mjs +6 -6
- package/src/worker/Canvas.mjs +7 -6
- package/src/worker/Data.mjs +6 -6
- package/src/worker/Task.mjs +7 -6
- package/src/worker/VDom.mjs +7 -6
package/ServiceWorker.mjs
CHANGED
package/apps/portal/index.html
CHANGED
@@ -28,12 +28,13 @@ class MainContainer extends Viewport {
|
|
28
28
|
* @member {Object[]} items
|
29
29
|
*/
|
30
30
|
items: [HeaderContainer, {
|
31
|
-
module
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
module : TabContainer,
|
32
|
+
activateInsertedTabs: true,
|
33
|
+
activeIndex : null, // render no items initially
|
34
|
+
flex : 1,
|
35
|
+
reference : 'tab-container',
|
36
|
+
sortable : true,
|
37
|
+
style : {margin: '10px', marginTop: 0},
|
37
38
|
|
38
39
|
items: [{
|
39
40
|
module : () => import('./TableContainer.mjs'),
|
@@ -119,177 +119,174 @@ if (programOpts.info) {
|
|
119
119
|
process.exit(1);
|
120
120
|
}
|
121
121
|
|
122
|
-
fs.
|
123
|
-
|
124
|
-
|
125
|
-
|
122
|
+
fs.mkdirpSync(path.join(folder, '/view'), {recursive: true});
|
123
|
+
|
124
|
+
const appContent = [
|
125
|
+
"import Viewport from './view/Viewport.mjs';",
|
126
|
+
"",
|
127
|
+
"export const onStart = () => Neo.app({",
|
128
|
+
" mainView: Viewport,",
|
129
|
+
" name : '" + appName + "'",
|
130
|
+
"});"
|
131
|
+
].join(os.EOL);
|
132
|
+
|
133
|
+
fs.writeFileSync(folder + '/app.mjs', appContent);
|
134
|
+
|
135
|
+
const indexContent = [
|
136
|
+
"<!DOCTYPE HTML>",
|
137
|
+
"<html>",
|
138
|
+
"<head>",
|
139
|
+
' <meta name="viewport" content="width=device-width, initial-scale=1">',
|
140
|
+
' <meta charset="UTF-8">',
|
141
|
+
" <title>" + appName + "</title>",
|
142
|
+
"</head>",
|
143
|
+
"<body>",
|
144
|
+
' <script src="../../src/MicroLoader.mjs" type="module"></script>',
|
145
|
+
"</body>",
|
146
|
+
"</html>",
|
147
|
+
];
|
148
|
+
|
149
|
+
fs.writeFileSync(path.join(folder, 'index.html'), indexContent.join(os.EOL));
|
150
|
+
|
151
|
+
let neoConfig = {
|
152
|
+
appPath : `${insideNeo ? '' : '../../'}${appPath}app.mjs`,
|
153
|
+
basePath : '../../',
|
154
|
+
environment: 'development',
|
155
|
+
mainPath : `${insideNeo ? './' : '../node_modules/neo.mjs/src/'}Main.mjs`
|
156
|
+
};
|
157
|
+
|
158
|
+
if (!(
|
159
|
+
mainThreadAddons.includes('DragDrop') &&
|
160
|
+
mainThreadAddons.includes('Navigator') &&
|
161
|
+
mainThreadAddons.includes('Stylesheet') &&
|
162
|
+
mainThreadAddons.length === 3)
|
163
|
+
) {
|
164
|
+
neoConfig.mainThreadAddons = mainThreadAddons;
|
165
|
+
}
|
126
166
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
" name : '" + appName + "'",
|
133
|
-
"});"
|
134
|
-
].join(os.EOL);
|
135
|
-
|
136
|
-
fs.writeFileSync(folder + '/app.mjs', appContent);
|
137
|
-
|
138
|
-
const indexContent = [
|
139
|
-
"<!DOCTYPE HTML>",
|
140
|
-
"<html>",
|
141
|
-
"<head>",
|
142
|
-
' <meta name="viewport" content="width=device-width, initial-scale=1">',
|
143
|
-
' <meta charset="UTF-8">',
|
144
|
-
" <title>" + appName + "</title>",
|
145
|
-
"</head>",
|
146
|
-
"<body>",
|
147
|
-
' <script src="../../src/MicroLoader.mjs" type="module"></script>',
|
148
|
-
"</body>",
|
149
|
-
"</html>",
|
150
|
-
];
|
151
|
-
|
152
|
-
fs.writeFileSync(path.join(folder, 'index.html'), indexContent.join(os.EOL));
|
153
|
-
|
154
|
-
let neoConfig = {
|
155
|
-
appPath : `${insideNeo ? '' : '../../'}${appPath}app.mjs`,
|
156
|
-
basePath : '../../',
|
157
|
-
environment: 'development',
|
158
|
-
mainPath : `${insideNeo ? './' : '../node_modules/neo.mjs/src/'}Main.mjs`
|
159
|
-
};
|
160
|
-
|
161
|
-
if (!(
|
162
|
-
mainThreadAddons.includes('DragDrop') &&
|
163
|
-
mainThreadAddons.includes('Navigator') &&
|
164
|
-
mainThreadAddons.includes('Stylesheet') &&
|
165
|
-
mainThreadAddons.length === 3)
|
166
|
-
) {
|
167
|
-
neoConfig.mainThreadAddons = mainThreadAddons;
|
167
|
+
if (!themes.includes('all')) { // default value
|
168
|
+
if (themes.includes('none')) {
|
169
|
+
neoConfig.themes = [];
|
170
|
+
} else {
|
171
|
+
neoConfig.themes = themes;
|
168
172
|
}
|
173
|
+
}
|
169
174
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
} else {
|
174
|
-
neoConfig.themes = themes;
|
175
|
-
}
|
176
|
-
}
|
175
|
+
if (useSharedWorkers !== 'no') {
|
176
|
+
neoConfig.useSharedWorkers = true;
|
177
|
+
}
|
177
178
|
|
178
|
-
|
179
|
-
|
180
|
-
|
179
|
+
if (useServiceWorker !== 'no') {
|
180
|
+
neoConfig.useServiceWorker = true;
|
181
|
+
}
|
181
182
|
|
182
|
-
|
183
|
-
|
184
|
-
|
183
|
+
if (!insideNeo) {
|
184
|
+
neoConfig.workerBasePath = '../../node_modules/neo.mjs/src/worker/';
|
185
|
+
}
|
185
186
|
|
186
|
-
|
187
|
-
|
188
|
-
|
187
|
+
let configs = Object.entries(neoConfig).sort((a, b) => a[0].localeCompare(b[0]));
|
188
|
+
neoConfig = {};
|
189
|
+
|
190
|
+
configs.forEach(([key, value]) => {
|
191
|
+
neoConfig[key] = value;
|
192
|
+
});
|
189
193
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
"
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
"
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
appJson;
|
194
|
+
fs.writeFileSync(path.join(folder, 'neo-config.json'), JSON.stringify(neoConfig, null, 4));
|
195
|
+
|
196
|
+
const viewportContent = [
|
197
|
+
"import BaseViewport from '../../../" + (insideNeo ? '' : 'node_modules/neo.mjs/') + "src/container/Viewport.mjs';",
|
198
|
+
"import Component from '../../../" + (insideNeo ? '' : 'node_modules/neo.mjs/') + "src/component/Base.mjs';",
|
199
|
+
"import TabContainer from '../../../" + (insideNeo ? '' : 'node_modules/neo.mjs/') + "src/tab/Container.mjs';",
|
200
|
+
"",
|
201
|
+
"/**",
|
202
|
+
" * @class " + appName + ".view.Viewport",
|
203
|
+
" * @extends Neo.container.Viewport",
|
204
|
+
" */",
|
205
|
+
"class Viewport extends BaseViewport {",
|
206
|
+
" static config = {",
|
207
|
+
" /**",
|
208
|
+
" * @member {String} className='" + appName + ".view.Viewport'",
|
209
|
+
" * @protected",
|
210
|
+
" */",
|
211
|
+
" className: '" + appName + ".view.Viewport',",
|
212
|
+
" /*",
|
213
|
+
" * @member {Object} layout={ntype:'fit'}",
|
214
|
+
" */",
|
215
|
+
" layout: {ntype: 'fit'},",
|
216
|
+
"",
|
217
|
+
" /**",
|
218
|
+
" * @member {Object[]} items",
|
219
|
+
" */",
|
220
|
+
" items: [{",
|
221
|
+
" module: TabContainer,",
|
222
|
+
" height: 300,",
|
223
|
+
" width : 500,",
|
224
|
+
" style : {flex: 'none', margin: '20px'},",
|
225
|
+
"",
|
226
|
+
" itemDefaults: {",
|
227
|
+
" module: Component,",
|
228
|
+
" cls : ['neo-examples-tab-component'],",
|
229
|
+
" style : {padding: '20px'},",
|
230
|
+
" },",
|
231
|
+
"",
|
232
|
+
" items: [{",
|
233
|
+
" header: {",
|
234
|
+
" iconCls: 'fa fa-home',",
|
235
|
+
" text : 'Tab 1'",
|
236
|
+
" },",
|
237
|
+
" vdom: {innerHTML: 'Welcome to your new Neo App.'}",
|
238
|
+
" }, {",
|
239
|
+
" header: {",
|
240
|
+
" iconCls: 'fa fa-play-circle',",
|
241
|
+
" text : 'Tab 2'",
|
242
|
+
" },",
|
243
|
+
" vdom: {innerHTML: 'Have fun creating something awesome!'}",
|
244
|
+
" }]",
|
245
|
+
" }]",
|
246
|
+
" }",
|
247
|
+
"}",
|
248
|
+
"",
|
249
|
+
"export default Neo.setupClass(Viewport);"
|
250
|
+
].join(os.EOL);
|
251
|
+
|
252
|
+
fs.writeFileSync(path.join(folder + '/view/Viewport.mjs'), viewportContent);
|
253
|
+
|
254
|
+
let appJsonPath = path.resolve(cwd, 'buildScripts/myApps.json'),
|
255
|
+
appJson;
|
256
|
+
|
257
|
+
if (fs.existsSync(appJsonPath)) {
|
258
|
+
appJson = requireJson(appJsonPath);
|
259
|
+
} else {
|
260
|
+
appJsonPath = path.resolve(__dirname, 'buildScripts/webpack/json/myApps.json');
|
258
261
|
|
259
262
|
if (fs.existsSync(appJsonPath)) {
|
260
263
|
appJson = requireJson(appJsonPath);
|
261
264
|
} else {
|
262
|
-
|
263
|
-
|
264
|
-
if (fs.existsSync(appJsonPath)) {
|
265
|
-
appJson = requireJson(appJsonPath);
|
266
|
-
} else {
|
267
|
-
appJson = requireJson(path.resolve(__dirname, 'buildScripts/webpack/json/myApps.template.json'));
|
268
|
-
}
|
265
|
+
appJson = requireJson(path.resolve(__dirname, 'buildScripts/webpack/json/myApps.template.json'));
|
269
266
|
}
|
267
|
+
}
|
270
268
|
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
269
|
+
if (!appJson.apps.includes(appName)) {
|
270
|
+
appJson.apps.push(appName);
|
271
|
+
appJson.apps.sort();
|
272
|
+
}
|
275
273
|
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
274
|
+
fs.writeFileSync(appJsonPath, JSON.stringify(appJson, null, 4));
|
275
|
+
|
276
|
+
if (mainThreadAddons.includes('HighlightJS')) {
|
277
|
+
const childProcess = spawnSync('node', [
|
278
|
+
'./buildScripts/copyFolder.mjs',
|
279
|
+
'-s',
|
280
|
+
path.resolve(neoPath, 'docs/resources'),
|
281
|
+
'-t',
|
282
|
+
path.resolve(folder, 'resources'),
|
283
|
+
], { env: process.env, cwd: process.cwd(), stdio: 'inherit' });
|
284
|
+
childProcess.status && process.exit(childProcess.status);
|
285
|
+
}
|
288
286
|
|
289
|
-
|
290
|
-
|
287
|
+
const processTime = (Math.round((new Date - startDate) * 100) / 100000).toFixed(2);
|
288
|
+
console.log(`\nTotal time for ${programName}: ${processTime}s`);
|
291
289
|
|
292
|
-
|
293
|
-
});
|
290
|
+
process.exit();
|
294
291
|
});
|
295
292
|
}
|
@@ -1,22 +1,18 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import os from 'os';
|
7
|
-
import path from 'path';
|
3
|
+
import fs from 'fs-extra';
|
4
|
+
import os from 'os';
|
5
|
+
import path from 'path';
|
8
6
|
|
9
7
|
const
|
10
|
-
|
11
|
-
cwd = process.cwd(),
|
8
|
+
root = path.resolve(),
|
12
9
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
13
|
-
packageJson = requireJson(path.join(
|
10
|
+
packageJson = requireJson(path.join(root, 'package.json')),
|
14
11
|
insideNeo = packageJson.name.includes('neo.mjs'),
|
15
|
-
neoPath = insideNeo ? './' : './node_modules/neo.mjs/',
|
16
12
|
programName = `${packageJson.name} inject-package-version`;
|
17
13
|
|
18
14
|
let startDate = new Date(),
|
19
|
-
configPath = path.join(
|
15
|
+
configPath = path.join(root, 'src/DefaultConfig.mjs'),
|
20
16
|
contentArray = fs.readFileSync(configPath).toString().split(os.EOL),
|
21
17
|
i = 0,
|
22
18
|
len = contentArray.length,
|
@@ -34,7 +30,7 @@ for (; i < len; i++) {
|
|
34
30
|
|
35
31
|
fs.writeFileSync(configPath, contentArray.join(os.EOL));
|
36
32
|
|
37
|
-
serviceWorkerPath = path.join(
|
33
|
+
serviceWorkerPath = path.join(root, 'ServiceWorker.mjs');
|
38
34
|
serviceContentArray = fs.readFileSync(serviceWorkerPath, 'utf-8').toString().split(os.EOL);
|
39
35
|
|
40
36
|
i = 0;
|
@@ -53,7 +49,7 @@ fs.writeFileSync(serviceWorkerPath, serviceContentArray.join(os.EOL));
|
|
53
49
|
|
54
50
|
// Update the version inside the Portal App Footer
|
55
51
|
if (insideNeo) {
|
56
|
-
const footerPath = path.join(
|
52
|
+
const footerPath = path.join(root, 'apps/portal/view/home/FooterContainer.mjs');
|
57
53
|
|
58
54
|
if (fs.existsSync(footerPath)) {
|
59
55
|
const footerContentArray = fs.readFileSync(footerPath).toString().split(os.EOL);
|
package/package.json
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
margin-top: calc(var(--cmp-tab-strip-height) * (-1) - 1px);
|
23
23
|
}
|
24
24
|
|
25
|
-
.neo-tab-
|
25
|
+
.neo-tab-body-container {
|
26
26
|
background-color : transparent;
|
27
27
|
border : 1px solid #e6e6e6;
|
28
28
|
border-bottom-left-radius : calc(var(--cmp-tab-strip-height) + var(--cmp-button-borderradius));
|
@@ -1,24 +1,24 @@
|
|
1
1
|
.neo-tab-container {
|
2
2
|
&.neo-bottom {
|
3
|
-
> .neo-tab-
|
3
|
+
> .neo-tab-body-container {
|
4
4
|
border-bottom: 0;
|
5
5
|
}
|
6
6
|
}
|
7
7
|
|
8
8
|
&.neo-left {
|
9
|
-
> .neo-tab-
|
9
|
+
> .neo-tab-body-container {
|
10
10
|
border-left: 0;
|
11
11
|
}
|
12
12
|
}
|
13
13
|
|
14
14
|
&.neo-right {
|
15
|
-
> .neo-tab-
|
15
|
+
> .neo-tab-body-container {
|
16
16
|
border-right: 0;
|
17
17
|
}
|
18
18
|
}
|
19
19
|
|
20
20
|
&.neo-top {
|
21
|
-
> .neo-tab-
|
21
|
+
> .neo-tab-body-container {
|
22
22
|
border-top: 0;
|
23
23
|
}
|
24
24
|
}
|
@@ -27,7 +27,7 @@
|
|
27
27
|
|
28
28
|
}
|
29
29
|
|
30
|
-
.neo-tab-
|
30
|
+
.neo-tab-body-container {
|
31
31
|
border : var(--tab-container-content-border);
|
32
32
|
overflow: hidden;
|
33
33
|
}
|
package/src/DefaultConfig.mjs
CHANGED
@@ -264,12 +264,12 @@ const DefaultConfig = {
|
|
264
264
|
useVdomWorker: true,
|
265
265
|
/**
|
266
266
|
* buildScripts/injectPackageVersion.mjs will update this value
|
267
|
-
* @default '9.
|
267
|
+
* @default '9.11.0'
|
268
268
|
* @memberOf! module:Neo
|
269
269
|
* @name config.version
|
270
270
|
* @type String
|
271
271
|
*/
|
272
|
-
version: '9.
|
272
|
+
version: '9.11.0'
|
273
273
|
};
|
274
274
|
|
275
275
|
Object.assign(DefaultConfig, {
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import Container from '../container/Base.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Neo.tab.BodyContainer
|
5
|
+
* @extends Neo.container.Base
|
6
|
+
*/
|
7
|
+
class BodyContainer extends Container {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Neo.tab.BodyContainer'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Neo.tab.BodyContainer',
|
14
|
+
/**
|
15
|
+
* @member {String[]} baseCls=['neo-container', 'neo-tab-body-container']
|
16
|
+
* @protected
|
17
|
+
*/
|
18
|
+
baseCls: ['neo-container', 'neo-tab-body-container']
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* When adding an existing tab into a different container, it will get automatically from the closest parent.
|
23
|
+
* In this case, we also want to remove the tab.header.Button from the tab.header.Toolbar.
|
24
|
+
* Use case: SharedCovid.view.MainContainerController
|
25
|
+
* @param {Neo.component.Base} component
|
26
|
+
* @param {Boolean} [destroyItem=true]
|
27
|
+
* @param {Boolean} [silent=false]
|
28
|
+
* @returns {Neo.component.Base|null}
|
29
|
+
*/
|
30
|
+
remove(component, destroyItem, silent) {
|
31
|
+
if (component?.isTab) {
|
32
|
+
this.parent.remove(component, destroyItem, silent)
|
33
|
+
} else {
|
34
|
+
super.remove(component, destroyItem, silent)
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
export default Neo.setupClass(BodyContainer);
|
package/src/tab/Container.mjs
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import BaseContainer from '../container/Base.mjs';
|
2
|
+
import BodyContainer from './BodyContainer.mjs';
|
2
3
|
import HeaderButton from './header/Button.mjs';
|
3
4
|
import HeaderToolbar from './header/Toolbar.mjs';
|
4
5
|
import NeoArray from '../util/Array.mjs';
|
@@ -44,14 +45,14 @@ class Container extends BaseContainer {
|
|
44
45
|
*/
|
45
46
|
baseCls: ['neo-tab-container'],
|
46
47
|
/**
|
47
|
-
*
|
48
|
+
* Default configs for the tab.BodyContainer
|
49
|
+
* @member {Object|null} bodyContainer=null
|
48
50
|
*/
|
49
|
-
|
51
|
+
bodyContainer: null,
|
50
52
|
/**
|
51
|
-
*
|
52
|
-
* @member {Object|null} contentContainer=null
|
53
|
+
* @member {String|null} bodyContainerId=null
|
53
54
|
*/
|
54
|
-
|
55
|
+
bodyContainerId: null,
|
55
56
|
/**
|
56
57
|
* Default configs for the tab.HeaderToolbar
|
57
58
|
* @member {Object|null} headerToolbar=null
|
@@ -125,7 +126,7 @@ class Container extends BaseContainer {
|
|
125
126
|
*/
|
126
127
|
async afterSetActiveIndex(value, oldValue) {
|
127
128
|
let me = this,
|
128
|
-
cardContainer = Neo.getComponent(me.
|
129
|
+
cardContainer = Neo.getComponent(me.bodyContainerId);
|
129
130
|
|
130
131
|
if (Neo.isNumber(value) && value > -1 && !cardContainer) {
|
131
132
|
me.on('constructed', () => {
|
@@ -236,12 +237,13 @@ class Container extends BaseContainer {
|
|
236
237
|
*/
|
237
238
|
createItems() {
|
238
239
|
let me = this,
|
240
|
+
{activeIndex, removeInactiveCards, useActiveTabIndicator} = me,
|
239
241
|
items = me.items || [],
|
240
242
|
tabButtons = [],
|
241
243
|
tabComponents = [];
|
242
244
|
|
243
245
|
Object.assign(me, {
|
244
|
-
|
246
|
+
bodyContainerId: me.bodyContainerId || Neo.getId('container'),
|
245
247
|
tabBarId : me.tabBarId || Neo.getId('tab-header-toolbar'),
|
246
248
|
tabStripId : me.tabStripId || Neo.getId('tab-strip')
|
247
249
|
});
|
@@ -257,48 +259,31 @@ class Container extends BaseContainer {
|
|
257
259
|
});
|
258
260
|
|
259
261
|
me.items = [{
|
260
|
-
module
|
261
|
-
dock
|
262
|
-
flex
|
263
|
-
id
|
264
|
-
items
|
265
|
-
sortable
|
266
|
-
useActiveTabIndicator
|
262
|
+
module : HeaderToolbar,
|
263
|
+
dock : me.tabBarPosition,
|
264
|
+
flex : 'none',
|
265
|
+
id : me.tabBarId,
|
266
|
+
items : tabButtons,
|
267
|
+
sortable: me.sortable,
|
268
|
+
useActiveTabIndicator,
|
267
269
|
...me.headerToolbar
|
268
270
|
}, {
|
269
|
-
module
|
270
|
-
cls
|
271
|
-
flex
|
272
|
-
id
|
273
|
-
tabContainerId
|
274
|
-
useActiveTabIndicator
|
271
|
+
module : Strip,
|
272
|
+
cls : ['neo-dock-' + me.tabBarPosition],
|
273
|
+
flex : 'none',
|
274
|
+
id : me.tabStripId,
|
275
|
+
tabContainerId: me.id,
|
276
|
+
useActiveTabIndicator,
|
275
277
|
...me.tabStrip
|
276
278
|
}, {
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
insert(index, item, silent) {
|
287
|
-
if (item?.isTab) {
|
288
|
-
me.insert(index, item, silent)
|
289
|
-
} else {
|
290
|
-
super.insert(index, item, silent)
|
291
|
-
}
|
292
|
-
},
|
293
|
-
|
294
|
-
remove(component, destroyItem, silent) {
|
295
|
-
if (component?.isTab) {
|
296
|
-
me.remove(component, destroyItem, silent)
|
297
|
-
} else {
|
298
|
-
super.remove(component, destroyItem, silent)
|
299
|
-
}
|
300
|
-
}
|
301
|
-
}];
|
279
|
+
module : BodyContainer,
|
280
|
+
id : me.bodyContainerId,
|
281
|
+
itemDefaults: me.itemDefaults,
|
282
|
+
items : tabComponents,
|
283
|
+
layout : {ntype: 'card', activeIndex, removeInactiveCards},
|
284
|
+
useActiveTabIndicator,
|
285
|
+
...me.bodyContainer
|
286
|
+
}]
|
302
287
|
|
303
288
|
me.itemDefaults = null;
|
304
289
|
|
@@ -326,7 +311,7 @@ class Container extends BaseContainer {
|
|
326
311
|
* @returns {Neo.container.Base}
|
327
312
|
*/
|
328
313
|
getCardContainer() {
|
329
|
-
return Neo.getComponent(this.
|
314
|
+
return Neo.getComponent(this.bodyContainerId)
|
330
315
|
}
|
331
316
|
|
332
317
|
/**
|
package/src/worker/App.mjs
CHANGED
@@ -42,12 +42,7 @@ class App extends Base {
|
|
42
42
|
* @member {Boolean} singleton=true
|
43
43
|
* @protected
|
44
44
|
*/
|
45
|
-
singleton: true
|
46
|
-
/**
|
47
|
-
* @member {String} workerId='app'
|
48
|
-
* @protected
|
49
|
-
*/
|
50
|
-
workerId: 'app'
|
45
|
+
singleton: true
|
51
46
|
}
|
52
47
|
|
53
48
|
/**
|
@@ -67,6 +62,11 @@ class App extends Base {
|
|
67
62
|
* @protected
|
68
63
|
*/
|
69
64
|
themeFilesCache = []
|
65
|
+
/**
|
66
|
+
* @member {String} workerId='app'
|
67
|
+
* @protected
|
68
|
+
*/
|
69
|
+
workerId = 'app'
|
70
70
|
|
71
71
|
/**
|
72
72
|
* @param {Object} config
|
package/src/worker/Base.mjs
CHANGED
@@ -19,12 +19,7 @@ class Worker extends Base {
|
|
19
19
|
/**
|
20
20
|
* @member {String[]|Neo.core.Base[]|null} mixins=[Observable,RemoteMethodAccess]
|
21
21
|
*/
|
22
|
-
mixins: [Observable, RemoteMethodAccess]
|
23
|
-
/**
|
24
|
-
* @member {String|null} workerId=null
|
25
|
-
* @protected
|
26
|
-
*/
|
27
|
-
workerId: null
|
22
|
+
mixins: [Observable, RemoteMethodAccess]
|
28
23
|
}
|
29
24
|
|
30
25
|
/**
|
@@ -48,6 +43,11 @@ class Worker extends Base {
|
|
48
43
|
* @member {Array|null} ports=null
|
49
44
|
*/
|
50
45
|
ports = null
|
46
|
+
/**
|
47
|
+
* @member {String|null} workerId=null
|
48
|
+
* @protected
|
49
|
+
*/
|
50
|
+
workerId = null
|
51
51
|
|
52
52
|
/**
|
53
53
|
* @param {Object} config
|
package/src/worker/Canvas.mjs
CHANGED
@@ -25,14 +25,15 @@ class Canvas extends Base {
|
|
25
25
|
* @member {Boolean} singleton=true
|
26
26
|
* @protected
|
27
27
|
*/
|
28
|
-
singleton: true
|
29
|
-
/**
|
30
|
-
* @member {String} workerId='canvas'
|
31
|
-
* @protected
|
32
|
-
*/
|
33
|
-
workerId: 'canvas'
|
28
|
+
singleton: true
|
34
29
|
}
|
35
30
|
|
31
|
+
/**
|
32
|
+
* @member {String} workerId='canvas'
|
33
|
+
* @protected
|
34
|
+
*/
|
35
|
+
workerId = 'canvas'
|
36
|
+
|
36
37
|
/**
|
37
38
|
*
|
38
39
|
*/
|
package/src/worker/Data.mjs
CHANGED
@@ -23,12 +23,7 @@ class Data extends Base {
|
|
23
23
|
* @member {Boolean} singleton=true
|
24
24
|
* @protected
|
25
25
|
*/
|
26
|
-
singleton: true
|
27
|
-
/**
|
28
|
-
* @member {String} workerId='data'
|
29
|
-
* @protected
|
30
|
-
*/
|
31
|
-
workerId: 'data'
|
26
|
+
singleton: true
|
32
27
|
}
|
33
28
|
|
34
29
|
/**
|
@@ -41,6 +36,11 @@ class Data extends Base {
|
|
41
36
|
* @protected
|
42
37
|
*/
|
43
38
|
rpcMessageManagerLoaded = false
|
39
|
+
/**
|
40
|
+
* @member {String} workerId='data'
|
41
|
+
* @protected
|
42
|
+
*/
|
43
|
+
workerId = 'data'
|
44
44
|
|
45
45
|
/**
|
46
46
|
*
|
package/src/worker/Task.mjs
CHANGED
@@ -20,14 +20,15 @@ class Task extends Base {
|
|
20
20
|
* @member {Boolean} singleton=true
|
21
21
|
* @protected
|
22
22
|
*/
|
23
|
-
singleton: true
|
24
|
-
/**
|
25
|
-
* @member {String} workerId='task'
|
26
|
-
* @protected
|
27
|
-
*/
|
28
|
-
workerId: 'task'
|
23
|
+
singleton: true
|
29
24
|
}
|
30
25
|
|
26
|
+
/**
|
27
|
+
* @member {String} workerId='task'
|
28
|
+
* @protected
|
29
|
+
*/
|
30
|
+
workerId = 'task'
|
31
|
+
|
31
32
|
/**
|
32
33
|
*
|
33
34
|
*/
|
package/src/worker/VDom.mjs
CHANGED
@@ -21,14 +21,15 @@ class VDom extends Base {
|
|
21
21
|
* @member {Boolean} singleton=true
|
22
22
|
* @protected
|
23
23
|
*/
|
24
|
-
singleton: true
|
25
|
-
/**
|
26
|
-
* @member {String} workerId='vdom'
|
27
|
-
* @protected
|
28
|
-
*/
|
29
|
-
workerId: 'vdom'
|
24
|
+
singleton: true
|
30
25
|
}
|
31
26
|
|
27
|
+
/**
|
28
|
+
* @member {String} workerId='vdom'
|
29
|
+
* @protected
|
30
|
+
*/
|
31
|
+
workerId = 'vdom'
|
32
|
+
|
32
33
|
/**
|
33
34
|
*
|
34
35
|
*/
|