neo.mjs 7.0.2 → 7.0.4
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/.github/workflows/cose-inactive-issues.yml +23 -0
- package/README.md +37 -23
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/portal/Overwrites.mjs +0 -10
- package/apps/portal/index.html +1 -1
- package/apps/portal/view/home/FeatureSection.mjs +3 -1
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/portal/view/home/parts/Colors.mjs +2 -2
- package/buildScripts/README.md +27 -82
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/table/container/MainContainer.mjs +1 -0
- package/examples/table/container/MainStore.mjs +2 -1
- package/package.json +4 -4
- package/resources/images/workers-focus.svg +6 -0
- package/resources/scss/src/apps/portal/home/parts/Helix.scss +4 -0
- package/src/DefaultConfig.mjs +2 -2
- package/src/Neo.mjs +0 -7
- package/src/button/Base.mjs +62 -25
- package/src/button/Split.mjs +16 -0
- package/src/collection/Base.mjs +2 -2
- package/src/component/Base.mjs +10 -5
- package/src/component/Video.mjs +8 -29
- package/src/container/Base.mjs +4 -3
- package/src/dialog/Base.mjs +34 -8
- package/src/draggable/DragZone.mjs +10 -8
- package/src/form/field/Picker.mjs +1 -0
- package/src/form/field/Text.mjs +2 -0
- package/src/form/field/trigger/Time.mjs +14 -0
- package/src/layout/Base.mjs +8 -8
- package/src/list/Component.mjs +14 -0
- package/src/plugin/PrefixField.mjs +1 -1
- package/src/plugin/Resizable.mjs +19 -5
- package/src/table/header/Button.mjs +2 -0
- package/src/toolbar/Base.mjs +15 -0
- package/src/worker/App.mjs +3 -5
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Close inactive issues
|
2
|
+
on:
|
3
|
+
schedule:
|
4
|
+
- cron: '30 1 * * *'
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
close-issues:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
permissions:
|
10
|
+
issues: write
|
11
|
+
pull-requests: write
|
12
|
+
steps:
|
13
|
+
- uses: actions/stale@v9
|
14
|
+
with:
|
15
|
+
days-before-issue-stale: 90
|
16
|
+
days-before-issue-close: 14
|
17
|
+
exempt-issue-labels: 'no auto close'
|
18
|
+
stale-issue-label: 'stale'
|
19
|
+
stale-issue-message: 'This issue is stale because it has been open for 90 days with no activity.'
|
20
|
+
close-issue-message: 'This issue was closed because it has been inactive for 14 days since being marked as stale.'
|
21
|
+
days-before-pr-stale: -1
|
22
|
+
days-before-pr-close: -1
|
23
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
package/README.md
CHANGED
@@ -11,20 +11,25 @@
|
|
11
11
|
<a href="./CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-green.svg?logo=GitHub&logoColor=white" alt="PRs Welcome"></a>
|
12
12
|
</p>
|
13
13
|
|
14
|
-
#
|
14
|
+
# Modern Enterprise-Ready JavaScript Framework
|
15
|
+
Neo.mjs provides a new approach for building feature-rich web applications. Increase productivity by leveraging a vast
|
16
|
+
component library and harness the power of multi-threading for extreme real-time performance.
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
2. <a href="#slack-channel">Slack Channel for questions & feedback</a>
|
19
|
-
3. <a href="#architectures">Scalable frontend architectures</a>
|
18
|
+
Neo.mjs is the first frontend framework which can run a JavaScript module based dev mode
|
19
|
+
without compilations. This makes debugging easier and reduces development costs.
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
Neo.mjs is **not** intended for rather simple & static websites.
|
21
|
+
In case you care about scalability, extensibility or solid architectures, congratulations,
|
22
|
+
you have found the right spot.
|
24
23
|
|
25
|
-
|
26
|
-
|
24
|
+
## Content
|
25
|
+
1. <a href="#introduction">Introduction</a>
|
26
|
+
2. <a href="#use-cases">Potential Use Cases</a>
|
27
|
+
3. <a href="#slack-channel">Slack Channel for questions & feedback</a>
|
28
|
+
4. <a href="#getting-started">Getting Started</a>
|
29
|
+
5. <a href="#cli">Command-Line Interface</a>
|
30
|
+
6. <a href="#blog">Blog</a>
|
27
31
|
|
32
|
+
</br><h2 id="introduction">1. Introduction</h2>
|
28
33
|
Neo.mjs drives the OMT (off the main thread) paradigm into perfection,
|
29
34
|
which is intended to move expensive tasks into Workers.
|
30
35
|
|
@@ -43,30 +48,39 @@ Neo.mjs also provides sharing state across multiple Browser-Windows.
|
|
43
48
|
So far, it is the only Framework which enables us to build complex multi-Window Apps
|
44
49
|
without the need for a native shell.
|
45
50
|
|
46
|
-
<img src="
|
51
|
+
<img src="./resources/images/workers-focus.svg">
|
52
|
+
|
53
|
+
|
54
|
+
Neo.mjs is **not** intended for rather simple & static websites.
|
47
55
|
|
48
|
-
|
56
|
+
The Framework does not focus primarily on a fast first rendering experience for new users,
|
57
|
+
but instead on a super-fast update & navigation experience for returning users.
|
58
|
+
|
59
|
+
|
60
|
+
</br><h2 id="use-cases">2. Potential Use-Cases</h2>
|
49
61
|
1. Finance (Banking & Trading Apps)
|
50
62
|
2. Data Science
|
51
63
|
3. Web-based IDEs
|
52
64
|
4. Multi-Window Data Visualisation
|
65
|
+
5. Complex dynamic Forms
|
66
|
+
6. "Desktop-like" Apps
|
67
|
+
7. Enterprise Apps in general (e.g. Admin Dashboards)
|
53
68
|
|
54
|
-
</br
|
55
|
-
<h2 id="slack-channel">2. Slack Channel for questions, ideas & feedback</h2>
|
69
|
+
</br><h2 id="slack-channel">3. Slack Channel for questions, ideas & feedback</h2>
|
56
70
|
Join our community:</br>
|
57
71
|
<a href="https://join.slack.com/t/neomjs/shared_invite/zt-6c50ueeu-3E1~M4T9xkNnb~M_prEEOA"><img src="https://img.shields.io/badge/Slack-neo.mjs-brightgreen.svg?logo=slack&style=for-the-badge" alt="Join the Slack channel"></a>
|
58
72
|
|
73
|
+
</br><h2 id="getting-started">4. Getting Started</h2>
|
74
|
+
* Take a look at the <a href="./.github/GETTING_STARTED.md">Getting Started Guide</a>
|
75
|
+
* Make sure to dive into the <a href="https://neomjs.com/dist/production/apps/portal/#/learn/Setup">Learning Section</a>
|
76
|
+
* The most advanced tutorial to help you with getting up to speed is this one:</br>
|
77
|
+
<a href="https://neomjs.com/dist/production/apps/portal/#/learn/Earthquakes">Earthquakes Tutorial</a>
|
59
78
|
|
79
|
+
</br><h2 id="cli">5. Command-Line Interface</h2>
|
80
|
+
You can find an in-depth description here: <a href="./buildScripts/README.md">Neo.mjs CLI</a>
|
60
81
|
|
61
|
-
</br
|
62
|
-
|
63
|
-
[Spoiler] We are in the middle of wrapping up the new Framework Website,
|
64
|
-
which will include the first version of a self-study based Learning Section.
|
65
|
-
|
66
|
-
We are aiming to release it on August 1st, 2024.
|
67
|
-
|
68
|
-
The current development state is already inside the dev branch.
|
69
|
-
|
82
|
+
</br><h2 id="blog">6. Blog</h2>
|
83
|
+
All Blog Posts are listed here: <a href="https://neomjs.com/dist/production/apps/portal/#/blog">Neo.mjs Blog</a>
|
70
84
|
|
71
85
|
</br></br>
|
72
86
|
Copyright (c) 2015 - today, <a href="https://www.linkedin.com/in/tobiasuhlig/">Tobias Uhlig</a>
|
package/apps/ServiceWorker.mjs
CHANGED
package/apps/portal/index.html
CHANGED
@@ -37,6 +37,7 @@ class FeatureSection extends Container {
|
|
37
37
|
*/
|
38
38
|
headline_: null,
|
39
39
|
/**
|
40
|
+
* Can either contain a route or a URL
|
40
41
|
* @member {String|null} learnMoreRoute_=null
|
41
42
|
*/
|
42
43
|
learnMoreRoute_: null,
|
@@ -136,7 +137,8 @@ class FeatureSection extends Container {
|
|
136
137
|
* @protected
|
137
138
|
*/
|
138
139
|
afterSetLearnMoreRoute(value, oldValue) {
|
139
|
-
|
140
|
+
let targetConfig = value.startsWith('http') ? 'url' : 'route';
|
141
|
+
this.getItem('learn-more-button')[targetConfig] = value
|
140
142
|
}
|
141
143
|
|
142
144
|
/**
|
@@ -20,9 +20,9 @@ class Colors extends FeatureSection {
|
|
20
20
|
*/
|
21
21
|
headline: 'Amazing Potential',
|
22
22
|
/**
|
23
|
-
* @member {String} learnMoreRoute='
|
23
|
+
* @member {String} learnMoreRoute='https://itnext.io/sharing-real-time-websocket-data-across-multiple-browser-windows-4e0538dd7563?source=friends_link&sk=9efb3e4f38c82fb3e04899c61bb5fcb8'
|
24
24
|
*/
|
25
|
-
learnMoreRoute: '
|
25
|
+
learnMoreRoute: 'https://itnext.io/sharing-real-time-websocket-data-across-multiple-browser-windows-4e0538dd7563?source=friends_link&sk=9efb3e4f38c82fb3e04899c61bb5fcb8',
|
26
26
|
/**
|
27
27
|
* @member {String} livePreviewCode
|
28
28
|
*/
|
package/buildScripts/README.md
CHANGED
@@ -11,8 +11,8 @@ You can run each script inside your terminal. E.g.:
|
|
11
11
|
|
12
12
|
Make sure to call them on the top-level folder (the one containing the package.json).
|
13
13
|
|
14
|
-
In case you want to pass program options,
|
15
|
-
>
|
14
|
+
In case you want to pass program options, use -- before adding options. E.g.:
|
15
|
+
> npm run build-all -- -h
|
16
16
|
|
17
17
|
All programs which are using options also have the visual inquirer interface in place.</br>
|
18
18
|
So it is up to you if you prefer adding the options manually (e.g. for adding them into your own CI),</br>
|
@@ -25,15 +25,14 @@ where the framework is included as a node module, but needs to deploy to a top-l
|
|
25
25
|
## Content
|
26
26
|
1. <a href="#build-all">build-all</a>
|
27
27
|
2. <a href="#build-all-questions">build-all-questions</a>
|
28
|
-
3. <a href="#build-
|
29
|
-
4. <a href="#build-
|
30
|
-
5. <a href="#
|
31
|
-
6. <a href="#
|
32
|
-
7. <a href="#
|
33
|
-
8. <a href="#server-start">server-start</a>
|
28
|
+
3. <a href="#build-themes">build-themes</a>
|
29
|
+
4. <a href="#build-threads">build-threads</a>
|
30
|
+
5. <a href="#create-app">create-app</a>
|
31
|
+
6. <a href="#generate-docs-json">generate-docs-json</a>
|
32
|
+
7. <a href="#server-start">server-start</a>
|
34
33
|
|
35
34
|
## build-all
|
36
|
-
>
|
35
|
+
> npm run build-all
|
37
36
|
|
38
37
|
It is strongly recommended to run this program after each git pull on this repo.
|
39
38
|
|
@@ -70,7 +69,7 @@ or dist/production.
|
|
70
69
|
Source code: <a href="./buildAll.js">build-all</a>
|
71
70
|
|
72
71
|
## build-all-questions
|
73
|
-
>
|
72
|
+
> npm run build-all-questions
|
74
73
|
|
75
74
|
This entry point is running the build-all program without passing options,
|
76
75
|
so we can select them using the inquirer interface.
|
@@ -130,64 +129,8 @@ neo.mjs buildAll
|
|
130
129
|
|
131
130
|
Source code: <a href="./buildAll.js">build-all</a>
|
132
131
|
|
133
|
-
## build-my-apps
|
134
|
-
> node ./buildScripts/webpack/buildMyApps.js -f
|
135
|
-
|
136
|
-
```bash
|
137
|
-
Options:
|
138
|
-
-V, --version output the version number
|
139
|
-
-i, --info print environment debug info
|
140
|
-
-a, --apps <value> "all", "Covid", "RealWorld", "RealWorld2", "SharedCovid", "SharedCovidChart", "SharedCovidGallery",
|
141
|
-
"SharedCovidHelix", "SharedCovidMap", "SharedDialog", "SharedDialog2", "Website"
|
142
|
-
-e, --env <value> "all", "dev", "prod"
|
143
|
-
-f, --framework
|
144
|
-
-n, --noquestions
|
145
|
-
-h, --help display help for command
|
146
|
-
```
|
147
|
-
|
148
|
-
build-my-apps is very similar to build-threads => App.
|
149
|
-
|
150
|
-
In both cases we are parsing <a href="../src/worker/App.mjs">worker/App</a>,
|
151
|
-
which will dynamically import all Apps inside the src/app folder and the Docs App and create split chunks
|
152
|
-
for all combinations. This enables you to add multiple Apps on one Page with close to zero overhead
|
153
|
-
in dist/development & dist/production.
|
154
|
-
|
155
|
-
The only difference to build-threads => App is that you can limit the generation of the App related index.html files,
|
156
|
-
so it is a little faster.
|
157
|
-
|
158
|
-
Let us take a look at the different inquirer steps:
|
159
|
-
1. Pick the -e (env) option:
|
160
|
-
```bash
|
161
|
-
neo % npm run build-my-apps
|
162
|
-
|
163
|
-
> neo.mjs@1.4.14 build-my-apps /Users/Shared/github/neomjs/neo
|
164
|
-
> node ./buildScripts/webpack/buildMyApps.js -f
|
165
|
-
|
166
|
-
neo.mjs buildMyApps
|
167
|
-
? Please choose the environment: (Use arrow keys)
|
168
|
-
❯ all
|
169
|
-
dev
|
170
|
-
prod
|
171
|
-
```
|
172
|
-
2. Pick the -a (apps) option:
|
173
|
-
```bash
|
174
|
-
neo.mjs buildMyApps
|
175
|
-
? Please choose the environment: all
|
176
|
-
? Please choose which apps you want to build: (Press <space> to select, <a> to toggle all, <i> to invert selection)
|
177
|
-
❯◯ Covid
|
178
|
-
◯ RealWorld
|
179
|
-
◯ RealWorld2
|
180
|
-
◯ SharedCovid
|
181
|
-
◯ SharedCovidChart
|
182
|
-
◯ SharedCovidGallery
|
183
|
-
◯ SharedCovidHelix
|
184
|
-
(Move up and down to reveal more choices)
|
185
|
-
```
|
186
|
-
|
187
|
-
Source code: <a href="./webpack/buildMyApps.js">build-my-apps</a>
|
188
|
-
|
189
132
|
## build-themes
|
190
|
-
>
|
133
|
+
> npm run build-themes
|
191
134
|
|
192
135
|
```bash
|
193
136
|
Options:
|
@@ -238,7 +181,7 @@ neo.mjs buildThemes
|
|
238
181
|
Source code: <a href="./webpack/buildThemes.js">build-themes</a>
|
239
182
|
|
240
183
|
## build-threads
|
241
|
-
>
|
184
|
+
> npm run build-threads
|
242
185
|
|
243
186
|
Since the default neo.mjs setup is using 3 workers, we have the following 4 threads to build:</br>
|
244
187
|
"app", "data", "main", "vdom"
|
@@ -286,7 +229,7 @@ neo.mjs buildThreads
|
|
286
229
|
Source code: <a href="./webpack/buildThreads.js">build-threads</a>
|
287
230
|
|
288
231
|
## create-app
|
289
|
-
>
|
232
|
+
> npm run create-app
|
290
233
|
|
291
234
|
Again: In case you want to create an App (workspace) based on neo.mjs, you don't need to clone this repository.</br>
|
292
235
|
Please take a look at the <a href="https://github.com/neomjs/create-app">create-app repository</a> (npx neo-app).
|
@@ -294,15 +237,16 @@ Please take a look at the <a href="https://github.com/neomjs/create-app">create-
|
|
294
237
|
If you want to create a new Demo App inside the framework repo,
|
295
238
|
using the create-app program makes sense, since you can work on the app & framework code in parallel.
|
296
239
|
|
297
|
-
Using the default options, this will generate the following
|
240
|
+
Using the default options, this will generate the following 4 files:
|
298
241
|
```
|
299
242
|
neo
|
300
243
|
| - apps
|
301
244
|
| | - myapp
|
245
|
+
| | | - view
|
246
|
+
| | | | - MainContainer.mjs
|
302
247
|
| | | - app.mjs
|
303
|
-
| | | - config.json
|
304
248
|
| | | - index.html
|
305
|
-
| | | -
|
249
|
+
| | | - neo-config.json
|
306
250
|
```
|
307
251
|
|
308
252
|
The program will also add the App config into buildScripts/webpack/json/myApps.json.
|
@@ -377,14 +321,15 @@ neo.mjs create-app
|
|
377
321
|
No worries, you can easily change the options after you created your App shell.
|
378
322
|
|
379
323
|
E.g. in case you want to add the MapboxGL main thread addon later on,
|
380
|
-
you can add it inside your
|
381
|
-
```
|
382
|
-
|
383
|
-
appPath :
|
384
|
-
basePath :
|
385
|
-
environment :
|
386
|
-
|
387
|
-
|
324
|
+
you can add it inside your neo-config.json file:
|
325
|
+
```json
|
326
|
+
{
|
327
|
+
"appPath" : "apps/myapp/app.mjs",
|
328
|
+
"basePath" : "../../",
|
329
|
+
"environment" : "development",
|
330
|
+
"mainPath" : "./Main.mjs",
|
331
|
+
"mainThreadAddons": ["DragDrop", "MapboxGL", "Navigator", "Stylesheet"]
|
332
|
+
}
|
388
333
|
```
|
389
334
|
|
390
335
|
Regarding the -u (SharedWorkers) option:</br>
|
@@ -399,7 +344,7 @@ Using SharedWorkers, you need to open a separate Window to inspect them:</br>
|
|
399
344
|
Source code: <a href="./buildScripts/createApp.js">create-app</a>
|
400
345
|
|
401
346
|
## generate-docs-json
|
402
|
-
>
|
347
|
+
> npm run generate-docs-json
|
403
348
|
|
404
349
|
neo.mjs is using jsdoc
|
405
350
|
> https://github.com/jsdoc/jsdoc
|
@@ -414,7 +359,7 @@ There are several enhancements around it to polish it for our class system impro
|
|
414
359
|
Source code: <a href="./docs/jsdocx.js">generate-docs-json</a>
|
415
360
|
|
416
361
|
## server-start
|
417
|
-
>
|
362
|
+
> npm run server-start
|
418
363
|
|
419
364
|
To open JS modules locally inside your Browser you need a web-server, since importing files is not possible
|
420
365
|
otherwise for security reasons. You could enable this on an OS level, but this is definitely not recommended.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "7.0.
|
3
|
+
"version": "7.0.4",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -53,15 +53,15 @@
|
|
53
53
|
"fs-extra": "^11.2.0",
|
54
54
|
"highlightjs-line-numbers.js": "^2.8.0",
|
55
55
|
"inquirer": "^10.1.8",
|
56
|
-
"marked": "^14.
|
57
|
-
"monaco-editor": "
|
56
|
+
"marked": "^14.1.0",
|
57
|
+
"monaco-editor": "0.50.0",
|
58
58
|
"neo-jsdoc": "1.0.1",
|
59
59
|
"neo-jsdoc-x": "1.0.5",
|
60
60
|
"postcss": "^8.4.41",
|
61
61
|
"sass": "^1.77.8",
|
62
62
|
"siesta-lite": "5.5.2",
|
63
63
|
"url": "^0.11.4",
|
64
|
-
"webpack": "^5.
|
64
|
+
"webpack": "^5.94.0",
|
65
65
|
"webpack-cli": "^5.1.4",
|
66
66
|
"webpack-dev-server": "^5.0.4",
|
67
67
|
"webpack-hook-plugin": "^1.0.7",
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="background-color: #000;" version="1.1" width="100%" height="100%" viewBox="-10 -10 700 500"><style>
|
4
|
+
font, span {transition: opacity .5s ease-out;}
|
5
|
+
path, rect {transition: fill-opacity .5s ease-out, stroke-opacity .5s ease-out;}
|
6
|
+
</style><defs><linearGradient x1="0%" y1="100%" x2="0%" y2="0%" id="mx-gradient-3e63dd-1-6c83dd-1-s-0"><stop offset="0%" style="stop-color: rgb(108, 131, 221); stop-opacity: 1;"/><stop offset="100%" style="stop-color: rgb(62, 99, 221); stop-opacity: 1;"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffcc99-1-fbc593-1-s-0"><stop offset="0%" style="stop-color: rgb(255, 204, 153); stop-opacity: 1;"/><stop offset="100%" style="stop-color: rgb(251, 197, 147); stop-opacity: 1;"/></linearGradient><linearGradient x1="0%" y1="100%" x2="0%" y2="0%" id="mx-gradient-008a00-1-00cc00-1-s-0"><stop offset="0%" style="stop-color: rgb(0, 204, 0); stop-opacity: 1;"/><stop offset="100%" style="stop-color: rgb(0, 138, 0); stop-opacity: 1;"/></linearGradient></defs><g><g data-cell-id="0"><g data-cell-id="1"><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-1"><g><path d="M 486.37 240 L 553.63 240" fill="none" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 481.12 240 L 488.12 236.5 L 486.37 240 L 488.12 243.5 Z" fill-opacity="var(--fill-opacity)" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="all"/><path d="M 558.88 240 L 551.88 243.5 L 553.63 240 L 551.88 236.5 Z" fill-opacity="var(--fill-opacity)" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-2"><g><path d="M 240.04 320 L 240 440 L 206.37 440" fill="none" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 201.12 440 L 208.12 436.5 L 206.37 440 L 208.12 443.5 Z" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-3"><g><rect x="200" y="160" width="280" height="160" rx="24" ry="24" fill="url(#mx-gradient-3e63dd-1-6c83dd-1-s-0)" stroke="#8ba6ff" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 278px; height: 1px; padding-top: 240px; margin-left: 201px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">App Worker</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-4"><g><rect x="360" y="280" width="120" height="40" rx="6" ry="6" fill="#cce5ff" stroke="#36393d" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 300px; margin-left: 361px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 13px;" color="#000000">Your App(s)</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-5"><g><rect x="200" y="160" width="120" height="40" rx="6" ry="6" fill="#cce5ff" stroke="#36393d" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 180px; margin-left: 201px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 13px;" color="#000000">Framework</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-6"><g><rect x="0" y="200" width="120" height="80" rx="12" ry="12" fill-opacity="var(--fill-opacity)" fill="url(#mx-gradient-3e63dd-1-6c83dd-1-s-0)" stroke="#8ba6ff" stroke-opacity="var(--stroke-opacity)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left; opacity: var(--fill-opacity);"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 240px; margin-left: 1px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><span style="font-size: 13px;">Service Worker<br />(optional)</span></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-7"><g><path d="M 126.37 260 L 193.63 260" fill="none" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 121.12 260 L 128.12 256.5 L 126.37 260 L 128.12 263.5 Z" fill-opacity="var(--fill-opacity)" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="all"/><path d="M 198.88 260 L 191.88 263.5 L 193.63 260 L 191.88 256.5 Z" fill-opacity="var(--fill-opacity)" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-8"><g><path d="M 486.37 40 L 553.63 40" fill="none" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 481.12 40 L 488.12 36.5 L 486.37 40 L 488.12 43.5 Z" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="all"/><path d="M 558.88 40 L 551.88 43.5 L 553.63 40 L 551.88 36.5 Z" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-9"><g><rect x="320" y="0" width="160" height="80" rx="12" ry="12" fill="url(#mx-gradient-3e63dd-1-6c83dd-1-s-0)" stroke="#8ba6ff" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 40px; margin-left: 321px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 15px;">Data Worker</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-10"><g><path d="M 400 153.63 L 400 86.37" fill="none" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 400 158.88 L 396.5 151.88 L 400 153.63 L 403.5 151.88 Z" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="all"/><path d="M 400 81.12 L 403.5 88.12 L 400 86.37 L 396.5 88.12 Z" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-11"><g><rect x="560" y="0" width="120" height="80" rx="12" ry="12" fill="#647687" stroke="#314354" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 40px; margin-left: 561px;"><div data-drawio-colors="color: #ffffff; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 14px;">Backend</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-12"><g><path d="M 620 286.37 L 620 340 L 620 393.63" fill="none" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 620 281.12 L 623.5 288.12 L 620 286.37 L 616.5 288.12 Z" fill-opacity="var(--fill-opacity)" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="all"/><path d="M 620 398.88 L 616.5 391.88 L 620 393.63 L 623.5 391.88 Z" fill-opacity="var(--fill-opacity)" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-13"><g><rect x="560" y="200" width="120" height="80" rx="12" ry="12" fill-opacity="var(--fill-opacity)" fill="url(#mx-gradient-ffcc99-1-fbc593-1-s-0)" stroke="#994c00" stroke-opacity="var(--stroke-opacity)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left; opacity: var(--fill-opacity);"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 240px; margin-left: 561px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 13px;" color="#000000">Canvas Worker<br />(optional)</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-14"><g><rect x="280" y="400" width="400" height="80" rx="12" ry="12" fill="url(#mx-gradient-008a00-1-00cc00-1-s-0)" stroke="#005700" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 398px; height: 1px; padding-top: 440px; margin-left: 281px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 13px;">Main Thread<br />(Browser Window)</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-15"><g><path d="M 200 460 L 273.63 460" fill="none" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 278.88 460 L 271.88 463.5 L 273.63 460 L 271.88 456.5 Z" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-16"><g><rect x="0" y="400" width="200" height="80" rx="12" ry="12" fill="url(#mx-gradient-3e63dd-1-6c83dd-1-s-0)" stroke="#8ba6ff" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 440px; margin-left: 1px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 13px;">VDom Worker<br />(optional)</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-17"><g><rect x="280" y="440" width="120" height="40" rx="6" ry="6" fill="url(#mx-gradient-ffcc99-1-fbc593-1-s-0)" stroke="#994c00" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 460px; margin-left: 281px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 13px;" color="#000000">DOM Operations</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-18"><g><rect x="560" y="400" width="120" height="40" rx="6" ry="6" fill-opacity="var(--fill-opacity)" fill="url(#mx-gradient-ffcc99-1-fbc593-1-s-0)" stroke="#994c00" stroke-opacity="var(--stroke-opacity)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left; opacity: var(--fill-opacity);"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 420px; margin-left: 561px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 13px;" color="#000000">Canvas</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-19"><g><path d="M 340 326.37 L 340 393.63" fill="none" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 340 321.12 L 343.5 328.12 L 340 326.37 L 336.5 328.12 Z" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="all"/><path d="M 340 398.88 L 336.5 391.88 L 340 393.63 L 343.5 391.88 Z" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-20"><g><rect x="80" y="0" width="160" height="80" rx="12" ry="12" fill-opacity="var(--fill-opacity)" fill="url(#mx-gradient-3e63dd-1-6c83dd-1-s-0)" stroke="#8ba6ff" stroke-opacity="var(--stroke-opacity)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left; opacity: var(--fill-opacity);"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 40px; margin-left: 81px;"><div data-drawio-colors="color: rgb(240, 240, 240); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 14px;">Task Worker<br />(optional)</font></div></div></div></foreignObject></g></g></g><g data-cell-id="TvLHVO9ugg6I3p-DXBA7-21"><g><path d="M 160 86.37 L 160 240 L 193.63 240" fill="none" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 160 81.12 L 163.5 88.12 L 160 86.37 L 156.5 88.12 Z" fill-opacity="var(--fill-opacity)" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="all"/><path d="M 198.88 240 L 191.88 243.5 L 193.63 240 L 191.88 236.5 Z" fill-opacity="var(--fill-opacity)" fill="rgb(240, 240, 240)" stroke="rgb(240, 240, 240)" stroke-opacity="var(--stroke-opacity)" stroke-miterlimit="10" pointer-events="all"/></g></g></g></g></g></svg>
|
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 '7.0.
|
265
|
+
* @default '7.0.4'
|
266
266
|
* @memberOf! module:Neo
|
267
267
|
* @name config.version
|
268
268
|
* @type String
|
269
269
|
*/
|
270
|
-
version: '7.0.
|
270
|
+
version: '7.0.4'
|
271
271
|
};
|
272
272
|
|
273
273
|
Object.assign(DefaultConfig, {
|
package/src/Neo.mjs
CHANGED
@@ -54,13 +54,6 @@ Neo = globalThis.Neo = Object.assign({
|
|
54
54
|
*/
|
55
55
|
insideWorker: typeof DedicatedWorkerGlobalScope !== 'undefined' || typeof WorkerGlobalScope !== 'undefined',
|
56
56
|
|
57
|
-
/**
|
58
|
-
* @deprecated in neo.mjs v7.0
|
59
|
-
*/
|
60
|
-
applyClassConfig(cls) {
|
61
|
-
return Neo.setupClass(cls)
|
62
|
-
},
|
63
|
-
|
64
57
|
/**
|
65
58
|
* Maps methods from one namespace to another one
|
66
59
|
* @example
|
package/src/button/Base.mjs
CHANGED
@@ -92,7 +92,9 @@ class Base extends Component {
|
|
92
92
|
*/
|
93
93
|
pressed_: false,
|
94
94
|
/**
|
95
|
-
* Change the browser hash value on click
|
95
|
+
* Change the browser hash value on click.
|
96
|
+
* Use route for internal navigation and url for external links. Do not use both on the same instance.
|
97
|
+
* Transforms the button tag into an a tag [optional]
|
96
98
|
* @member {String|null} route_=null
|
97
99
|
*/
|
98
100
|
route_: null,
|
@@ -257,16 +259,18 @@ class Base extends Component {
|
|
257
259
|
items = isArray ? value : value.items,
|
258
260
|
menuConfig = isArray ? {} : value,
|
259
261
|
model = me.getModel(),
|
262
|
+
{appName, theme, windowId} = me,
|
260
263
|
|
261
264
|
config = Neo.merge({
|
262
265
|
module : module.default,
|
263
266
|
align : {edgeAlign : 't0-b0', target: me.id},
|
264
|
-
appName
|
267
|
+
appName,
|
265
268
|
displayField : 'text',
|
266
269
|
floating : true,
|
267
270
|
hidden : true,
|
268
271
|
parentComponent: me,
|
269
|
-
theme
|
272
|
+
theme,
|
273
|
+
windowId
|
270
274
|
}, menuConfig);
|
271
275
|
|
272
276
|
if (items) {
|
@@ -295,6 +299,16 @@ class Base extends Component {
|
|
295
299
|
this.cls = cls
|
296
300
|
}
|
297
301
|
|
302
|
+
/**
|
303
|
+
* Triggered after the route config got changed
|
304
|
+
* @param {String|null} value
|
305
|
+
* @param {String|null} oldValue
|
306
|
+
* @protected
|
307
|
+
*/
|
308
|
+
afterSetRoute(value, oldValue) {
|
309
|
+
!this.editRoute && this.updateTag()
|
310
|
+
}
|
311
|
+
|
298
312
|
/**
|
299
313
|
* Triggered after the theme config got changed
|
300
314
|
* @param {String|null} value
|
@@ -336,22 +350,12 @@ class Base extends Component {
|
|
336
350
|
|
337
351
|
/**
|
338
352
|
* Triggered after the url config got changed
|
339
|
-
* @param {String} value
|
340
|
-
* @param {String} oldValue
|
353
|
+
* @param {String|null} value
|
354
|
+
* @param {String|null} oldValue
|
341
355
|
* @protected
|
342
356
|
*/
|
343
357
|
afterSetUrl(value, oldValue) {
|
344
|
-
|
345
|
-
|
346
|
-
if (value) {
|
347
|
-
vdomRoot.href = value;
|
348
|
-
vdomRoot.tag = 'a'
|
349
|
-
} else {
|
350
|
-
delete vdomRoot.href;
|
351
|
-
vdomRoot.tag = 'button'
|
352
|
-
}
|
353
|
-
|
354
|
-
this.update()
|
358
|
+
this.updateTag()
|
355
359
|
}
|
356
360
|
|
357
361
|
/**
|
@@ -385,6 +389,22 @@ class Base extends Component {
|
|
385
389
|
me.update()
|
386
390
|
}
|
387
391
|
|
392
|
+
/**
|
393
|
+
* Triggered after the windowId config got changed
|
394
|
+
* @param {Number|null} value
|
395
|
+
* @param {Number|null} oldValue
|
396
|
+
* @protected
|
397
|
+
*/
|
398
|
+
afterSetWindowId(value, oldValue) {
|
399
|
+
super.afterSetWindowId(value, oldValue);
|
400
|
+
|
401
|
+
let {menuList} = this;
|
402
|
+
|
403
|
+
if (menuList) {
|
404
|
+
menuList.windowId = value
|
405
|
+
}
|
406
|
+
}
|
407
|
+
|
388
408
|
/**
|
389
409
|
* Converts the iconCls array into a string on beforeGet
|
390
410
|
* @returns {String}
|
@@ -440,14 +460,7 @@ class Base extends Component {
|
|
440
460
|
* @protected
|
441
461
|
*/
|
442
462
|
changeRoute() {
|
443
|
-
|
444
|
-
{windowId} = me;
|
445
|
-
|
446
|
-
if (me.editRoute) {
|
447
|
-
Neo.Main.editRoute(me.route)
|
448
|
-
} else {
|
449
|
-
Neo.Main.setRoute({value: me.route, windowId})
|
450
|
-
}
|
463
|
+
this.editRoute && Neo.Main.editRoute(this.route)
|
451
464
|
}
|
452
465
|
|
453
466
|
/**
|
@@ -492,7 +505,7 @@ class Base extends Component {
|
|
492
505
|
me.callback(me.handler, me.handlerScope || me, [data]);
|
493
506
|
|
494
507
|
me.menu && me.toggleMenu();
|
495
|
-
me.route && me.changeRoute();
|
508
|
+
me.route && me.changeRoute(); // only relevant for editRoute=true
|
496
509
|
me.useRippleEffect && me.showRipple(data)
|
497
510
|
}
|
498
511
|
|
@@ -549,6 +562,30 @@ class Base extends Component {
|
|
549
562
|
await this.timeout(50)
|
550
563
|
}
|
551
564
|
}
|
565
|
+
|
566
|
+
/**
|
567
|
+
*
|
568
|
+
*/
|
569
|
+
updateTag() {
|
570
|
+
let me = this,
|
571
|
+
{editRoute, route, url} = me,
|
572
|
+
link = !editRoute && route || url,
|
573
|
+
vdomRoot = me.getVdomRoot();
|
574
|
+
|
575
|
+
if (!editRoute && route?.startsWith('#') === false) {
|
576
|
+
link = '#' + link
|
577
|
+
}
|
578
|
+
|
579
|
+
if (link) {
|
580
|
+
vdomRoot.href = link;
|
581
|
+
vdomRoot.tag = 'a'
|
582
|
+
} else {
|
583
|
+
delete vdomRoot.href;
|
584
|
+
vdomRoot.tag = 'button'
|
585
|
+
}
|
586
|
+
|
587
|
+
me.update()
|
588
|
+
}
|
552
589
|
}
|
553
590
|
|
554
591
|
export default Neo.setupClass(Base);
|
package/src/button/Split.mjs
CHANGED
@@ -189,6 +189,22 @@ class Split extends Button {
|
|
189
189
|
me.ntype = ntype;
|
190
190
|
}
|
191
191
|
|
192
|
+
/**
|
193
|
+
* Triggered after the windowId config got changed
|
194
|
+
* @param {Number|null} value
|
195
|
+
* @param {Number|null} oldValue
|
196
|
+
* @protected
|
197
|
+
*/
|
198
|
+
afterSetWindowId(value, oldValue) {
|
199
|
+
let {triggerButton} = this;
|
200
|
+
|
201
|
+
if (triggerButton) {
|
202
|
+
triggerButton.appName = value;
|
203
|
+
}
|
204
|
+
|
205
|
+
super.afterSetWindowId(value, oldValue)
|
206
|
+
}
|
207
|
+
|
192
208
|
/**
|
193
209
|
* @param {Boolean} [updateParentVdom=false]
|
194
210
|
* @param {Boolean} [silent=false]
|
package/src/collection/Base.mjs
CHANGED
@@ -129,12 +129,12 @@ class Base extends CoreBase {
|
|
129
129
|
}
|
130
130
|
|
131
131
|
/**
|
132
|
-
* Adds one or more items to the end of the collection
|
132
|
+
* Adds one or more items to the end of the collection
|
133
133
|
* @param {Array|Object} item The item(s) to add
|
134
134
|
* @returns {Object[]} an array containing all added items
|
135
135
|
*/
|
136
136
|
add(item) {
|
137
|
-
return this.splice(
|
137
|
+
return this.splice(null, null, item).addedItems
|
138
138
|
}
|
139
139
|
|
140
140
|
/**
|
package/src/component/Base.mjs
CHANGED
@@ -515,7 +515,7 @@ class Base extends CoreBase {
|
|
515
515
|
* @protected
|
516
516
|
*/
|
517
517
|
afterSetAppName(value, oldValue) {
|
518
|
-
|
518
|
+
|
519
519
|
}
|
520
520
|
|
521
521
|
/**
|
@@ -1036,16 +1036,21 @@ class Base extends CoreBase {
|
|
1036
1036
|
* @protected
|
1037
1037
|
*/
|
1038
1038
|
afterSetWindowId(value, oldValue) {
|
1039
|
-
let
|
1039
|
+
let me = this,
|
1040
|
+
controller = me.controller;
|
1041
|
+
|
1042
|
+
if (value) {
|
1043
|
+
Neo.currentWorker.insertThemeFiles(value, me.__proto__);
|
1040
1044
|
|
1041
|
-
|
1042
|
-
|
1045
|
+
if (controller) {
|
1046
|
+
controller.windowId = value
|
1047
|
+
}
|
1043
1048
|
}
|
1044
1049
|
|
1045
1050
|
// If a component gets moved into a different window, an update cycle might still be running.
|
1046
1051
|
// Since the update might no longer get mapped, we want to re-enable this instance for future updates.
|
1047
1052
|
if (oldValue) {
|
1048
|
-
|
1053
|
+
me.isVdomUpdating = false
|
1049
1054
|
}
|
1050
1055
|
}
|
1051
1056
|
|
package/src/component/Video.mjs
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
import BaseComponent from '../component/Base.mjs';
|
2
2
|
import VDomUtil from '../util/VDom.mjs';
|
3
3
|
|
4
|
-
let isOperaMini = null;
|
5
|
-
|
6
4
|
/**
|
7
5
|
* @class Neo.component.Video
|
8
6
|
* @extends Neo.component.Base
|
@@ -10,7 +8,7 @@ let isOperaMini = null;
|
|
10
8
|
* @example
|
11
9
|
* ntype : 'video',
|
12
10
|
* url : 'https://video-ssl.itunes.apple.com/itunes-assets/Video125/v4/a0/57/54/a0575426-dd8e-2d25-bdf3-139702870b50/mzvf_786190431362224858.640x464.h264lc.U.p.m4v'
|
13
|
-
*
|
11
|
+
* autoPlay: true
|
14
12
|
*
|
15
13
|
* @methods
|
16
14
|
* play
|
@@ -36,14 +34,9 @@ class Video extends BaseComponent {
|
|
36
34
|
* Automatically start the video
|
37
35
|
* Initial setting, which does not make sense to change later
|
38
36
|
* !!Most browsers only support muted autostart
|
39
|
-
* @member {Boolean}
|
40
|
-
*/
|
41
|
-
autoplay: false,
|
42
|
-
/**
|
43
|
-
* In case the browser does not support the video source the component should show an error.
|
44
|
-
* @member {String} errorMsg='The browser does not support the video'
|
37
|
+
* @member {Boolean} autoPlay=false
|
45
38
|
*/
|
46
|
-
|
39
|
+
autoPlay: false,
|
47
40
|
/**
|
48
41
|
* Current state of the video
|
49
42
|
* @member {Boolean} playing_=false
|
@@ -115,18 +108,12 @@ class Video extends BaseComponent {
|
|
115
108
|
* @param {String} value
|
116
109
|
* @param {String|null} oldValue
|
117
110
|
*/
|
118
|
-
|
111
|
+
afterSetUrl(value, oldValue) {
|
119
112
|
if (!value) return;
|
120
113
|
|
121
114
|
let me = this,
|
122
115
|
{vdom} = me,
|
123
|
-
media = VDomUtil.getFlags(vdom, 'media')[0]
|
124
|
-
userAgent;
|
125
|
-
|
126
|
-
if (isOperaMini === null) {
|
127
|
-
userAgent = await Neo.Main.getByPath({path: 'navigator.userAgent'});
|
128
|
-
isOperaMini = userAgent.includes('Opera Mini');
|
129
|
-
}
|
116
|
+
media = VDomUtil.getFlags(vdom, 'media')[0];
|
130
117
|
|
131
118
|
media.cn = [{
|
132
119
|
tag : 'source',
|
@@ -134,14 +121,6 @@ class Video extends BaseComponent {
|
|
134
121
|
type: me.type
|
135
122
|
}];
|
136
123
|
|
137
|
-
// Opera Mini might not support the video-source => check the user agent string
|
138
|
-
if (isOperaMini) {
|
139
|
-
media.cn.push({
|
140
|
-
tag : 'span',
|
141
|
-
html: me.errorMsg
|
142
|
-
})
|
143
|
-
}
|
144
|
-
|
145
124
|
this.update()
|
146
125
|
}
|
147
126
|
|
@@ -156,17 +135,17 @@ class Video extends BaseComponent {
|
|
156
135
|
* @protected
|
157
136
|
*/
|
158
137
|
handleAutoplay() {
|
159
|
-
if (!this.
|
138
|
+
if (!this.autoPlay) return;
|
160
139
|
|
161
140
|
let {vdom} = this,
|
162
|
-
media
|
141
|
+
media = VDomUtil.getFlags(vdom, 'media')[0];
|
163
142
|
|
164
143
|
// Most browsers require videos to be muted for autoplay to work.
|
165
144
|
media.muted = true;
|
166
145
|
// Allows inline playback on iOS devices
|
167
146
|
media.playsInline = true;
|
168
147
|
|
169
|
-
this.playing = true
|
148
|
+
this.playing = true
|
170
149
|
}
|
171
150
|
|
172
151
|
/**
|
package/src/container/Base.mjs
CHANGED
@@ -222,7 +222,8 @@ class Base extends Component {
|
|
222
222
|
afterSetWindowId(value, oldValue) {
|
223
223
|
super.afterSetWindowId(value, oldValue);
|
224
224
|
|
225
|
-
let me
|
225
|
+
let me = this,
|
226
|
+
{layout} = me;
|
226
227
|
|
227
228
|
value && me.items?.forEach(item => {
|
228
229
|
if (!Neo.isString(item)) {
|
@@ -230,8 +231,8 @@ class Base extends Component {
|
|
230
231
|
}
|
231
232
|
})
|
232
233
|
|
233
|
-
if (value &&
|
234
|
-
|
234
|
+
if (value && layout && !Neo.isString(layout)) {
|
235
|
+
layout.windowId = value
|
235
236
|
}
|
236
237
|
}
|
237
238
|
|
package/src/dialog/Base.mjs
CHANGED
@@ -286,14 +286,15 @@ class Base extends Panel {
|
|
286
286
|
afterSetResizable(value, oldValue) {
|
287
287
|
if (value && !this.getPlugin('resizable')) {
|
288
288
|
import('../plugin/Resizable.mjs').then(module => {
|
289
|
-
let me
|
290
|
-
{appName} = me,
|
291
|
-
plugins
|
289
|
+
let me = this,
|
290
|
+
{appName, windowId} = me,
|
291
|
+
plugins = me.plugins || [];
|
292
292
|
|
293
293
|
plugins.push({
|
294
294
|
module : module.default,
|
295
295
|
appName,
|
296
296
|
delegationCls: 'neo-dialog',
|
297
|
+
windowId,
|
297
298
|
...me.resizablePluginConfig
|
298
299
|
});
|
299
300
|
|
@@ -326,6 +327,27 @@ class Base extends Panel {
|
|
326
327
|
this.syncTrapFocus()
|
327
328
|
}
|
328
329
|
|
330
|
+
/**
|
331
|
+
* Triggered after the windowId config got changed
|
332
|
+
* @param {Number|null} value
|
333
|
+
* @param {Number|null} oldValue
|
334
|
+
* @protected
|
335
|
+
*/
|
336
|
+
afterSetWindowId(value, oldValue) {
|
337
|
+
let me = this,
|
338
|
+
resizable = me.getPlugin('resizable');
|
339
|
+
|
340
|
+
if (me.dragZone) {
|
341
|
+
me.dragZone.windowId = value
|
342
|
+
}
|
343
|
+
|
344
|
+
if (resizable) {
|
345
|
+
resizable.windowId = value
|
346
|
+
}
|
347
|
+
|
348
|
+
super.afterSetWindowId(value, oldValue)
|
349
|
+
}
|
350
|
+
|
329
351
|
/**
|
330
352
|
*
|
331
353
|
*/
|
@@ -480,9 +502,10 @@ class Base extends Panel {
|
|
480
502
|
*
|
481
503
|
*/
|
482
504
|
createHeader() {
|
483
|
-
let me
|
484
|
-
|
485
|
-
|
505
|
+
let me = this,
|
506
|
+
{windowId} = me,
|
507
|
+
cls = ['neo-header-toolbar', 'neo-toolbar'],
|
508
|
+
headers = me.headers || [];
|
486
509
|
|
487
510
|
me.draggable && cls.push('neo-draggable');
|
488
511
|
|
@@ -495,6 +518,7 @@ class Base extends Panel {
|
|
495
518
|
id : me.getHeaderToolbarId(),
|
496
519
|
listeners: {headerAction: me.executeHeaderAction, scope: me},
|
497
520
|
title : me.title,
|
521
|
+
windowId,
|
498
522
|
...me.headerConfig
|
499
523
|
});
|
500
524
|
|
@@ -661,8 +685,9 @@ class Base extends Panel {
|
|
661
685
|
* @param data
|
662
686
|
*/
|
663
687
|
onDragStart(data) {
|
664
|
-
let me
|
665
|
-
|
688
|
+
let me = this,
|
689
|
+
{windowId} = me,
|
690
|
+
style = me.style || {};
|
666
691
|
|
667
692
|
if (!me.maximized) {
|
668
693
|
me.isDragging = true;
|
@@ -679,6 +704,7 @@ class Base extends Panel {
|
|
679
704
|
dragProxyConfig : {vdom: me.getProxyVdom()},
|
680
705
|
owner : me,
|
681
706
|
useProxyWrapper : false,
|
707
|
+
windowId,
|
682
708
|
...me.dragZoneConfig
|
683
709
|
});
|
684
710
|
|
@@ -144,7 +144,11 @@ class DragZone extends Base {
|
|
144
144
|
* True creates a position:absolute wrapper div which contains the cloned element
|
145
145
|
* @member {Boolean} useProxyWrapper=true
|
146
146
|
*/
|
147
|
-
useProxyWrapper: true
|
147
|
+
useProxyWrapper: true,
|
148
|
+
/**
|
149
|
+
* @member {Number|null} windowId_=null
|
150
|
+
*/
|
151
|
+
windowId_: null
|
148
152
|
}
|
149
153
|
|
150
154
|
/**
|
@@ -159,15 +163,13 @@ class DragZone extends Base {
|
|
159
163
|
}
|
160
164
|
|
161
165
|
/**
|
162
|
-
* Triggered after the
|
163
|
-
* @param {
|
164
|
-
* @param {
|
166
|
+
* Triggered after the windowId config got changed
|
167
|
+
* @param {Number|null} value
|
168
|
+
* @param {Number|null} oldValue
|
165
169
|
* @protected
|
166
170
|
*/
|
167
|
-
|
168
|
-
|
169
|
-
Neo.currentWorker.insertThemeFiles(value, this.owner.windowId, this.__proto__)
|
170
|
-
}
|
171
|
+
afterSetWindowId(value, oldValue) {
|
172
|
+
value && Neo.currentWorker.insertThemeFiles(value, this.__proto__)
|
171
173
|
}
|
172
174
|
|
173
175
|
/**
|
package/src/form/field/Text.mjs
CHANGED
@@ -94,6 +94,20 @@ class Time extends Picker {
|
|
94
94
|
this.clock.time = value
|
95
95
|
}
|
96
96
|
}
|
97
|
+
|
98
|
+
/**
|
99
|
+
* Triggered after the windowId config got changed
|
100
|
+
* @param {Number} value
|
101
|
+
* @param {Number|null} oldValue
|
102
|
+
* @protected
|
103
|
+
*/
|
104
|
+
afterSetWindowId(value, oldValue) {
|
105
|
+
super.afterSetWindowId(value, oldValue);
|
106
|
+
|
107
|
+
if (value) {
|
108
|
+
this.clock.windowId = value
|
109
|
+
}
|
110
|
+
}
|
97
111
|
}
|
98
112
|
|
99
113
|
export default Neo.setupClass(Time);
|
package/src/layout/Base.mjs
CHANGED
@@ -25,7 +25,7 @@ class Base extends CoreBase {
|
|
25
25
|
*/
|
26
26
|
appName_: null,
|
27
27
|
/**
|
28
|
-
* The
|
28
|
+
* The id of the Container instance this layout is bound to
|
29
29
|
* @member {?String} containerId=null
|
30
30
|
* @protected
|
31
31
|
*/
|
@@ -43,9 +43,9 @@ class Base extends CoreBase {
|
|
43
43
|
*/
|
44
44
|
isLayout: true,
|
45
45
|
/**
|
46
|
-
* @member {Number|null}
|
46
|
+
* @member {Number|null} windowId_=null
|
47
47
|
*/
|
48
|
-
|
48
|
+
windowId_: null
|
49
49
|
}
|
50
50
|
|
51
51
|
/**
|
@@ -59,13 +59,13 @@ class Base extends CoreBase {
|
|
59
59
|
}
|
60
60
|
|
61
61
|
/**
|
62
|
-
* Triggered after the
|
63
|
-
* @param {
|
64
|
-
* @param {
|
62
|
+
* Triggered after the windowId config got changed
|
63
|
+
* @param {Number} value
|
64
|
+
* @param {Number|null} oldValue
|
65
65
|
* @protected
|
66
66
|
*/
|
67
|
-
|
68
|
-
value && Neo.currentWorker.insertThemeFiles(value, this.
|
67
|
+
afterSetWindowId(value, oldValue) {
|
68
|
+
value && Neo.currentWorker.insertThemeFiles(value, this.__proto__)
|
69
69
|
}
|
70
70
|
|
71
71
|
/**
|
package/src/list/Component.mjs
CHANGED
@@ -37,6 +37,20 @@ class Component extends Base {
|
|
37
37
|
})
|
38
38
|
}
|
39
39
|
|
40
|
+
/**
|
41
|
+
* Triggered after the windowId config got changed
|
42
|
+
* @param {Number|null} value
|
43
|
+
* @param {Number|null} oldValue
|
44
|
+
* @protected
|
45
|
+
*/
|
46
|
+
afterSetWindowId(value, oldValue) {
|
47
|
+
super.afterSetWindowId(value, oldValue);
|
48
|
+
|
49
|
+
value && this.items?.forEach(item => {
|
50
|
+
item.windowId = value
|
51
|
+
})
|
52
|
+
}
|
53
|
+
|
40
54
|
/**
|
41
55
|
*
|
42
56
|
*/
|
@@ -136,7 +136,7 @@ class PrefixField extends Base {
|
|
136
136
|
]);
|
137
137
|
|
138
138
|
me.owner.on('mounted', () => {
|
139
|
-
Neo.currentWorker.insertThemeFiles(owner.
|
139
|
+
Neo.currentWorker.insertThemeFiles(owner.windowId, me.__proto__)
|
140
140
|
}, me, {once: true})
|
141
141
|
}
|
142
142
|
|
package/src/plugin/Resizable.mjs
CHANGED
@@ -164,7 +164,11 @@ class Resizable extends Base {
|
|
164
164
|
* @member {Object} targetNode=null
|
165
165
|
* @protected
|
166
166
|
*/
|
167
|
-
targetNode: null
|
167
|
+
targetNode: null,
|
168
|
+
/**
|
169
|
+
* @member {Number|null} windowId_=null
|
170
|
+
*/
|
171
|
+
windowId_: null
|
168
172
|
}
|
169
173
|
|
170
174
|
/**
|
@@ -228,14 +232,24 @@ class Resizable extends Base {
|
|
228
232
|
* @protected
|
229
233
|
*/
|
230
234
|
afterSetAppName(value, oldValue) {
|
235
|
+
if (this.dragZone) {
|
236
|
+
this.dragZone.appName = value
|
237
|
+
}
|
238
|
+
}
|
239
|
+
|
240
|
+
/**
|
241
|
+
* Triggered after the windowId config got changed
|
242
|
+
* @param {Number} value
|
243
|
+
* @param {Number|null} oldValue
|
244
|
+
* @protected
|
245
|
+
*/
|
246
|
+
afterSetWindowId(value, oldValue) {
|
231
247
|
let me = this;
|
232
248
|
|
233
|
-
|
234
|
-
Neo.currentWorker.insertThemeFiles(value, me.owner.windowId, me.__proto__)
|
235
|
-
}
|
249
|
+
value && Neo.currentWorker.insertThemeFiles(value, me.__proto__)
|
236
250
|
|
237
251
|
if (me.dragZone) {
|
238
|
-
me.dragZone.
|
252
|
+
me.dragZone.windowId = value
|
239
253
|
}
|
240
254
|
}
|
241
255
|
|
@@ -464,9 +464,11 @@ class Button extends BaseButton {
|
|
464
464
|
|
465
465
|
/**
|
466
466
|
* @param {Object} data
|
467
|
+
* @param {Neo.button.Base} data.column
|
467
468
|
* @param {String} data.dataField
|
468
469
|
* @param {Number} data.index
|
469
470
|
* @param {Object} data.record
|
471
|
+
* @param {Neo.table.Container} data.tableContainer
|
470
472
|
* @param {Number|String} data.value
|
471
473
|
* @returns {*}
|
472
474
|
*/
|
package/src/toolbar/Base.mjs
CHANGED
@@ -112,12 +112,27 @@ class Base extends Container {
|
|
112
112
|
appName : me.appName,
|
113
113
|
boundaryContainerId: me.id,
|
114
114
|
owner : me,
|
115
|
+
windowId : me.windowId,
|
115
116
|
...me.sortZoneConfig
|
116
117
|
})
|
117
118
|
})
|
118
119
|
}
|
119
120
|
}
|
120
121
|
|
122
|
+
/**
|
123
|
+
* Triggered after the windowId config got changed
|
124
|
+
* @param {Number|null} value
|
125
|
+
* @param {Number|null} oldValue
|
126
|
+
* @protected
|
127
|
+
*/
|
128
|
+
afterSetWindowId(value, oldValue) {
|
129
|
+
super.afterSetWindowId(value, oldValue);
|
130
|
+
|
131
|
+
if (this.sortZone) {
|
132
|
+
this.sortZone.windowId = value
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
121
136
|
/**
|
122
137
|
* Checks if the new dock position matches a value of the static dockPositions config
|
123
138
|
* @param {String} value
|
package/src/worker/App.mjs
CHANGED
@@ -275,12 +275,11 @@ class App extends Base {
|
|
275
275
|
|
276
276
|
/**
|
277
277
|
* In case you don't want to include prototype based CSS files, use the className param instead
|
278
|
-
* @param {String} appName
|
279
278
|
* @param {Number} windowId
|
280
279
|
* @param {Neo.core.Base} [proto]
|
281
280
|
* @param {String} [className]
|
282
281
|
*/
|
283
|
-
insertThemeFiles(
|
282
|
+
insertThemeFiles(windowId, proto, className) {
|
284
283
|
if (Neo.config.themes.length > 0) {
|
285
284
|
className = className || proto.className;
|
286
285
|
//console.log(windowId, className);
|
@@ -290,7 +289,7 @@ class App extends Base {
|
|
290
289
|
classPath, classRoot, fileName, lClassRoot, mapClassName, ns, themeFolders;
|
291
290
|
|
292
291
|
if (!cssMap) {
|
293
|
-
me.themeFilesCache.push([
|
292
|
+
me.themeFilesCache.push([windowId, proto])
|
294
293
|
} else {
|
295
294
|
// we need to modify app related class names
|
296
295
|
if (!className.startsWith('Neo.')) {
|
@@ -306,7 +305,7 @@ class App extends Base {
|
|
306
305
|
|
307
306
|
if (parent && parent !== Neo.core.Base.prototype) {
|
308
307
|
if (!Neo.ns(`${windowId}.${parent.className}`, false, cssMap)) {
|
309
|
-
me.insertThemeFiles(
|
308
|
+
me.insertThemeFiles(windowId, parent)
|
310
309
|
}
|
311
310
|
}
|
312
311
|
|
@@ -321,7 +320,6 @@ class App extends Base {
|
|
321
320
|
ns[fileName] = true;
|
322
321
|
|
323
322
|
Neo.main.addon.Stylesheet.addThemeFiles({
|
324
|
-
appName,
|
325
323
|
className: mapClassName || className,
|
326
324
|
folders : themeFolders,
|
327
325
|
windowId
|