neo.mjs 7.2.0 → 7.3.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/apps/ServiceWorker.mjs +2 -2
- package/apps/portal/index.html +1 -1
- package/apps/portal/model/Example.mjs +14 -4
- package/apps/portal/resources/data/examples_devmode.json +114 -173
- package/apps/portal/resources/data/examples_dist_dev.json +108 -164
- package/apps/portal/resources/data/examples_dist_prod.json +108 -164
- package/apps/portal/store/Examples.mjs +1 -8
- package/apps/portal/view/examples/List.mjs +39 -5
- package/apps/portal/view/examples/TabContainer.mjs +2 -0
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/realworld/api/Article.mjs +7 -1
- package/apps/realworld/api/Favorite.mjs +7 -1
- package/apps/realworld/api/Profile.mjs +7 -1
- package/apps/realworld/api/Tag.mjs +7 -1
- package/apps/realworld/api/User.mjs +7 -1
- package/apps/realworld2/api/Article.mjs +7 -1
- package/apps/realworld2/api/Favorite.mjs +7 -1
- package/apps/realworld2/api/Profile.mjs +7 -1
- package/apps/realworld2/api/Tag.mjs +7 -1
- package/apps/realworld2/api/User.mjs +7 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +2 -2
- package/resources/scss/src/apps/portal/examples/List.scss +1 -0
- package/resources/scss/src/apps/portal/examples/TabContainer.scss +2 -2
- package/src/DefaultConfig.mjs +2 -2
- package/src/calendar/view/MainContainer.mjs +6 -5
@@ -24,6 +24,16 @@ class List extends BaseList {
|
|
24
24
|
* @member {String[]} baseCls=['portal-examples-list','neo-list']
|
25
25
|
*/
|
26
26
|
baseCls: ['portal-examples-list', 'neo-list'],
|
27
|
+
/**
|
28
|
+
* @member {String} baseUrl='https://neomjs.com/'
|
29
|
+
*/
|
30
|
+
baseUrl: 'https://neomjs.com/',
|
31
|
+
/**
|
32
|
+
* The env of the example links.
|
33
|
+
* Valid values are 'development', 'dist/development', 'dist/production'
|
34
|
+
* @member {String} environment='development'
|
35
|
+
*/
|
36
|
+
environment: 'development',
|
27
37
|
/**
|
28
38
|
* @member {Neo.data.Store} store=Examples
|
29
39
|
*/
|
@@ -32,6 +42,10 @@ class List extends BaseList {
|
|
32
42
|
* @member {String|null} storeUrl_=null
|
33
43
|
*/
|
34
44
|
storeUrl_: null,
|
45
|
+
/**
|
46
|
+
* @member {String} sourceBaseUrl='https://github.com/neo.mjs/neo/tree/dev/'
|
47
|
+
*/
|
48
|
+
sourceBaseUrl: 'https://github.com/neo.mjs/neo/tree/dev/',
|
35
49
|
/**
|
36
50
|
* @member {Boolean} useWrapperNode=true
|
37
51
|
*/
|
@@ -84,16 +98,14 @@ class List extends BaseList {
|
|
84
98
|
}
|
85
99
|
|
86
100
|
return [
|
87
|
-
{cls: ['content', 'neo-relative'], cn: [
|
101
|
+
{cls: ['content', 'neo-relative'], removeDom: record.hidden, cn: [
|
88
102
|
{cls: ['neo-full-size', 'preview-image'], style: {
|
89
103
|
backgroundImage: `url('${basePath}/${record.image}'), linear-gradient(#777, #333)`}
|
90
104
|
},
|
91
105
|
{cls: ['neo-absolute', 'neo-item-bottom-position'], cn: [
|
92
|
-
{
|
93
|
-
{html: record.name.replace(List.nameRegEx, "$1")}
|
94
|
-
]},
|
106
|
+
{...this.createLink(record)},
|
95
107
|
{cls: ['neo-top-20'], cn: [
|
96
|
-
{tag: 'a', cls: ['fab fa-github', 'neo-github-image'], href: record.sourceUrl, target: '_blank'},
|
108
|
+
{tag: 'a', cls: ['fab fa-github', 'neo-github-image'], href: this.sourceBaseUrl + record.sourceUrl, target: '_blank'},
|
97
109
|
{cls: ['neo-inner-content'], cn: [
|
98
110
|
{cls: ['neo-inner-details'], html: record.browsers.join(', ')},
|
99
111
|
{cls: ['neo-inner-details'], html: record.environments.join(', ')}
|
@@ -104,6 +116,28 @@ class List extends BaseList {
|
|
104
116
|
]
|
105
117
|
}
|
106
118
|
|
119
|
+
/**
|
120
|
+
*
|
121
|
+
* @param {Object} record
|
122
|
+
* @returns {Object}
|
123
|
+
*/
|
124
|
+
createLink(record) {
|
125
|
+
let vdom = {
|
126
|
+
tag : 'a',
|
127
|
+
cls : ['neo-title'],
|
128
|
+
cn : [{html: record.name.replace(List.nameRegEx, "$1")}],
|
129
|
+
href: this.baseUrl + record.url
|
130
|
+
};
|
131
|
+
|
132
|
+
// Do not open multi-window examples inside a new browser window, in case the environment is the same.
|
133
|
+
// E.g. opening the multi-window covid app & the portal app inside the same app worker is problematic.
|
134
|
+
if (!record.sharedWorkers || this.environment !== Neo.config.environment) {
|
135
|
+
vdom.target = '_blank'
|
136
|
+
}
|
137
|
+
|
138
|
+
return vdom
|
139
|
+
}
|
140
|
+
|
107
141
|
/**
|
108
142
|
* @returns {Object}
|
109
143
|
*/
|
@@ -49,6 +49,7 @@ class TabContainer extends Container {
|
|
49
49
|
text : 'DevMode'
|
50
50
|
}
|
51
51
|
}, {
|
52
|
+
environment : 'dist/development',
|
52
53
|
reference : 'examples-dist-dev-list',
|
53
54
|
storeUrl : '../../apps/portal/resources/data/examples_dist_dev.json',
|
54
55
|
tabButtonConfig: {
|
@@ -57,6 +58,7 @@ class TabContainer extends Container {
|
|
57
58
|
text : 'dist/dev'
|
58
59
|
}
|
59
60
|
}, {
|
61
|
+
environment : 'dist/production',
|
60
62
|
reference : 'examples-dist-prod-list',
|
61
63
|
storeUrl : '../../apps/portal/resources/data/examples_dist_prod.json',
|
62
64
|
tabButtonConfig: {
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld.api.Article
|
5
5
|
* @extends RealWorld.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class Article extends Base {
|
8
9
|
static config = {
|
@@ -14,7 +15,12 @@ class Article extends Base {
|
|
14
15
|
/**
|
15
16
|
* @member {String} resource='/articles'
|
16
17
|
*/
|
17
|
-
resource: '/articles'
|
18
|
+
resource: '/articles',
|
19
|
+
/**
|
20
|
+
* @member {Boolean} singleton=true
|
21
|
+
* @protected
|
22
|
+
*/
|
23
|
+
singleton: true
|
18
24
|
}
|
19
25
|
|
20
26
|
/**
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld.api.Favorite
|
5
5
|
* @extends RealWorld.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class Favorite extends Base {
|
8
9
|
static config = {
|
@@ -10,7 +11,12 @@ class Favorite extends Base {
|
|
10
11
|
* @member {String} className='RealWorld.api.Favorite'
|
11
12
|
* @protected
|
12
13
|
*/
|
13
|
-
className: 'RealWorld.api.Favorite'
|
14
|
+
className: 'RealWorld.api.Favorite',
|
15
|
+
/**
|
16
|
+
* @member {Boolean} singleton=true
|
17
|
+
* @protected
|
18
|
+
*/
|
19
|
+
singleton: true
|
14
20
|
}
|
15
21
|
|
16
22
|
/**
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld.api.Profile
|
5
5
|
* @extends RealWorld.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class Profile extends Base {
|
8
9
|
static config = {
|
@@ -14,7 +15,12 @@ class Profile extends Base {
|
|
14
15
|
/**
|
15
16
|
* @member {String} resource='/profiles'
|
16
17
|
*/
|
17
|
-
resource: '/profiles'
|
18
|
+
resource: '/profiles',
|
19
|
+
/**
|
20
|
+
* @member {Boolean} singleton=true
|
21
|
+
* @protected
|
22
|
+
*/
|
23
|
+
singleton: true
|
18
24
|
}
|
19
25
|
|
20
26
|
/**
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld.api.Tag
|
5
5
|
* @extends RealWorld.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class Tag extends Base {
|
8
9
|
static config = {
|
@@ -14,7 +15,12 @@ class Tag extends Base {
|
|
14
15
|
/**
|
15
16
|
* @member {String} resource='/tags'
|
16
17
|
*/
|
17
|
-
resource: '/tags'
|
18
|
+
resource: '/tags',
|
19
|
+
/**
|
20
|
+
* @member {Boolean} singleton=true
|
21
|
+
* @protected
|
22
|
+
*/
|
23
|
+
singleton: true
|
18
24
|
}
|
19
25
|
}
|
20
26
|
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld.api.User
|
5
5
|
* @extends RealWorld.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class User extends Base {
|
8
9
|
static config = {
|
@@ -14,7 +15,12 @@ class User extends Base {
|
|
14
15
|
/**
|
15
16
|
* @member {String} resource='/tags'
|
16
17
|
*/
|
17
|
-
resource: '/users'
|
18
|
+
resource: '/users',
|
19
|
+
/**
|
20
|
+
* @member {Boolean} singleton=true
|
21
|
+
* @protected
|
22
|
+
*/
|
23
|
+
singleton: true
|
18
24
|
}
|
19
25
|
}
|
20
26
|
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld2.api.Article
|
5
5
|
* @extends RealWorld2.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class Article extends Base {
|
8
9
|
static config = {
|
@@ -14,7 +15,12 @@ class Article extends Base {
|
|
14
15
|
/**
|
15
16
|
* @member {String} resource='/articles'
|
16
17
|
*/
|
17
|
-
resource: '/articles'
|
18
|
+
resource: '/articles',
|
19
|
+
/**
|
20
|
+
* @member {Boolean} singleton=true
|
21
|
+
* @protected
|
22
|
+
*/
|
23
|
+
singleton: true
|
18
24
|
}
|
19
25
|
|
20
26
|
/**
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld2.api.Favorite
|
5
5
|
* @extends RealWorld2.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class Favorite extends Base {
|
8
9
|
static config = {
|
@@ -10,7 +11,12 @@ class Favorite extends Base {
|
|
10
11
|
* @member {String} className='RealWorld2.api.Favorite'
|
11
12
|
* @protected
|
12
13
|
*/
|
13
|
-
className: 'RealWorld2.api.Favorite'
|
14
|
+
className: 'RealWorld2.api.Favorite',
|
15
|
+
/**
|
16
|
+
* @member {Boolean} singleton=true
|
17
|
+
* @protected
|
18
|
+
*/
|
19
|
+
singleton: true
|
14
20
|
}
|
15
21
|
|
16
22
|
/**
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld2.api.Profile
|
5
5
|
* @extends RealWorld2.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class Profile extends Base {
|
8
9
|
static config = {
|
@@ -14,7 +15,12 @@ class Profile extends Base {
|
|
14
15
|
/**
|
15
16
|
* @member {String} resource='/profiles'
|
16
17
|
*/
|
17
|
-
resource: '/profiles'
|
18
|
+
resource: '/profiles',
|
19
|
+
/**
|
20
|
+
* @member {Boolean} singleton=true
|
21
|
+
* @protected
|
22
|
+
*/
|
23
|
+
singleton: true
|
18
24
|
}
|
19
25
|
|
20
26
|
/**
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld2.api.Tag
|
5
5
|
* @extends RealWorld2.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class Tag extends Base {
|
8
9
|
static config = {
|
@@ -14,7 +15,12 @@ class Tag extends Base {
|
|
14
15
|
/**
|
15
16
|
* @member {String} resource='/tags'
|
16
17
|
*/
|
17
|
-
resource: '/tags'
|
18
|
+
resource: '/tags',
|
19
|
+
/**
|
20
|
+
* @member {Boolean} singleton=true
|
21
|
+
* @protected
|
22
|
+
*/
|
23
|
+
singleton: true
|
18
24
|
}
|
19
25
|
}
|
20
26
|
|
@@ -3,6 +3,7 @@ import Base from './Base.mjs';
|
|
3
3
|
/**
|
4
4
|
* @class RealWorld2.api.User
|
5
5
|
* @extends RealWorld2.api.Base
|
6
|
+
* @singleton
|
6
7
|
*/
|
7
8
|
class User extends Base {
|
8
9
|
static config = {
|
@@ -14,7 +15,12 @@ class User extends Base {
|
|
14
15
|
/**
|
15
16
|
* @member {String} resource='/tags'
|
16
17
|
*/
|
17
|
-
resource: '/users'
|
18
|
+
resource: '/users',
|
19
|
+
/**
|
20
|
+
* @member {Boolean} singleton=true
|
21
|
+
* @protected
|
22
|
+
*/
|
23
|
+
singleton: true
|
18
24
|
}
|
19
25
|
}
|
20
26
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.3.0",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"clean-webpack-plugin": "^4.0.0",
|
50
50
|
"commander": "^12.1.0",
|
51
51
|
"cssnano": "^7.0.6",
|
52
|
-
"envinfo": "^7.
|
52
|
+
"envinfo": "^7.14.0",
|
53
53
|
"fs-extra": "^11.2.0",
|
54
54
|
"highlightjs-line-numbers.js": "^2.8.0",
|
55
55
|
"inquirer": "^10.2.2",
|
@@ -1,8 +1,8 @@
|
|
1
1
|
.portal-examples-tab-container.neo-tab-container {
|
2
|
-
|
3
|
-
max-width: 830px;
|
2
|
+
|
4
3
|
}
|
5
4
|
|
5
|
+
// must not be inside the root class to honor the styling for tab button drag&drop
|
6
6
|
.portal-examples-tab-header-toolbar.neo-tab-header-toolbar {
|
7
7
|
background-color: #8BA6FF;
|
8
8
|
|
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.
|
265
|
+
* @default '7.3.0'
|
266
266
|
* @memberOf! module:Neo
|
267
267
|
* @name config.version
|
268
268
|
* @type String
|
269
269
|
*/
|
270
|
-
version: '7.
|
270
|
+
version: '7.3.0'
|
271
271
|
};
|
272
272
|
|
273
273
|
Object.assign(DefaultConfig, {
|
@@ -346,11 +346,12 @@ class MainContainer extends Container {
|
|
346
346
|
let me = this;
|
347
347
|
|
348
348
|
me._editEventContainer = value = Neo.create({
|
349
|
-
module
|
350
|
-
appName: me.appName,
|
351
|
-
model
|
352
|
-
owner
|
353
|
-
width
|
349
|
+
module : EditEventContainer,
|
350
|
+
appName : me.appName,
|
351
|
+
model : {parent: me.getModel()},
|
352
|
+
owner : me,
|
353
|
+
width : 250,
|
354
|
+
windowId: me.windowId,
|
354
355
|
...me.editEventContainerConfig
|
355
356
|
})
|
356
357
|
}
|