neo.mjs 4.0.58 → 4.0.61
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.61",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -57,7 +57,7 @@
|
|
57
57
|
"sass": "^1.53.0",
|
58
58
|
"webpack": "^5.73.0",
|
59
59
|
"webpack-cli": "^4.10.0",
|
60
|
-
"webpack-dev-server": "4.9.
|
60
|
+
"webpack-dev-server": "4.9.3",
|
61
61
|
"webpack-hook-plugin": "^1.0.7",
|
62
62
|
"webpack-node-externals": "^3.0.0"
|
63
63
|
},
|
@@ -1,9 +1,12 @@
|
|
1
1
|
@import "global/all";
|
2
2
|
|
3
3
|
html, .neo-body-viewport {
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
align-items : center;
|
5
|
+
display : flex;
|
6
|
+
height : 100%;
|
7
|
+
justify-content: center;
|
8
|
+
overflow : hidden; // chrome can overscroll the full page (bug)
|
9
|
+
width : 100%;
|
7
10
|
}
|
8
11
|
|
9
12
|
.neo-body {
|
@@ -18,12 +18,9 @@
|
|
18
18
|
}
|
19
19
|
|
20
20
|
.neo-dialog-wrapper {
|
21
|
-
display
|
22
|
-
|
23
|
-
|
24
|
-
top : 50%;
|
25
|
-
transform: translate(-50%, -50%);
|
26
|
-
z-index : 20; // ensure to be on top of table headers
|
21
|
+
display : flex;
|
22
|
+
position: absolute;
|
23
|
+
z-index : 20; // ensure to be on top of table headers
|
27
24
|
|
28
25
|
transition-duration : 200ms;
|
29
26
|
transition-property : height, left, top, transform, width;
|
@@ -238,7 +238,7 @@ class EditEventContainer extends FormContainer {
|
|
238
238
|
*/
|
239
239
|
onCalendarFieldChange(data) {
|
240
240
|
if (!Neo.isEmpty(data.value)) {
|
241
|
-
this.record.calendarId = data.
|
241
|
+
this.record.calendarId = data.record[data.component.store.keyProperty];
|
242
242
|
}
|
243
243
|
}
|
244
244
|
|
package/src/dialog/Base.mjs
CHANGED
@@ -112,7 +112,7 @@ class Base extends Panel {
|
|
112
112
|
/**
|
113
113
|
* @member {String} title='Dialog Title'
|
114
114
|
*/
|
115
|
-
|
115
|
+
title_: 'Dialog Title',
|
116
116
|
/**
|
117
117
|
* @member {Object} _vdom
|
118
118
|
*/
|
@@ -270,6 +270,18 @@ class Base extends Panel {
|
|
270
270
|
});
|
271
271
|
}
|
272
272
|
|
273
|
+
/**
|
274
|
+
* Triggered after the title config got changed
|
275
|
+
* @param {String} value
|
276
|
+
* @param {String} oldValue
|
277
|
+
* @protected
|
278
|
+
*/
|
279
|
+
afterSetTitle(value, oldValue) {
|
280
|
+
if (oldValue) {
|
281
|
+
this.down({flag: 'title-label'}).text = value;
|
282
|
+
}
|
283
|
+
}
|
284
|
+
|
273
285
|
/**
|
274
286
|
*
|
275
287
|
*/
|
@@ -391,9 +403,7 @@ class Base extends Panel {
|
|
391
403
|
cls = ['neo-header-toolbar', 'neo-toolbar'],
|
392
404
|
headers = me.headers || [];
|
393
405
|
|
394
|
-
|
395
|
-
cls.push('neo-draggable');
|
396
|
-
}
|
406
|
+
me.draggable && cls.push('neo-draggable');
|
397
407
|
|
398
408
|
headers.unshift({
|
399
409
|
cls : cls,
|
@@ -401,6 +411,7 @@ class Base extends Panel {
|
|
401
411
|
id : me.getHeaderToolbarId(),
|
402
412
|
items: [{
|
403
413
|
ntype: 'label',
|
414
|
+
flag : 'title-label',
|
404
415
|
text : me.title
|
405
416
|
}, '->', {
|
406
417
|
iconCls: 'far fa-window-maximize',
|
package/src/form/Container.mjs
CHANGED
@@ -64,7 +64,21 @@ class Container extends BaseContainer {
|
|
64
64
|
}
|
65
65
|
|
66
66
|
/**
|
67
|
-
* @returns {Object}
|
67
|
+
* @returns {Object}
|
68
|
+
*/
|
69
|
+
getSubmitValues() {
|
70
|
+
let fields = this.getFields(),
|
71
|
+
values = {};
|
72
|
+
|
73
|
+
fields.forEach(item => {
|
74
|
+
values[item.name || item.id] = item.getSubmitValue();
|
75
|
+
});
|
76
|
+
|
77
|
+
return values;
|
78
|
+
}
|
79
|
+
|
80
|
+
/**
|
81
|
+
* @returns {Object}
|
68
82
|
*/
|
69
83
|
getValues() {
|
70
84
|
let fields = this.getFields(),
|
@@ -109,7 +109,13 @@ class Select extends Picker {
|
|
109
109
|
* Display the first matching result while typing
|
110
110
|
* @member {Boolean} typeAhead_=true
|
111
111
|
*/
|
112
|
-
typeAhead_: true
|
112
|
+
typeAhead_: true,
|
113
|
+
/**
|
114
|
+
* This config should point to the store keyProperty or a different model field,
|
115
|
+
* which you want to submit instead
|
116
|
+
* @member {Number|String} valueField='id'
|
117
|
+
*/
|
118
|
+
valueField: 'id'
|
113
119
|
}}
|
114
120
|
|
115
121
|
/**
|
@@ -338,6 +344,15 @@ class Select extends Picker {
|
|
338
344
|
return recordKey && this.store.get(list.getItemRecordId(recordKey)) || null;
|
339
345
|
}
|
340
346
|
|
347
|
+
/**
|
348
|
+
* @returns {Number|String}
|
349
|
+
*/
|
350
|
+
getSubmitValue() {
|
351
|
+
let me = this;
|
352
|
+
|
353
|
+
return me.record?.[me.valueField] || me.value;
|
354
|
+
}
|
355
|
+
|
341
356
|
/**
|
342
357
|
* @param {Object} data
|
343
358
|
* @protected
|
@@ -463,7 +478,7 @@ class Select extends Picker {
|
|
463
478
|
|
464
479
|
me.fire('select', {
|
465
480
|
record,
|
466
|
-
value
|
481
|
+
value: record[displayField]
|
467
482
|
});
|
468
483
|
}
|
469
484
|
}
|