neo.mjs 6.5.4 → 6.5.5
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 '6.5.
|
239
|
+
* @default '6.5.5'
|
240
240
|
* @memberOf! module:Neo
|
241
241
|
* @name config.version
|
242
242
|
* @type String
|
243
243
|
*/
|
244
|
-
version: '6.5.
|
244
|
+
version: '6.5.5'
|
245
245
|
};
|
246
246
|
|
247
247
|
Object.assign(DefaultConfig, {
|
package/src/form/field/Text.mjs
CHANGED
@@ -17,17 +17,6 @@ class Text extends Base {
|
|
17
17
|
* @static
|
18
18
|
*/
|
19
19
|
static autoCapitalizeValues = ['characters', 'none', 'on', 'off', 'sentences', 'words']
|
20
|
-
/**
|
21
|
-
* @member {Object} delayable
|
22
|
-
* @protected
|
23
|
-
* @static
|
24
|
-
*/
|
25
|
-
static delayable = {
|
26
|
-
fireChangeEvent: {
|
27
|
-
type : 'debounce',
|
28
|
-
timer: 300
|
29
|
-
}
|
30
|
-
}
|
31
20
|
/**
|
32
21
|
* Valid values for labelPosition
|
33
22
|
* @member {String[]} labelPositions=['bottom','inline','left','right','top']
|
package/src/util/Function.mjs
CHANGED
@@ -99,16 +99,25 @@ export function intercept(target, targetMethodName, interceptFunction, scope, pr
|
|
99
99
|
* @returns {Function}
|
100
100
|
*/
|
101
101
|
export function throttle(callback, scope, delay=300) {
|
102
|
-
let
|
102
|
+
let lastRanDate, timeoutId;
|
103
103
|
|
104
104
|
return function(...args) {
|
105
|
-
if (!
|
106
|
-
wait = true;
|
107
|
-
|
105
|
+
if (!lastRanDate) {
|
108
106
|
// we need to check if the scope (instance) did not get destroyed yet
|
109
107
|
scope?.id && callback.apply(scope, args);
|
110
108
|
|
111
|
-
|
109
|
+
lastRanDate = Date.now()
|
110
|
+
} else {
|
111
|
+
clearTimeout(timeoutId)
|
112
|
+
|
113
|
+
timeoutId = setTimeout(function() {
|
114
|
+
if ((Date.now() - lastRanDate) >= delay) {
|
115
|
+
// we need to check if the scope (instance) did not get destroyed yet
|
116
|
+
scope?.id && callback.apply(scope, args);
|
117
|
+
|
118
|
+
lastRanDate = Date.now()
|
119
|
+
}
|
120
|
+
}, delay - (Date.now() - lastRanDate))
|
112
121
|
}
|
113
122
|
}
|
114
123
|
}
|