neo.mjs 6.9.4 → 6.9.6
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/CONCEPT.md +2 -2
- package/.github/NEOMJS_HISTORY.md +2 -2
- package/README.md +10 -10
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/covid/Util.mjs +1 -1
- package/apps/covid/view/HeaderContainer.mjs +1 -1
- package/apps/covid/view/MainContainerController.mjs +1 -1
- package/apps/route/view/HeaderContainer.mjs +1 -1
- package/apps/sharedcovid/Util.mjs +1 -1
- package/apps/sharedcovid/view/HeaderContainer.mjs +1 -1
- package/apps/sharedcovid/view/MainContainerController.mjs +1 -1
- package/apps/website/view/blog/List.mjs +1 -1
- package/apps/website/view/examples/List.mjs +1 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/component/coronaGallery/CountryGallery.mjs +1 -1
- package/examples/component/coronaHelix/CountryHelix.mjs +1 -1
- package/examples/component/toast/resources/highlight/CHANGES.md +2 -2
- package/examples/component/toast/resources/highlight/README.md +2 -2
- package/examples/grid/covid/Util.mjs +1 -1
- package/examples/preloadingAssets/view/MainContainer.mjs +2 -2
- package/examples/preloadingAssets/view/MainContainerController.mjs +1 -1
- package/examples/table/covid/Util.mjs +1 -1
- package/package.json +1 -1
- package/resources/scss/src/component/Base.scss +16 -16
- package/resources/scss/theme-dark/component/Base.scss +6 -0
- package/resources/scss/theme-dark/menu/List.scss +0 -1
- package/resources/scss/theme-light/component/Base.scss +6 -0
- package/resources/scss/theme-light/menu/List.scss +0 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/Neo.mjs +9 -4
- package/src/component/Base.mjs +2 -1
- package/src/core/Base.mjs +10 -2
package/.github/CONCEPT.md
CHANGED
@@ -24,7 +24,7 @@ The best way to get a feeling for workers is using the Google Chrome Dev Tools (
|
|
24
24
|
In case you open the <a href="https://neomjs.github.io/pages/node_modules/neo.mjs/dist/production/docs/index.html">neo.mjs Docs App</a>
|
25
25
|
(or any other neo.mjs app), you will get a dropdown menu where you can pick the console scope:
|
26
26
|
|
27
|
-
<img src="https://raw.githubusercontent.com/neomjs/pages/
|
27
|
+
<img src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/concept/worker_scope.png">
|
28
28
|
|
29
29
|
The default scope (top) will show the (console) logs inside all threads.
|
30
30
|
|
@@ -162,7 +162,7 @@ class Gallery extends Component {
|
|
162
162
|
<a href="https://github.com/neomjs/neo/blob/dev/src/component/Gallery.mjs">Full component.Gallery Source Code</a>
|
163
163
|
|
164
164
|
Now let us take a look at the source code inside the browser:
|
165
|
-
<img src="https://raw.githubusercontent.com/neomjs/pages/
|
165
|
+
<img src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/concept/gallery_workers.png">
|
166
166
|
|
167
167
|
Expand the image and take a close look at the Chrome Dev Tools:
|
168
168
|
1. The source code is 1:1 the same
|
@@ -17,7 +17,7 @@ Just to make a point on how much time & effort has already been spent on neo.mjs
|
|
17
17
|
|
18
18
|
1 commits Nils Dehl
|
19
19
|
|
20
|
-
<img alt="neo.mjs commit history" src="https://raw.githubusercontent.com/neomjs/pages/
|
20
|
+
<img alt="neo.mjs commit history" src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/neomjs-commit-history.png">
|
21
21
|
|
22
22
|
I would also like to add a ***big thank you*** to everyone who provided feedback prior to the public release!
|
23
23
|
|
@@ -26,4 +26,4 @@ Tobi
|
|
26
26
|
|
27
27
|
<br><br>
|
28
28
|
Copyright (c) 2015 - today, <a href="https://www.linkedin.com/in/tobiasuhlig/">Tobias Uhlig</a>
|
29
|
-
& <a href="https://www.linkedin.com/in/richwaters/">Rich Waters</a>
|
29
|
+
& <a href="https://www.linkedin.com/in/richwaters/">Rich Waters</a>
|
package/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<p align="center">
|
2
|
-
<img height="250" width="250" src="https://raw.githubusercontent.com/neomjs/pages/
|
2
|
+
<img height="250" width="250" src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/logo_rounded.svg">
|
3
3
|
</p>
|
4
4
|
|
5
5
|
<p align="center">
|
@@ -16,8 +16,8 @@ neo.mjs enables you to create scalable & high performant Apps using more than ju
|
|
16
16
|
No need to take care of a workers setup, and the cross channel communication on your own.
|
17
17
|
|
18
18
|
<p align="center">
|
19
|
-
<a href="https://youtu.be/pYfM28Pz6_0"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/
|
20
|
-
<a href="https://youtu.be/aEA5333WiWY"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/
|
19
|
+
<a href="https://youtu.be/pYfM28Pz6_0"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/neo33s.png"></a>
|
20
|
+
<a href="https://youtu.be/aEA5333WiWY"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/neo-movie.png"></a>
|
21
21
|
</p>
|
22
22
|
|
23
23
|
<a href="https://tobiasuhlig.medium.com/predictive-offline-support-for-assets-you-have-not-used-yet-aeeccccd3754?source=friends_link&sk=e946e0f25f508e6a8cec4136400291a3">Version 4 release announcement</a>
|
@@ -44,7 +44,7 @@ Join our community:</br>
|
|
44
44
|
|
45
45
|
</br></br>
|
46
46
|
<h2 id="architectures">2. Scalable frontend architectures</h2>
|
47
|
-
<img src="https://raw.githubusercontent.com/neomjs/pages/
|
47
|
+
<img src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/apps-today.png">
|
48
48
|
|
49
49
|
Most frontends today still look like this. Everything happens inside the main thread (browser window), leading to a poor rendering performance.
|
50
50
|
The business logic happens inside main as well, which can slow down DOM updates and animations.
|
@@ -56,13 +56,13 @@ neo.mjs offers two different setups which follow the exact same API.
|
|
56
56
|
You can switch between <a href="https://developer.mozilla.org/en-US/docs/Web/API/Worker">dedicated</a> and
|
57
57
|
<a href="https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker">shared</a> workers at any point.
|
58
58
|
|
59
|
-
<img src="https://raw.githubusercontent.com/neomjs/pages/
|
59
|
+
<img src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/workers-setup-v4.png">
|
60
60
|
|
61
61
|
The dedicated workers setup uses 3-6 threads (CPUs).
|
62
62
|
Most parts of the frameworks as well as your apps and components live within the app worker.
|
63
63
|
Main threads are as small and idle as possible (42KB) plus optional main thread addons.
|
64
64
|
|
65
|
-
<img src="https://raw.githubusercontent.com/neomjs/pages/
|
65
|
+
<img src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/shared-workers-setup.png">
|
66
66
|
|
67
67
|
In case you want to e.g. create a web based IDE or a multi window banking / trading app,
|
68
68
|
the shared worker setup using 5+ threads (CPUs) is the perfect solution.
|
@@ -81,9 +81,9 @@ Blog post: <a href="https://medium.com/swlh/expanding-single-page-apps-into-mult
|
|
81
81
|
Chrome (v83+), Edge, Firefox (Safari does not support SharedWorkers yet).</br>
|
82
82
|
Desktop only.</br></br>
|
83
83
|
|
84
|
-
<a href="https://youtu.be/n7m7ZT1kXQk"><img src="https://raw.githubusercontent.com/neomjs/pages/
|
84
|
+
<a href="https://youtu.be/n7m7ZT1kXQk"><img src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/expanding_spa_vid.png"></a></br>
|
85
85
|
|
86
|
-
<img src="https://raw.githubusercontent.com/neomjs/pages/
|
86
|
+
<img src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/covidDashboard/sw_covid.png">
|
87
87
|
|
88
88
|
You can find the code of the multi window covid app <a href="https://github.com/neomjs/neo/tree/dev/apps/sharedcovid">here</a>.
|
89
89
|
|
@@ -92,9 +92,9 @@ You can find the code of the multi window covid app <a href="https://github.com/
|
|
92
92
|
<a href="https://neomjs.github.io/pages/node_modules/neo.mjs/dist/production/apps/covid/index.html#mainview=table">Live Demo: COIN App dist/production</a></br>
|
93
93
|
Desktop only => support for mobile devices is on the roadmap.</br></br>
|
94
94
|
|
95
|
-
<a href="https://www.youtube.com/watch?v=8lqNVaoGNdU"><img src="https://raw.githubusercontent.com/neomjs/pages/
|
95
|
+
<a href="https://www.youtube.com/watch?v=8lqNVaoGNdU"><img src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/covid_app_vid.png"></a></br>
|
96
96
|
|
97
|
-
<img src="https://raw.githubusercontent.com/neomjs/pages/
|
97
|
+
<img src="https://raw.githubusercontent.com/neomjs/pages/main/resources/images/covidDashboard/v3/table.png">
|
98
98
|
|
99
99
|
You can find the code of the covid app <a href="https://github.com/neomjs/neo/tree/dev/apps/covid">here</a>.
|
100
100
|
|
package/apps/ServiceWorker.mjs
CHANGED
package/apps/covid/Util.mjs
CHANGED
@@ -142,7 +142,7 @@ class Util extends Base {
|
|
142
142
|
return path;
|
143
143
|
}
|
144
144
|
|
145
|
-
return `https://raw.githubusercontent.com/neomjs/pages/
|
145
|
+
return `https://raw.githubusercontent.com/neomjs/pages/main/resources/images/flaticon/country_flags/png/${imageName}.png`;
|
146
146
|
}
|
147
147
|
|
148
148
|
/**
|
@@ -37,7 +37,7 @@ class HeaderContainer extends Container {
|
|
37
37
|
|
38
38
|
vdom: {
|
39
39
|
tag: 'img',
|
40
|
-
src: 'https://raw.githubusercontent.com/neomjs/pages/
|
40
|
+
src: 'https://raw.githubusercontent.com/neomjs/pages/main/resources/images/apps/covid/covid_logo_dark.jpg'
|
41
41
|
}
|
42
42
|
}, {
|
43
43
|
ntype : 'container',
|
@@ -368,7 +368,7 @@ class MainContainerController extends ComponentController {
|
|
368
368
|
button = data.component,
|
369
369
|
component = me.component,
|
370
370
|
logo = me.getReference('logo'),
|
371
|
-
logoPath = 'https://raw.githubusercontent.com/neomjs/pages/
|
371
|
+
logoPath = 'https://raw.githubusercontent.com/neomjs/pages/main/resources/images/apps/covid/',
|
372
372
|
mapView = me.getReference('mapboxglmap'),
|
373
373
|
themeLight = button.text === 'Theme Light',
|
374
374
|
buttonText, cls, href, iconCls, mapViewStyle, theme;
|
@@ -28,7 +28,7 @@ class HeaderContainer extends Container {
|
|
28
28
|
cls: ['center'],
|
29
29
|
vdom: {
|
30
30
|
tag: 'img',
|
31
|
-
src: 'https://raw.githubusercontent.com/neomjs/pages/
|
31
|
+
src: 'https://raw.githubusercontent.com/neomjs/pages/main/resources/images/logo_rounded.svg'
|
32
32
|
}
|
33
33
|
},
|
34
34
|
{
|
@@ -142,7 +142,7 @@ class Util extends Base {
|
|
142
142
|
return path;
|
143
143
|
}
|
144
144
|
|
145
|
-
return `https://raw.githubusercontent.com/neomjs/pages/
|
145
|
+
return `https://raw.githubusercontent.com/neomjs/pages/main/resources/images/flaticon/country_flags/png/${imageName}.png`;
|
146
146
|
}
|
147
147
|
|
148
148
|
/**
|
@@ -37,7 +37,7 @@ class HeaderContainer extends Container {
|
|
37
37
|
|
38
38
|
vdom: {
|
39
39
|
tag: 'img',
|
40
|
-
src: 'https://raw.githubusercontent.com/neomjs/pages/
|
40
|
+
src: 'https://raw.githubusercontent.com/neomjs/pages/main/resources/images/apps/covid/covid_logo_dark.jpg'
|
41
41
|
}
|
42
42
|
}, {
|
43
43
|
ntype : 'container',
|
@@ -553,7 +553,7 @@ class MainContainerController extends ComponentController {
|
|
553
553
|
button = data.component,
|
554
554
|
component = me.component,
|
555
555
|
logo = me.getReference('logo'),
|
556
|
-
logoPath = 'https://raw.githubusercontent.com/neomjs/pages/
|
556
|
+
logoPath = 'https://raw.githubusercontent.com/neomjs/pages/main/resources/images/apps/covid/',
|
557
557
|
themeLight = button.text === 'Theme Light',
|
558
558
|
buttonText, cls, href, iconCls, mapView, mapViewStyle, theme;
|
559
559
|
|
@@ -68,7 +68,7 @@ class List extends BaseList {
|
|
68
68
|
basePath = '../../' + basePath;
|
69
69
|
}
|
70
70
|
} else {
|
71
|
-
basePath = 'https://raw.githubusercontent.com/neomjs/pages/
|
71
|
+
basePath = 'https://raw.githubusercontent.com/neomjs/pages/main/resources/website';
|
72
72
|
}
|
73
73
|
|
74
74
|
const vdomCn = [
|
@@ -80,7 +80,7 @@ class List extends BaseList {
|
|
80
80
|
basePath = '../../' + basePath;
|
81
81
|
}
|
82
82
|
} else {
|
83
|
-
basePath = 'https://raw.githubusercontent.com/neomjs/pages/
|
83
|
+
basePath = 'https://raw.githubusercontent.com/neomjs/pages/main/resources/website/examples';
|
84
84
|
}
|
85
85
|
|
86
86
|
return [
|
@@ -159,7 +159,7 @@ class CountryGallery extends Gallery {
|
|
159
159
|
|
160
160
|
imageName = map[imageName] || imageName;
|
161
161
|
|
162
|
-
return `https://raw.githubusercontent.com/neomjs/pages/
|
162
|
+
return `https://raw.githubusercontent.com/neomjs/pages/main/resources/images/flaticon/country_flags/png/${imageName}.png`;
|
163
163
|
}
|
164
164
|
|
165
165
|
/**
|
@@ -191,7 +191,7 @@ class CountryHelix extends Helix {
|
|
191
191
|
|
192
192
|
imageName = map[imageName] || imageName;
|
193
193
|
|
194
|
-
return 'https://raw.githubusercontent.com/neomjs/pages/
|
194
|
+
return 'https://raw.githubusercontent.com/neomjs/pages/main/resources/images/flaticon/country_flags/png/' + imageName + '.png'
|
195
195
|
}
|
196
196
|
/**
|
197
197
|
* @returns {String}
|
@@ -772,7 +772,7 @@ New languages in this release:
|
|
772
772
|
[Erik Paluka]: https://github.com/paluka
|
773
773
|
[Luke Holder]: https://github.com/lukeholder
|
774
774
|
[David Mohundro]: https://github.com/drmohundro
|
775
|
-
[ps]: https://github.com/OctopusDeploy/Library/blob/
|
775
|
+
[ps]: https://github.com/OctopusDeploy/Library/blob/main/app/shared/presentation/highlighting/powershell.js
|
776
776
|
[Christophe de Dinechin]: https://github.com/c3d
|
777
777
|
[Taneli Vatanen]: https://github.com/Daiz-
|
778
778
|
[Jen Evers-Corvina]: https://github.com/sevvie
|
@@ -792,7 +792,7 @@ We're going to redesign the old [demo/test suite][demo] into an interactive
|
|
792
792
|
demo web app. If you're confident front-end developer or designer and want to
|
793
793
|
help us with it, drop a comment into [the issue][#542] on GitHub.
|
794
794
|
|
795
|
-
[test]: https://github.com/isagalaev/highlight.js/tree/
|
795
|
+
[test]: https://github.com/isagalaev/highlight.js/tree/main/test
|
796
796
|
[demo]: https://highlightjs.org/static/test.html
|
797
797
|
[#542]: https://github.com/isagalaev/highlight.js/issues/542
|
798
798
|
[ci]: https://travis-ci.org/isagalaev/highlight.js
|
@@ -182,5 +182,5 @@ Authors and contributors are listed in the [AUTHORS.en.txt][8] file.
|
|
182
182
|
[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
|
183
183
|
[5]: https://highlightjs.org/download/
|
184
184
|
[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
|
185
|
-
[7]: https://github.com/highlightjs/highlight.js/blob/
|
186
|
-
[8]: https://github.com/highlightjs/highlight.js/blob/
|
185
|
+
[7]: https://github.com/highlightjs/highlight.js/blob/main/LICENSE
|
186
|
+
[8]: https://github.com/highlightjs/highlight.js/blob/main/AUTHORS.en.txt
|
@@ -142,7 +142,7 @@ class Util extends Base {
|
|
142
142
|
return path;
|
143
143
|
}
|
144
144
|
|
145
|
-
return `https://raw.githubusercontent.com/neomjs/pages/
|
145
|
+
return `https://raw.githubusercontent.com/neomjs/pages/main/resources/images/flaticon/country_flags/png/${imageName}.png`;
|
146
146
|
}
|
147
147
|
|
148
148
|
/**
|
@@ -44,7 +44,7 @@ class MainContainer extends Viewport {
|
|
44
44
|
|
45
45
|
vdom: {
|
46
46
|
tag: 'img',
|
47
|
-
src: 'https://raw.githubusercontent.com/neomjs/pages/
|
47
|
+
src: 'https://raw.githubusercontent.com/neomjs/pages/main/resources/examples/ai_images/000150.jpg'
|
48
48
|
}
|
49
49
|
}, {
|
50
50
|
tabButtonConfig: {
|
@@ -54,7 +54,7 @@ class MainContainer extends Viewport {
|
|
54
54
|
|
55
55
|
vdom: {
|
56
56
|
tag: 'img',
|
57
|
-
src: 'https://raw.githubusercontent.com/neomjs/pages/
|
57
|
+
src: 'https://raw.githubusercontent.com/neomjs/pages/main/resources/examples/ai_images/000074.jpg'
|
58
58
|
}
|
59
59
|
}],
|
60
60
|
/**
|
@@ -28,7 +28,7 @@ class MainContainerController extends Component {
|
|
28
28
|
|
29
29
|
setTimeout(() => {
|
30
30
|
Neo.ServiceWorker.preloadAssets({
|
31
|
-
files: ['https://raw.githubusercontent.com/neomjs/pages/
|
31
|
+
files: ['https://raw.githubusercontent.com/neomjs/pages/main/resources/examples/ai_images/000074.jpg']
|
32
32
|
}).then(data => {
|
33
33
|
console.log(data);
|
34
34
|
});
|
@@ -142,7 +142,7 @@ class Util extends Base {
|
|
142
142
|
return path;
|
143
143
|
}
|
144
144
|
|
145
|
-
return `https://raw.githubusercontent.com/neomjs/pages/
|
145
|
+
return `https://raw.githubusercontent.com/neomjs/pages/main/resources/images/flaticon/country_flags/png/${imageName}.png`;
|
146
146
|
}
|
147
147
|
|
148
148
|
/**
|
package/package.json
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
.neo-floating {
|
2
|
-
top : -10000px;
|
3
|
-
left : -10000px;
|
4
|
-
position : fixed;
|
5
|
-
z-index : 1000;
|
6
|
-
background-color : var(--neo-background-color);
|
7
|
-
}
|
8
|
-
|
9
|
-
// Shadow at the top
|
10
|
-
.neo-aligned-top {
|
11
|
-
box-shadow : 0px -2px 10px rgba(0, 0, 0, 0.3);
|
12
|
-
}
|
13
|
-
|
14
1
|
// Shadow at the bottom
|
15
2
|
.neo-aligned-bottom {
|
16
|
-
box-shadow
|
3
|
+
box-shadow: var(--aligned-bottom-box-shadow);
|
17
4
|
}
|
18
5
|
|
19
6
|
// Shadow at the left
|
20
7
|
.neo-aligned-left {
|
21
|
-
box-shadow
|
8
|
+
box-shadow: var(--aligned-left-box-shadow);
|
22
9
|
}
|
23
10
|
|
24
11
|
// Shadow at the right
|
25
12
|
.neo-aligned-right {
|
26
|
-
box-shadow
|
13
|
+
box-shadow: var(--aligned-right-box-shadow);
|
14
|
+
}
|
15
|
+
|
16
|
+
// Shadow at the top
|
17
|
+
.neo-aligned-top {
|
18
|
+
box-shadow: var(--aligned-top-box-shadow);
|
19
|
+
}
|
20
|
+
|
21
|
+
.neo-floating {
|
22
|
+
background-color: var(--neo-background-color);
|
23
|
+
left : -10000px;
|
24
|
+
position : fixed;
|
25
|
+
top : -10000px;
|
26
|
+
z-index : 1000;
|
27
27
|
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
:root .neo-theme-dark {
|
2
|
+
--aligned-bottom-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.3);
|
3
|
+
--aligned-left-box-shadow : -2px 0px 10px rgba(0, 0, 0, 0.3);
|
4
|
+
--aligned-right-box-shadow : 2px 0px 10px rgba(0, 0, 0, 0.3);
|
5
|
+
--aligned-top-box-shadow : 0px -2px 10px rgba(0, 0, 0, 0.3);
|
6
|
+
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
:root .neo-theme-dark { // .neo-menu-list
|
2
2
|
--menu-list-background-color : #3c3f41;
|
3
3
|
--menu-list-border-color : #2b2b2b;
|
4
|
-
--menu-list-box-shadow : 0 5px 10px rgba(0,0,0,.4);
|
5
4
|
--menu-list-item-background-color : inherit;
|
6
5
|
--menu-list-item-background-color-disabled: inherit;
|
7
6
|
--menu-list-item-background-color-hover : inherit;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
:root .neo-theme-light {
|
2
|
+
--aligned-bottom-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.3);
|
3
|
+
--aligned-left-box-shadow : -2px 0px 10px rgba(0, 0, 0, 0.3);
|
4
|
+
--aligned-right-box-shadow : 2px 0px 10px rgba(0, 0, 0, 0.3);
|
5
|
+
--aligned-top-box-shadow : 0px -2px 10px rgba(0, 0, 0, 0.3);
|
6
|
+
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
:root .neo-theme-light { // .neo-menu-list
|
2
2
|
--menu-list-background-color : #fff;
|
3
3
|
--menu-list-border-color : #1c60a0;
|
4
|
-
--menu-list-box-shadow : 0 5px 10px rgba(0,0,0,.4);
|
5
4
|
--menu-list-item-background-color : inherit;
|
6
5
|
--menu-list-item-background-color-disabled: inherit;
|
7
6
|
--menu-list-item-background-color-hover : inherit;
|
package/src/DefaultConfig.mjs
CHANGED
@@ -236,12 +236,12 @@ const DefaultConfig = {
|
|
236
236
|
useVdomWorker: true,
|
237
237
|
/**
|
238
238
|
* buildScripts/injectPackageVersion.mjs will update this value
|
239
|
-
* @default '6.9.
|
239
|
+
* @default '6.9.6'
|
240
240
|
* @memberOf! module:Neo
|
241
241
|
* @name config.version
|
242
242
|
* @type String
|
243
243
|
*/
|
244
|
-
version: '6.9.
|
244
|
+
version: '6.9.6'
|
245
245
|
};
|
246
246
|
|
247
247
|
Object.assign(DefaultConfig, {
|
package/src/Neo.mjs
CHANGED
@@ -380,20 +380,25 @@ Neo = globalThis.Neo = Object.assign({
|
|
380
380
|
* @memberOf module:Neo
|
381
381
|
* @param {Object} target
|
382
382
|
* @param {Object} source
|
383
|
+
* @param {Object} defaults
|
383
384
|
* @returns {Object} target
|
384
385
|
*/
|
385
|
-
merge(target, source) {
|
386
|
+
merge(target, source, defaults) {
|
387
|
+
if (defaults) {
|
388
|
+
return Neo.merge(Neo.merge(target, defaults), source)
|
389
|
+
}
|
390
|
+
|
386
391
|
for (const key in source) {
|
387
392
|
const value = source[key];
|
388
393
|
|
389
394
|
if (Neo.typeOf(value) === 'Object') {
|
390
|
-
target[key] = Neo.merge(target[key] || {}, value)
|
395
|
+
target[key] = Neo.merge(target[key] || {}, value)
|
391
396
|
} else {
|
392
|
-
target[key] = value
|
397
|
+
target[key] = value
|
393
398
|
}
|
394
399
|
}
|
395
400
|
|
396
|
-
return target
|
401
|
+
return target
|
397
402
|
},
|
398
403
|
|
399
404
|
/**
|
package/src/component/Base.mjs
CHANGED
@@ -996,8 +996,9 @@ class Base extends CoreBase {
|
|
996
996
|
edgeAlign: value
|
997
997
|
}
|
998
998
|
}
|
999
|
+
|
999
1000
|
// merge the incoming alignment specification into the configured default
|
1000
|
-
return Neo.merge(
|
1001
|
+
return Neo.merge({}, value, me.constructor.config.align)
|
1001
1002
|
}
|
1002
1003
|
|
1003
1004
|
/**
|
package/src/core/Base.mjs
CHANGED
@@ -71,6 +71,12 @@ class Base {
|
|
71
71
|
* @protected
|
72
72
|
*/
|
73
73
|
ntype: 'base',
|
74
|
+
/**
|
75
|
+
* While it is recommended to change the static delayable configs on class level,
|
76
|
+
* you can change it on instance level too. If not null, we will do a deep merge.
|
77
|
+
* @member {Object} delayable=null
|
78
|
+
*/
|
79
|
+
delayable: null,
|
74
80
|
/**
|
75
81
|
* The unique component id
|
76
82
|
* @member {String|null} id_=null
|
@@ -178,9 +184,11 @@ class Base {
|
|
178
184
|
* Adjusts all methods inside static delayable
|
179
185
|
*/
|
180
186
|
applyDelayable() {
|
181
|
-
let me
|
187
|
+
let me = this,
|
188
|
+
ctorDelayable = me.constructor.delayable,
|
189
|
+
delayable = me.delayable ? Neo.merge({}, me.delayable, ctorDelayable) : ctorDelayable;
|
182
190
|
|
183
|
-
Object.entries(
|
191
|
+
Object.entries(delayable).forEach(([key, value]) => {
|
184
192
|
let map = {
|
185
193
|
debounce() {me[key] = new debounce(me[key], me, value.timer)},
|
186
194
|
throttle() {me[key] = new throttle(me[key], me, value.timer)}
|