neo.mjs 6.15.6 → 6.15.7
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
@@ -260,12 +260,12 @@ const DefaultConfig = {
|
|
260
260
|
useVdomWorker: true,
|
261
261
|
/**
|
262
262
|
* buildScripts/injectPackageVersion.mjs will update this value
|
263
|
-
* @default '6.15.
|
263
|
+
* @default '6.15.7'
|
264
264
|
* @memberOf! module:Neo
|
265
265
|
* @name config.version
|
266
266
|
* @type String
|
267
267
|
*/
|
268
|
-
version: '6.15.
|
268
|
+
version: '6.15.7'
|
269
269
|
};
|
270
270
|
|
271
271
|
Object.assign(DefaultConfig, {
|
package/src/core/Util.mjs
CHANGED
@@ -178,6 +178,15 @@ class Util extends Base {
|
|
178
178
|
return value?.constructor?.name === 'Object' || false
|
179
179
|
}
|
180
180
|
|
181
|
+
/**
|
182
|
+
* Returns true if the passed value is a neo data record
|
183
|
+
* @param {Object} value The value to test
|
184
|
+
* @returns {Boolean}
|
185
|
+
*/
|
186
|
+
static isRecord(value) {
|
187
|
+
return value?.constructor?.name === 'Record' || false
|
188
|
+
}
|
189
|
+
|
181
190
|
/**
|
182
191
|
* Returns true if the passed value is a string
|
183
192
|
* @param {String} value The value to test
|
@@ -224,6 +233,7 @@ Neo.applyFromNs(Neo, Util, {
|
|
224
233
|
isFunction : 'isFunction',
|
225
234
|
isNumber : 'isNumber',
|
226
235
|
isObject : 'isObject',
|
236
|
+
isRecord : 'isRecord',
|
227
237
|
isString : 'isString',
|
228
238
|
toArray : 'toArray'
|
229
239
|
}, true);
|
@@ -306,7 +306,7 @@ class ComboBox extends Picker {
|
|
306
306
|
record;
|
307
307
|
|
308
308
|
// getting a record, nothing to do
|
309
|
-
if (Neo.
|
309
|
+
if (Neo.isRecord(value)) {
|
310
310
|
return value
|
311
311
|
}
|
312
312
|
|
@@ -392,7 +392,7 @@ class ComboBox extends Picker {
|
|
392
392
|
|
393
393
|
// Filter resulting in something to show
|
394
394
|
if (store.getCount()) {
|
395
|
-
me.
|
395
|
+
me.showPicker();
|
396
396
|
|
397
397
|
// List might not exist until the picker is created
|
398
398
|
const
|
@@ -620,19 +620,6 @@ class ComboBox extends Picker {
|
|
620
620
|
this.update()
|
621
621
|
}
|
622
622
|
|
623
|
-
/**
|
624
|
-
*
|
625
|
-
*/
|
626
|
-
onPickerTriggerClick() {
|
627
|
-
let me = this;
|
628
|
-
|
629
|
-
if (me.picker?.isVisible) {
|
630
|
-
me.picker.hidden = true
|
631
|
-
} else if (!me.disabled && !me.readOnly) {
|
632
|
-
me.doFilter(null)
|
633
|
-
}
|
634
|
-
}
|
635
|
-
|
636
623
|
/**
|
637
624
|
* Selecting a record, if required
|
638
625
|
* @param {Object[]} items
|
@@ -679,6 +666,20 @@ class ComboBox extends Picker {
|
|
679
666
|
me.list.selectItem(index)
|
680
667
|
}
|
681
668
|
|
669
|
+
/**
|
670
|
+
* @override
|
671
|
+
*/
|
672
|
+
togglePicker() {
|
673
|
+
let me = this,
|
674
|
+
{picker} = me;
|
675
|
+
|
676
|
+
if (picker?.hidden === false) {
|
677
|
+
picker.hidden = true
|
678
|
+
} else if (!me.disabled && !me.readOnly) {
|
679
|
+
me.doFilter(null)
|
680
|
+
}
|
681
|
+
}
|
682
|
+
|
682
683
|
/**
|
683
684
|
* Override this method as needed inside class extensions.
|
684
685
|
* @param {*} value
|
@@ -687,7 +688,7 @@ class ComboBox extends Picker {
|
|
687
688
|
updateInputValueFromValue(value) {
|
688
689
|
let inputValue = null;
|
689
690
|
|
690
|
-
if (Neo.
|
691
|
+
if (Neo.isRecord(value)) {
|
691
692
|
inputValue = value[this.displayField]
|
692
693
|
}
|
693
694
|
|
@@ -288,8 +288,8 @@ class Picker extends Text {
|
|
288
288
|
// We processed this event, and it should not proceed to ancestor components
|
289
289
|
data.cancelBubble = true;
|
290
290
|
|
291
|
-
// And no further
|
292
|
-
return false
|
291
|
+
// And no further listeners should be notified
|
292
|
+
return false
|
293
293
|
}
|
294
294
|
}
|
295
295
|
|