neo.mjs 5.3.0 → 5.3.2
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/form/view/FormContainerController.mjs +11 -0
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +1 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/form/field/Base.mjs +32 -2
- package/src/form/field/Select.mjs +18 -5
- package/src/form/field/Text.mjs +2 -0
package/apps/ServiceWorker.mjs
CHANGED
@@ -13,6 +13,17 @@ class FormContainerController extends Component {
|
|
13
13
|
className: 'Form.view.FormContainerController'
|
14
14
|
}
|
15
15
|
|
16
|
+
/**
|
17
|
+
*
|
18
|
+
*/
|
19
|
+
onComponentConstructed() {
|
20
|
+
super.onComponentConstructed();
|
21
|
+
|
22
|
+
this.component.on('fieldFocusLeave', data => {
|
23
|
+
console.log('fieldFocusLeave', data);
|
24
|
+
})
|
25
|
+
}
|
26
|
+
|
16
27
|
/**
|
17
28
|
* @param {Object} data
|
18
29
|
*/
|
package/package.json
CHANGED
package/src/DefaultConfig.mjs
CHANGED
@@ -237,12 +237,12 @@ const DefaultConfig = {
|
|
237
237
|
useVdomWorker: true,
|
238
238
|
/**
|
239
239
|
* buildScripts/injectPackageVersion.mjs will update this value
|
240
|
-
* @default '5.3.
|
240
|
+
* @default '5.3.2'
|
241
241
|
* @memberOf! module:Neo
|
242
242
|
* @name config.version
|
243
243
|
* @type String
|
244
244
|
*/
|
245
|
-
version: '5.3.
|
245
|
+
version: '5.3.2'
|
246
246
|
};
|
247
247
|
|
248
248
|
Object.assign(DefaultConfig, {
|
package/src/form/field/Base.mjs
CHANGED
@@ -81,11 +81,23 @@ class Base extends Component {
|
|
81
81
|
* @param {*} oldValue
|
82
82
|
*/
|
83
83
|
fireChangeEvent(value, oldValue) {
|
84
|
-
this
|
85
|
-
|
84
|
+
let me = this;
|
85
|
+
|
86
|
+
me.fire('change', {
|
87
|
+
component: me,
|
86
88
|
oldValue,
|
87
89
|
value
|
88
90
|
});
|
91
|
+
|
92
|
+
ComponentManager.getParents(this).forEach(parent => {
|
93
|
+
if (parent instanceof Neo.form.Container) {
|
94
|
+
parent.fire('fieldChange', {
|
95
|
+
component: me,
|
96
|
+
oldValue,
|
97
|
+
value
|
98
|
+
})
|
99
|
+
}
|
100
|
+
})
|
89
101
|
}
|
90
102
|
|
91
103
|
/**
|
@@ -102,6 +114,24 @@ class Base extends Component {
|
|
102
114
|
return true;
|
103
115
|
}
|
104
116
|
|
117
|
+
/**
|
118
|
+
* @param {Object} data
|
119
|
+
* @param {Object[]} data.oldPath
|
120
|
+
* @protected
|
121
|
+
*/
|
122
|
+
onFocusLeave(data) {
|
123
|
+
super.onFocusLeave?.(data);
|
124
|
+
|
125
|
+
ComponentManager.getParents(this).forEach(parent => {
|
126
|
+
if (parent instanceof Neo.form.Container) {
|
127
|
+
parent.fire('fieldFocusLeave', {
|
128
|
+
...data,
|
129
|
+
component: this
|
130
|
+
})
|
131
|
+
}
|
132
|
+
})
|
133
|
+
}
|
134
|
+
|
105
135
|
/**
|
106
136
|
* Resets the field to a new value or null
|
107
137
|
* @param {*} value=null
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import ClassSystemUtil
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
1
|
+
import ClassSystemUtil from '../../util/ClassSystem.mjs';
|
2
|
+
import ComponentManager from '../../manager/Component.mjs';
|
3
|
+
import List from '../../list/Base.mjs';
|
4
|
+
import Picker from './Picker.mjs';
|
5
|
+
import Store from '../../data/Store.mjs';
|
6
|
+
import VDomUtil from '../../util/VDom.mjs';
|
6
7
|
|
7
8
|
/**
|
8
9
|
* Provides a dropdown list to select one or multiple items
|
@@ -306,6 +307,18 @@ class Select extends Picker {
|
|
306
307
|
oldValue,
|
307
308
|
record,
|
308
309
|
value
|
310
|
+
});
|
311
|
+
|
312
|
+
ComponentManager.getParents(me).forEach(parent => {
|
313
|
+
if (parent instanceof Neo.form.Container) {
|
314
|
+
parent.fire('fieldChange', {
|
315
|
+
component: me,
|
316
|
+
oldRecord,
|
317
|
+
oldValue,
|
318
|
+
record,
|
319
|
+
value
|
320
|
+
})
|
321
|
+
}
|
309
322
|
})
|
310
323
|
}
|
311
324
|
}
|