neo.mjs 7.10.0 → 7.12.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/resources/data/examples_devmode.json +24 -17
- package/apps/portal/resources/data/examples_dist_dev.json +24 -17
- package/apps/portal/resources/data/examples_dist_prod.json +24 -17
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/portal/view/home/parts/AfterMath.mjs +7 -10
- package/apps/portal/view/learn/ContentComponent.mjs +1 -1
- package/apps/portal/view/services/Component.mjs +4 -4
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/component/multiWindowCoronaGallery/ViewportController.mjs +9 -2
- package/examples/component/multiWindowHelix/ViewportController.mjs +9 -2
- package/examples/dialog/DemoDialog.mjs +7 -0
- package/examples/dialog/MainContainer.mjs +40 -31
- package/examples/tablePerformance/MainContainer.mjs +48 -28
- package/examples/tablePerformance/MainContainer2.mjs +48 -27
- package/examples/tablePerformance/MainContainer3.mjs +48 -27
- package/examples/tablePerformance/Viewport.mjs +21 -0
- package/package.json +1 -1
- package/resources/scss/src/apps/portal/about/MemberContainer.scss +7 -5
- package/resources/scss/src/apps/portal/home/ContentBox.scss +74 -41
- package/resources/scss/src/apps/portal/home/parts/AfterMath.scss +16 -2
- package/resources/scss/src/apps/portal/home/parts/Features.scss +25 -3
- package/resources/scss/src/apps/portal/learn/ContentComponent.scss +19 -20
- package/resources/scss/src/apps/portal/services/Component.scss +23 -8
- package/src/DefaultConfig.mjs +2 -2
- package/src/filter/DateContainer.mjs +3 -3
- package/src/list/Circle.mjs +1 -0
- package/src/manager/_export.mjs +1 -2
- package/src/tab/Container.mjs +25 -36
- package/src/table/Container.mjs +9 -53
- package/src/table/View.mjs +2 -2
- package/src/table/header/Button.mjs +1 -0
- package/src/worker/Data.mjs +6 -7
- package/src/manager/Store.mjs +0 -84
@@ -29,11 +29,6 @@
|
|
29
29
|
margin: 1em 0 1em 0;
|
30
30
|
}
|
31
31
|
|
32
|
-
details summary {
|
33
|
-
cursor : pointer;
|
34
|
-
transition: margin 300ms ease-out;
|
35
|
-
}
|
36
|
-
|
37
32
|
details[open] {
|
38
33
|
margin-bottom: 2em;
|
39
34
|
}
|
@@ -41,9 +36,11 @@
|
|
41
36
|
details summary {
|
42
37
|
align-items: center;
|
43
38
|
color : #555;
|
39
|
+
cursor : pointer;
|
44
40
|
display : flex;
|
45
41
|
font-weight: bold;
|
46
42
|
list-style : none;
|
43
|
+
transition : margin 300ms ease-out;
|
47
44
|
}
|
48
45
|
|
49
46
|
details summary::before {
|
@@ -62,23 +59,12 @@
|
|
62
59
|
margin : 0.4em 0.4em 0.4em 0;
|
63
60
|
}
|
64
61
|
|
65
|
-
|
66
|
-
|
62
|
+
h1.neo-h1 {
|
63
|
+
color: #3E63DD;
|
67
64
|
}
|
68
65
|
|
69
|
-
|
70
|
-
|
71
|
-
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
|
72
|
-
transition: 0.3s;
|
73
|
-
/* Add some padding inside the card container */
|
74
|
-
padding : 2px 16px;
|
75
|
-
font-size : 1em;
|
76
|
-
margin-bottom: 1em;
|
77
|
-
|
78
|
-
&:hover {
|
79
|
-
/* On mouse-over, add a deeper shadow */
|
80
|
-
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
|
81
|
-
}
|
66
|
+
summary::-webkit-details-marker {
|
67
|
+
display: none;
|
82
68
|
}
|
83
69
|
|
84
70
|
p {
|
@@ -91,6 +77,19 @@
|
|
91
77
|
overflow-x : scroll;
|
92
78
|
padding : 12px;
|
93
79
|
}
|
80
|
+
|
81
|
+
.lab {
|
82
|
+
box-shadow : 0 4px 8px 0 rgba(0, 0, 0, 0.2);
|
83
|
+
font-size : 1em;
|
84
|
+
margin-bottom: 1em;
|
85
|
+
padding : 2px 16px;
|
86
|
+
transition : 0.3s;
|
87
|
+
|
88
|
+
&:hover {
|
89
|
+
/* On mouse-over, add a deeper shadow */
|
90
|
+
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
|
91
|
+
}
|
92
|
+
}
|
94
93
|
}
|
95
94
|
|
96
95
|
.portal-size-large {
|
@@ -3,22 +3,37 @@
|
|
3
3
|
overflow-y : auto;
|
4
4
|
padding : 0.1em 6em 1em 6em;
|
5
5
|
|
6
|
+
a {
|
7
|
+
color: #3E63DD;
|
8
|
+
}
|
9
|
+
|
10
|
+
li {
|
11
|
+
&::marker {
|
12
|
+
color: #3E63DD;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
6
16
|
.info-block {
|
7
|
-
border
|
8
|
-
|
9
|
-
|
10
|
-
margin-
|
11
|
-
margin-
|
12
|
-
|
13
|
-
|
17
|
+
border : 1px solid var(--sem-color-border-default);
|
18
|
+
border-radius: .7em;
|
19
|
+
box-shadow : 0 3px 6px rgba(0, 0, 0, 0.3);
|
20
|
+
margin-left : auto;
|
21
|
+
margin-right : auto;
|
22
|
+
margin-top : 2em;
|
23
|
+
max-width : 800px;
|
24
|
+
padding : 0.5em 3em 1em 3em;
|
14
25
|
}
|
15
26
|
|
16
|
-
h1 {
|
27
|
+
h1.neo-h1 {
|
17
28
|
margin-left : auto;
|
18
29
|
margin-right: auto;
|
19
30
|
width : fit-content;
|
20
31
|
}
|
21
32
|
|
33
|
+
h2.neo-h2 {
|
34
|
+
color: #3e63dd;
|
35
|
+
}
|
36
|
+
|
22
37
|
@media (max-width: 600px) {
|
23
38
|
padding: 0.1em 1em 1em 1em;
|
24
39
|
|
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.12.0'
|
266
266
|
* @memberOf! module:Neo
|
267
267
|
* @name config.version
|
268
268
|
* @type String
|
269
269
|
*/
|
270
|
-
version: '7.
|
270
|
+
version: '7.12.0'
|
271
271
|
};
|
272
272
|
|
273
273
|
Object.assign(DefaultConfig, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import DateField from '../form/field/Date.mjs';
|
2
2
|
import NumberContainer from './NumberContainer.mjs';
|
3
3
|
|
4
4
|
/**
|
@@ -18,9 +18,9 @@ class DateContainer extends NumberContainer {
|
|
18
18
|
*/
|
19
19
|
ntype: 'filter-datecontainer',
|
20
20
|
/**
|
21
|
-
* @member {Neo.form.field.Base} fieldModule=
|
21
|
+
* @member {Neo.form.field.Base} fieldModule=DateField
|
22
22
|
*/
|
23
|
-
fieldModule:
|
23
|
+
fieldModule: DateField
|
24
24
|
}
|
25
25
|
}
|
26
26
|
|
package/src/list/Circle.mjs
CHANGED
package/src/manager/_export.mjs
CHANGED
@@ -3,6 +3,5 @@ import Component from './Component.mjs';
|
|
3
3
|
import DomEvent from './DomEvent.mjs';
|
4
4
|
import Focus from './Focus.mjs';
|
5
5
|
import Instance from './Instance.mjs';
|
6
|
-
import Store from './Store.mjs';
|
7
6
|
|
8
|
-
export {Base, Component, DomEvent, Instance, Focus
|
7
|
+
export {Base, Component, DomEvent, Instance, Focus};
|
package/src/tab/Container.mjs
CHANGED
@@ -322,43 +322,32 @@ class Container extends BaseContainer {
|
|
322
322
|
* @protected
|
323
323
|
*/
|
324
324
|
getLayoutConfig() {
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
direction: 'row-reverse',
|
350
|
-
pack : 'start'
|
351
|
-
};
|
352
|
-
break
|
353
|
-
case 'top':
|
354
|
-
layoutConfig = {
|
355
|
-
ntype: 'vbox',
|
356
|
-
align: 'stretch'
|
357
|
-
};
|
358
|
-
break
|
359
|
-
}
|
325
|
+
const layoutMap = {
|
326
|
+
'bottom': {
|
327
|
+
ntype: 'vbox',
|
328
|
+
align: 'stretch',
|
329
|
+
direction: 'column-reverse',
|
330
|
+
pack: 'start'
|
331
|
+
},
|
332
|
+
'left': {
|
333
|
+
ntype: 'hbox',
|
334
|
+
align: 'stretch',
|
335
|
+
direction: 'row',
|
336
|
+
pack: 'start'
|
337
|
+
},
|
338
|
+
'right': {
|
339
|
+
ntype: 'hbox',
|
340
|
+
align: 'stretch',
|
341
|
+
direction: 'row-reverse',
|
342
|
+
pack: 'start'
|
343
|
+
},
|
344
|
+
'top': {
|
345
|
+
ntype: 'vbox',
|
346
|
+
align: 'stretch'
|
347
|
+
}
|
348
|
+
};
|
360
349
|
|
361
|
-
return
|
350
|
+
return layoutMap[this.tabBarPosition] || null;
|
362
351
|
}
|
363
352
|
|
364
353
|
/**
|
package/src/table/Container.mjs
CHANGED
@@ -23,11 +23,6 @@ class Container extends BaseContainer {
|
|
23
23
|
* @protected
|
24
24
|
*/
|
25
25
|
ntype: 'table-container',
|
26
|
-
/**
|
27
|
-
* todo: testing config, remove when Stores are ready
|
28
|
-
* @member {Number} amountRows=20
|
29
|
-
*/
|
30
|
-
amountRows: 20,
|
31
26
|
/**
|
32
27
|
* @member {String[]} baseCls=['neo-table-container']
|
33
28
|
*/
|
@@ -37,11 +32,6 @@ class Container extends BaseContainer {
|
|
37
32
|
* @member {Object} columnDefaults=null
|
38
33
|
*/
|
39
34
|
columnDefaults: null,
|
40
|
-
/**
|
41
|
-
* todo: testing config, remove when Stores are ready
|
42
|
-
* @member {Boolean} createRandomData=false
|
43
|
-
*/
|
44
|
-
createRandomData: false,
|
45
35
|
/**
|
46
36
|
* @member {Object[]} columns_=[]
|
47
37
|
*/
|
@@ -148,11 +138,10 @@ class Container extends BaseContainer {
|
|
148
138
|
sortable : me.sortable,
|
149
139
|
...me.headerToolbarConfig
|
150
140
|
}, {
|
151
|
-
module
|
152
|
-
containerId
|
153
|
-
id
|
154
|
-
store
|
155
|
-
useRowRecordIds: !me.createRandomData,
|
141
|
+
module : View,
|
142
|
+
containerId: me.id,
|
143
|
+
id : me.viewId,
|
144
|
+
store : me.store,
|
156
145
|
...me.viewConfig
|
157
146
|
}];
|
158
147
|
|
@@ -399,27 +388,17 @@ class Container extends BaseContainer {
|
|
399
388
|
return columns
|
400
389
|
}
|
401
390
|
|
402
|
-
/**
|
403
|
-
* @param {Number} countRows
|
404
|
-
*/
|
405
|
-
createRandomViewData(countRows) {
|
406
|
-
this.loadData(countRows)
|
407
|
-
}
|
408
|
-
|
409
391
|
/**
|
410
392
|
* @param {Array} inputData
|
411
393
|
*/
|
412
394
|
createViewData(inputData) {
|
413
|
-
let me
|
414
|
-
{items} = me;
|
395
|
+
let me = this;
|
415
396
|
|
416
|
-
|
397
|
+
me.view.createViewData(inputData);
|
417
398
|
|
418
399
|
if (me.useCustomScrollbars && me.scrollbarsCssApplied === false) {
|
419
|
-
me.applyCustomScrollbarsCss()
|
400
|
+
me.applyCustomScrollbarsCss()
|
420
401
|
}
|
421
|
-
|
422
|
-
me.items = items
|
423
402
|
}
|
424
403
|
|
425
404
|
/**
|
@@ -452,35 +431,12 @@ class Container extends BaseContainer {
|
|
452
431
|
return `${this.id}__wrapper`
|
453
432
|
}
|
454
433
|
|
455
|
-
/**
|
456
|
-
* @param {Number} countRows
|
457
|
-
*/
|
458
|
-
loadData(countRows) {
|
459
|
-
let me = this,
|
460
|
-
columns = me.items[0].items,
|
461
|
-
countColumns = columns.length;
|
462
|
-
|
463
|
-
Neo.manager.Store.createRandomData([countColumns, countRows]).then(data => {
|
464
|
-
me.createViewData(data)
|
465
|
-
})
|
466
|
-
}
|
467
|
-
|
468
434
|
/**
|
469
435
|
*
|
470
436
|
*/
|
471
437
|
onConstructed() {
|
472
438
|
super.onConstructed();
|
473
|
-
|
474
|
-
let me = this;
|
475
|
-
|
476
|
-
me.selectionModel?.register(me);
|
477
|
-
|
478
|
-
if (me.createRandomData) {
|
479
|
-
// todo: if mounting apply after mount
|
480
|
-
me.timeout(50).then(() => {
|
481
|
-
me.createRandomViewData(me.amountRows)
|
482
|
-
})
|
483
|
-
}
|
439
|
+
this.selectionModel?.register(this)
|
484
440
|
}
|
485
441
|
|
486
442
|
/**
|
@@ -545,7 +501,7 @@ class Container extends BaseContainer {
|
|
545
501
|
* @protected
|
546
502
|
*/
|
547
503
|
removeSortingCss(dataField) {
|
548
|
-
this.
|
504
|
+
this.headerToolbar.items.forEach(column => {
|
549
505
|
if (column.dataField !== dataField) {
|
550
506
|
column.removeSortingCss()
|
551
507
|
}
|
package/src/table/View.mjs
CHANGED
@@ -201,7 +201,7 @@ class View extends Component {
|
|
201
201
|
if (selectedRows?.includes(id)) {
|
202
202
|
trCls.push('neo-selected');
|
203
203
|
|
204
|
-
|
204
|
+
me.parent.fire('select', {
|
205
205
|
record
|
206
206
|
})
|
207
207
|
}
|
@@ -326,7 +326,7 @@ class View extends Component {
|
|
326
326
|
*/
|
327
327
|
getColumn(field, returnIndex=false) {
|
328
328
|
let container = this.parent,
|
329
|
-
columns = container.
|
329
|
+
columns = container.headerToolbar.items,
|
330
330
|
i = 0,
|
331
331
|
len = columns.length,
|
332
332
|
column;
|
package/src/worker/Data.mjs
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import Neo
|
2
|
-
import Base
|
3
|
-
import Compare
|
4
|
-
import Fetch
|
5
|
-
import Util
|
6
|
-
import
|
7
|
-
import Xhr from '../Xhr.mjs';
|
1
|
+
import Neo from '../Neo.mjs';
|
2
|
+
import Base from './Base.mjs';
|
3
|
+
import Compare from '../core/Compare.mjs';
|
4
|
+
import Fetch from '../Fetch.mjs';
|
5
|
+
import Util from '../core/Util.mjs';
|
6
|
+
import Xhr from '../Xhr.mjs';
|
8
7
|
|
9
8
|
/**
|
10
9
|
* The Data worker is responsible to handle all of the communication to the backend (e.g. Ajax-calls).
|
package/src/manager/Store.mjs
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
import Base from './Base.mjs';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* todo: except for createRandomData a legacy class, since stores live directly inside the app worker
|
5
|
-
* @class Neo.manager.Store
|
6
|
-
* @extends Neo.manager.Base
|
7
|
-
* @singleton
|
8
|
-
*/
|
9
|
-
class Store extends Base {
|
10
|
-
static config = {
|
11
|
-
/**
|
12
|
-
* @member {String} className='Neo.manager.Store'
|
13
|
-
* @protected
|
14
|
-
*/
|
15
|
-
className: 'Neo.manager.Store',
|
16
|
-
/**
|
17
|
-
* @member {Boolean} singleton=true
|
18
|
-
* @protected
|
19
|
-
*/
|
20
|
-
singleton: true,
|
21
|
-
/**
|
22
|
-
* @member {Object} listeners={}
|
23
|
-
* @protected
|
24
|
-
*/
|
25
|
-
listeners: {},
|
26
|
-
/**
|
27
|
-
* @member {Object} remote={app: ['createRandomData', 'filter', 'load', 'sort']}
|
28
|
-
* @protected
|
29
|
-
*/
|
30
|
-
remote: {
|
31
|
-
app: ['createRandomData', 'filter', 'load', 'sort']
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Dummy method until we have a data package in place
|
37
|
-
* @param {Number} amountColumns
|
38
|
-
* @param {Number} amountRows
|
39
|
-
*/
|
40
|
-
createRandomData(amountColumns, amountRows) {
|
41
|
-
let data = [],
|
42
|
-
i = 0,
|
43
|
-
j;
|
44
|
-
|
45
|
-
for (; i < amountRows; i++) {
|
46
|
-
data.push({});
|
47
|
-
|
48
|
-
for (j=0; j < amountColumns; j++) {
|
49
|
-
data[i]['column' + j] = 'Column' + (j + 1) + ' - ' + Math.round(Math.random() / 1.5);
|
50
|
-
data[i]['column' + j + 'style'] = Math.round(Math.random() / 1.7) > 0 ? 'brown' : i%2 ? '#3c3f41' : '#323232'
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
54
|
-
return data
|
55
|
-
}
|
56
|
-
|
57
|
-
/**
|
58
|
-
* @param storeId
|
59
|
-
* @param fieldName
|
60
|
-
* @param value
|
61
|
-
*/
|
62
|
-
filter(storeId, fieldName, value) {
|
63
|
-
|
64
|
-
}
|
65
|
-
|
66
|
-
/**
|
67
|
-
* @param storeId
|
68
|
-
* @param params
|
69
|
-
*/
|
70
|
-
load(storeId, params) {
|
71
|
-
|
72
|
-
}
|
73
|
-
|
74
|
-
/**
|
75
|
-
* @param storeId
|
76
|
-
* @param fieldName
|
77
|
-
* @param value
|
78
|
-
*/
|
79
|
-
sort(storeId, fieldName, value) {
|
80
|
-
|
81
|
-
}
|
82
|
-
}
|
83
|
-
|
84
|
-
export default Neo.setupClass(Store);
|