neo.mjs 7.2.0 → 7.4.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/README.md +12 -6
- 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 +141 -173
- package/apps/portal/resources/data/examples_dist_dev.json +135 -164
- package/apps/portal/resources/data/examples_dist_prod.json +135 -164
- package/apps/portal/store/Examples.mjs +1 -8
- package/apps/portal/view/blog/List.mjs +12 -14
- package/apps/portal/view/examples/List.mjs +181 -37
- package/apps/portal/view/examples/TabContainer.mjs +6 -3
- 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/examples/table/container/MainStore.mjs +0 -6
- package/package.json +5 -3
- package/resources/scss/src/apps/portal/examples/List.scss +16 -0
- package/resources/scss/src/apps/portal/examples/TabContainer.scss +2 -2
- package/src/DefaultConfig.mjs +2 -2
- package/src/Main.mjs +8 -0
- package/src/calendar/view/MainContainer.mjs +6 -5
- package/src/component/Base.mjs +4 -3
- package/src/component/DateSelector.mjs +4 -5
- package/src/dialog/Base.mjs +3 -1
- package/src/form/field/Time.mjs +3 -2
- package/src/list/Base.mjs +15 -2
- package/src/main/DomAccess.mjs +7 -5
- package/src/main/DomEvents.mjs +2 -1
- package/src/selection/grid/CellColumnModel.mjs +1 -1
- package/src/selection/grid/CellColumnRowModel.mjs +2 -2
- package/src/selection/grid/CellModel.mjs +16 -23
- package/src/selection/grid/CellRowModel.mjs +1 -1
- package/src/selection/grid/ColumnModel.mjs +14 -8
- package/src/selection/grid/RowModel.mjs +15 -10
- package/src/selection/table/CellColumnModel.mjs +1 -1
- package/src/selection/table/CellColumnRowModel.mjs +1 -1
- package/src/selection/table/CellModel.mjs +16 -25
- package/src/selection/table/CellRowModel.mjs +1 -1
- package/src/selection/table/ColumnModel.mjs +16 -10
- package/src/selection/table/RowModel.mjs +14 -9
- package/src/table/View.mjs +2 -2
- package/src/worker/App.mjs +11 -0
- package/src/worker/ServiceBase.mjs +14 -5
@@ -1,164 +1,135 @@
|
|
1
|
-
[
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
},
|
137
|
-
{
|
138
|
-
"browsers" : ["Chrome", "Edge", "Firefox", "Safari"],
|
139
|
-
"environments": ["Desktop"],
|
140
|
-
"id" : 3,
|
141
|
-
"image" : "devmode/dateField.png",
|
142
|
-
"name" : "form.field.Date",
|
143
|
-
"sourceUrl" : "https://github.com/neo.mjs/neo/tree/dev/examples/form/field/date",
|
144
|
-
"url" : "https://neomjs.com/dist/production/examples/form/field/date/index.html"
|
145
|
-
},
|
146
|
-
{
|
147
|
-
"browsers" : ["Chrome", "Edge", "Firefox", "Safari"],
|
148
|
-
"environments": ["Desktop"],
|
149
|
-
"id" : 2,
|
150
|
-
"image" : "devmode/selectField.png",
|
151
|
-
"name" : "form.field.Select",
|
152
|
-
"sourceUrl" : "https://github.com/neo.mjs/neo/tree/dev/examples/form/field/select",
|
153
|
-
"url" : "https://neomjs.com/dist/production/examples/form/field/select/index.html"
|
154
|
-
},
|
155
|
-
{
|
156
|
-
"browsers" : ["Chrome", "Edge", "Firefox", "Safari"],
|
157
|
-
"environments": ["Desktop"],
|
158
|
-
"id" : 1,
|
159
|
-
"image" : "devmode/tabContainer.png",
|
160
|
-
"name" : "tab.Container",
|
161
|
-
"sourceUrl" : "https://github.com/neo.mjs/neo/tree/dev/examples/tab/container",
|
162
|
-
"url" : "https://neomjs.com/dist/production/examples/tab/container/index.html"
|
163
|
-
}
|
164
|
-
]
|
1
|
+
[{
|
2
|
+
"id" : 21,
|
3
|
+
"image" : "devmode/sharedcovid.png",
|
4
|
+
"name" : "Multi Window Covid App",
|
5
|
+
"sharedWorkers": true,
|
6
|
+
"sourceUrl" : "apps/sharedcovid",
|
7
|
+
"url" : "dist/production/apps/sharedcovid/index.html#mainview=table"
|
8
|
+
}, {
|
9
|
+
"id" : 20,
|
10
|
+
"image" : "devmode/calendar-preview.png",
|
11
|
+
"name" : "Calendar",
|
12
|
+
"sourceUrl": "src/calendar",
|
13
|
+
"url" : "dist/production/examples/calendar/basic/index.html"
|
14
|
+
}, {
|
15
|
+
"id" : 19,
|
16
|
+
"image" : "devmode/helix.png",
|
17
|
+
"name" : "component.Helix",
|
18
|
+
"sourceUrl": "examples/component/helix",
|
19
|
+
"url" : "dist/production/examples/component/helix/index.html"
|
20
|
+
}, {
|
21
|
+
"id" : 18,
|
22
|
+
"image" : "devmode/coronaGallery.png",
|
23
|
+
"name" : "COVID-19 Gallery",
|
24
|
+
"sourceUrl": "examples/component/coronaGallery",
|
25
|
+
"url" : "dist/production/examples/component/coronaGallery/index.html"
|
26
|
+
}, {
|
27
|
+
"id" : 17,
|
28
|
+
"image" : "devmode/offscreenCanvas.png",
|
29
|
+
"name" : "OffscreenCanvas",
|
30
|
+
"sourceUrl": "https://github.com/neomjs/offscreen-canvas/tree/main/apps/myapp",
|
31
|
+
"url" : "https://neomjs.github.io/pages2/workspace/neo-offscreen-canvas-demo/dist/production/apps/myapp/index.html"
|
32
|
+
}, {
|
33
|
+
"id" : 16,
|
34
|
+
"image" : "devmode/sharedOffscreenCanvas.png",
|
35
|
+
"name" : "Multi-Window OffscreenCanvas",
|
36
|
+
"sharedWorkers": true,
|
37
|
+
"sourceUrl" : "https://github.com/neomjs/shared-offscreen",
|
38
|
+
"url" : "https://neomjs.github.io/pages2/workspace/neo-shared-offscreen-canvas-demo/dist/production/apps/mainapp/index.html"
|
39
|
+
}, {
|
40
|
+
"id" : 15,
|
41
|
+
"image" : "devmode/tabContainer.png",
|
42
|
+
"name" : "tab.Container",
|
43
|
+
"sourceUrl": "examples/tab/container",
|
44
|
+
"url" : "dist/production/examples/tab/container/index.html"
|
45
|
+
}, {
|
46
|
+
"id" : 14,
|
47
|
+
"image" : "devmode/model-component-example.png",
|
48
|
+
"name" : "View Models Example",
|
49
|
+
"sourceUrl": "examples/model/advanced",
|
50
|
+
"url" : "dist/production/examples/model/advanced/index.html"
|
51
|
+
}, {
|
52
|
+
"id" : 13,
|
53
|
+
"image" : "devmode/dragdrop.png",
|
54
|
+
"name" : "Dialog drag&drop",
|
55
|
+
"sourceUrl": "examples/dialog",
|
56
|
+
"url" : "dist/production/examples/dialog/"
|
57
|
+
}, {
|
58
|
+
"id" : 12,
|
59
|
+
"image" : "dist_prod/colorsApp.png",
|
60
|
+
"name" : "Colors Dashboard",
|
61
|
+
"sharedWorkers": true,
|
62
|
+
"sourceUrl" : "apps/colors",
|
63
|
+
"url" : "dist/production/apps/colors/index.html"
|
64
|
+
}, {
|
65
|
+
"id" : 11,
|
66
|
+
"image" : "devmode/covidDashboard.png",
|
67
|
+
"name" : "Covid Dashboard",
|
68
|
+
"sourceUrl": "apps/covid",
|
69
|
+
"url" : "dist/production/apps/covid/index.html#mainview=table"
|
70
|
+
}, {
|
71
|
+
"id" : 10,
|
72
|
+
"image" : "devmode/coronaHelix.png",
|
73
|
+
"name" : "COVID-19 Helix",
|
74
|
+
"sourceUrl": "examples/component/coronaHelix",
|
75
|
+
"url" : "dist/production/examples/component/coronaHelix/index.html"
|
76
|
+
}, {
|
77
|
+
"id" : 9,
|
78
|
+
"image" : "devmode/gallery.png",
|
79
|
+
"name" : "component.Gallery",
|
80
|
+
"sourceUrl": "examples/component/gallery",
|
81
|
+
"url" : "dist/production/examples/component/gallery/index.html"
|
82
|
+
}, {
|
83
|
+
"id" : 8,
|
84
|
+
"image" : "devmode/tableFiltering.png",
|
85
|
+
"name" : "Table Filtering",
|
86
|
+
"sourceUrl": "examples/tableFiltering",
|
87
|
+
"url" : "dist/production/examples/tableFiltering/"
|
88
|
+
}, {
|
89
|
+
"id" : 7,
|
90
|
+
"image" : "devmode/dateSelector.png",
|
91
|
+
"name" : "component.DateSelector",
|
92
|
+
"sourceUrl": "examples/component/dateSelector",
|
93
|
+
"url" : "dist/production/examples/component/dateSelector/index.html"
|
94
|
+
}, {
|
95
|
+
"id" : 6,
|
96
|
+
"image" : "devmode/dateField.png",
|
97
|
+
"name" : "form.field.Date",
|
98
|
+
"sourceUrl": "examples/form/field/date",
|
99
|
+
"url" : "dist/production/examples/form/field/date/index.html"
|
100
|
+
}, {
|
101
|
+
"id" : 5,
|
102
|
+
"image" : "devmode/selectField.png",
|
103
|
+
"name" : "form.field.ComboBox",
|
104
|
+
"sourceUrl": "examples/form/field/combobox",
|
105
|
+
"url" : "dist/production/examples/form/field/combobox/index.html"
|
106
|
+
}, {
|
107
|
+
"id" : 4,
|
108
|
+
"image" : "dist_prod/portalApp.png",
|
109
|
+
"name" : "Portal App",
|
110
|
+
"sharedWorkers": true,
|
111
|
+
"sourceUrl" : "apps/portal",
|
112
|
+
"url" : "dist/production/apps/portal/index.html"
|
113
|
+
}, {
|
114
|
+
"hidden" : true,
|
115
|
+
"id" : 3,
|
116
|
+
"image" : "devmode/multi_window_dd.png",
|
117
|
+
"name" : "Multi Window Drag&Drop",
|
118
|
+
"sharedWorkers": true,
|
119
|
+
"sourceUrl" : "apps/shareddialog",
|
120
|
+
"url" : "dist/production/apps/shareddialog/index.html"
|
121
|
+
}, {
|
122
|
+
"hidden" : true,
|
123
|
+
"id" : 2,
|
124
|
+
"image" : "devmode/realworldApp.png",
|
125
|
+
"name" : "RealWorld App",
|
126
|
+
"sourceUrl": "apps/realworld",
|
127
|
+
"url" : "dist/production/apps/realworld/index.html"
|
128
|
+
}, {
|
129
|
+
"hidden" : true,
|
130
|
+
"id" : 1,
|
131
|
+
"image" : "devmode/realworldApp2.png",
|
132
|
+
"name" : "RealWorld App v2</br>(in progress)",
|
133
|
+
"sourceUrl": "apps/realworld2",
|
134
|
+
"url" : "dist/production/apps/realworld2/index.html#/gallery"
|
135
|
+
}]
|
@@ -19,14 +19,7 @@ class Examples extends Store {
|
|
19
19
|
/**
|
20
20
|
* @member {Neo.data.Model} model=Example
|
21
21
|
*/
|
22
|
-
model: Example
|
23
|
-
/**
|
24
|
-
* @member {Object[]} sorters=[{property: 'id', direction: 'ASC'}]
|
25
|
-
*/
|
26
|
-
sorters: [{
|
27
|
-
property : 'id',
|
28
|
-
direction: 'DESC'
|
29
|
-
}]
|
22
|
+
model: Example
|
30
23
|
}
|
31
24
|
}
|
32
25
|
|
@@ -54,9 +54,9 @@ class List extends BaseList {
|
|
54
54
|
}
|
55
55
|
|
56
56
|
/**
|
57
|
-
* @member {String}
|
57
|
+
* @member {String} imageBasePath
|
58
58
|
*/
|
59
|
-
get
|
59
|
+
get imageBasePath() {
|
60
60
|
let basePath;
|
61
61
|
|
62
62
|
if (Neo.config.isGitHubPages) {
|
@@ -114,20 +114,18 @@ class List extends BaseList {
|
|
114
114
|
* @param {Object} record
|
115
115
|
*/
|
116
116
|
createItemContent(record) {
|
117
|
-
let {
|
117
|
+
let {imageBasePath} = this;
|
118
118
|
|
119
119
|
const vdomCn = [
|
120
120
|
{cls: ['content'], data: {recordId: record.id}, cn: [
|
121
121
|
{cls: ['neo-relative'], cn: [
|
122
|
-
{cls: ['neo-full-size', 'preview-image'], flag: `image-${record.id}`
|
123
|
-
//backgroundImage: `url('${basePath}/blog/${record.image}'), linear-gradient(#777, #333)`
|
124
|
-
},
|
122
|
+
{cls: ['neo-full-size', 'preview-image'], flag: `image-${record.id}`},
|
125
123
|
{cls: ['neo-absolute', 'neo-item-bottom-position'], cn: [
|
126
124
|
{tag: 'a', cls: ['neo-title'], href: record.url, target: '_blank', cn: [
|
127
125
|
{flag: 'name', html: record.name.replace(List.nameRegEx, "$1")}
|
128
126
|
]},
|
129
127
|
{cls: ['neo-top-20'], cn: [
|
130
|
-
{tag: 'img', cls: ['neo-user-image'], src: `${
|
128
|
+
{tag: 'img', cls: ['neo-user-image'], src: `${imageBasePath}/blogAuthor/${record.authorImage}`},
|
131
129
|
{cls: ['neo-inner-content'], cn: [
|
132
130
|
{cls: ['neo-inner-details'], flag: 'author', cn: [
|
133
131
|
{tag: 'span', cls: ['neo-bold'], html: record.author}
|
@@ -216,12 +214,12 @@ class List extends BaseList {
|
|
216
214
|
* @param {Object} data
|
217
215
|
*/
|
218
216
|
onIntersect(data) {
|
219
|
-
let me
|
220
|
-
{
|
221
|
-
record
|
222
|
-
i
|
223
|
-
len
|
224
|
-
needsUpdate
|
217
|
+
let me = this,
|
218
|
+
{imageBasePath, store} = me,
|
219
|
+
record = store.get(parseInt(data.data.recordId)),
|
220
|
+
i = store.indexOf(record),
|
221
|
+
len = Math.min(i + me.preloadImages, store.getCount()),
|
222
|
+
needsUpdate = false,
|
225
223
|
node;
|
226
224
|
|
227
225
|
for (; i < len; i++) {
|
@@ -231,7 +229,7 @@ class List extends BaseList {
|
|
231
229
|
needsUpdate = true;
|
232
230
|
|
233
231
|
node.style = {
|
234
|
-
backgroundImage: `url('${
|
232
|
+
backgroundImage: `url('${imageBasePath}/blog/${record.image}'), linear-gradient(#777, #333)`
|
235
233
|
}
|
236
234
|
}
|
237
235
|
}
|