neo.mjs 5.6.6 → 5.6.8
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
CHANGED
package/package.json
CHANGED
package/src/DefaultConfig.mjs
CHANGED
@@ -236,12 +236,12 @@ const DefaultConfig = {
|
|
236
236
|
useVdomWorker: true,
|
237
237
|
/**
|
238
238
|
* buildScripts/injectPackageVersion.mjs will update this value
|
239
|
-
* @default '5.6.
|
239
|
+
* @default '5.6.8'
|
240
240
|
* @memberOf! module:Neo
|
241
241
|
* @name config.version
|
242
242
|
* @type String
|
243
243
|
*/
|
244
|
-
version: '5.6.
|
244
|
+
version: '5.6.8'
|
245
245
|
};
|
246
246
|
|
247
247
|
Object.assign(DefaultConfig, {
|
@@ -215,7 +215,13 @@ class Picker extends Text {
|
|
215
215
|
* @param args
|
216
216
|
*/
|
217
217
|
destroy(...args) {
|
218
|
-
this.picker
|
218
|
+
let picker = this.picker;
|
219
|
+
|
220
|
+
if (this.pickerIsMounted) {
|
221
|
+
picker?.unmount();
|
222
|
+
}
|
223
|
+
|
224
|
+
picker?.destroy();
|
219
225
|
super.destroy(...args);
|
220
226
|
}
|
221
227
|
|
@@ -36,6 +36,11 @@ class ZipCode extends Text {
|
|
36
36
|
* @member {Neo.form.field.Base|String|null} countryField_=null
|
37
37
|
*/
|
38
38
|
countryField_: null,
|
39
|
+
/**
|
40
|
+
* The data.Model field inside the related country field which provides the country code (e.g. 'DE')
|
41
|
+
* @member {String} countryKeyProperty='id'
|
42
|
+
*/
|
43
|
+
countryKeyProperty: 'id',
|
39
44
|
/**
|
40
45
|
* data passes inputPattern, maxLength, minLength & valueLength properties
|
41
46
|
* @member {Function} errorTextInputPattern=data=>`Not a valid zip code`
|
@@ -88,8 +93,19 @@ class ZipCode extends Text {
|
|
88
93
|
* @protected
|
89
94
|
*/
|
90
95
|
beforeSetCountryField(value, oldValue) {
|
96
|
+
let me = this,
|
97
|
+
field;
|
98
|
+
|
91
99
|
if (Neo.isString(value)) {
|
92
|
-
|
100
|
+
field = me.up().getReference(value);
|
101
|
+
|
102
|
+
if (!field) {
|
103
|
+
setTimeout(() => {
|
104
|
+
me.countryField = value;
|
105
|
+
}, 20)
|
106
|
+
}
|
107
|
+
|
108
|
+
return field
|
93
109
|
}
|
94
110
|
|
95
111
|
return value;
|
@@ -99,7 +115,7 @@ class ZipCode extends Text {
|
|
99
115
|
* @param {Object} data
|
100
116
|
*/
|
101
117
|
onCountryFieldChange(data) {
|
102
|
-
this.countryCode = data.record?.[
|
118
|
+
this.countryCode = data.record?.[this.countryKeyProperty];
|
103
119
|
}
|
104
120
|
}
|
105
121
|
|
package/src/tab/Container.mjs
CHANGED
@@ -411,7 +411,7 @@ class Container extends BaseContainer {
|
|
411
411
|
* @param {Boolean} silent=false
|
412
412
|
* @returns {Neo.component.Base|Neo.component.Base[]}
|
413
413
|
*/
|
414
|
-
insert(index, item, silent=false) {
|
414
|
+
insert(index, item, silent=false) {
|
415
415
|
let me = this,
|
416
416
|
cardContainer = me.getCardContainer(),
|
417
417
|
tabBar = me.getTabBar(),
|