neo.mjs 5.0.3 → 5.1.0
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/.github/CODING_GUIDELINES.md +294 -12
- package/apps/ServiceWorker.mjs +2 -2
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +3 -3
- package/src/DefaultConfig.mjs +2 -2
- package/src/Neo.mjs +8 -8
- package/src/button/Base.mjs +21 -26
- package/src/calendar/view/week/Component.mjs +1 -2
- package/src/collection/Base.mjs +1 -1
- package/src/component/wrapper/GoogleMaps.mjs +35 -35
- package/src/core/Base.mjs +66 -0
- package/src/data/connection/Fetch.mjs +5 -5
- package/src/data/connection/WebSocket.mjs +25 -24
- package/src/dialog/header/Toolbar.mjs +12 -12
- package/src/form/field/Search.mjs +1 -1
- package/src/form/field/Select.mjs +10 -10
- package/src/form/field/Text.mjs +25 -24
- package/src/form/field/trigger/Date.mjs +3 -3
- package/src/form/field/trigger/Search.mjs +28 -0
- package/src/grid/Container.mjs +20 -20
- package/src/grid/header/Button.mjs +10 -10
- package/src/list/Color.mjs +7 -7
- package/src/main/addon/CesiumJS.mjs +6 -6
- package/src/main/addon/GoogleMaps.mjs +13 -13
- package/src/manager/Component.mjs +5 -5
- package/src/manager/Task.mjs +2 -2
- package/src/manager/Toast.mjs +13 -13
- package/src/manager/rpc/Message.mjs +20 -20
- package/src/vdom/Helper.mjs +24 -24
- package/src/worker/App.mjs +18 -18
- package/src/worker/Base.mjs +17 -17
- package/src/worker/Data.mjs +11 -11
- package/src/worker/Manager.mjs +9 -9
- package/src/worker/ServiceBase.mjs +25 -25
package/src/core/Base.mjs
CHANGED
@@ -10,12 +10,24 @@ const configSymbol = Symbol.for('configSymbol'),
|
|
10
10
|
* @class Neo.core.Base
|
11
11
|
*/
|
12
12
|
class Base {
|
13
|
+
/**
|
14
|
+
* Regex to grab the MethodName from an error
|
15
|
+
* which is a second generation function
|
16
|
+
* @type {*}
|
17
|
+
*/
|
18
|
+
static methodNameRegex = /\n.*\n\s+at\s+.*\.(\w+)\s+.*/
|
13
19
|
/**
|
14
20
|
* True automatically applies the core.Observable mixin
|
15
21
|
* @member {Boolean} observable=false
|
16
22
|
* @static
|
17
23
|
*/
|
18
24
|
static observable = false
|
25
|
+
/**
|
26
|
+
* Keep the overriden methods
|
27
|
+
* @type {Object}
|
28
|
+
*/
|
29
|
+
static overriddenMethods = {}
|
30
|
+
|
19
31
|
/**
|
20
32
|
* Set this one to false in case you don't want to stick
|
21
33
|
* to the "anti-pattern" to apply classes to the global Neo or App namespace
|
@@ -137,6 +149,33 @@ class Base {
|
|
137
149
|
}
|
138
150
|
}
|
139
151
|
|
152
|
+
/**
|
153
|
+
* Applying overrides and adding overriddenMethods to the class constructors
|
154
|
+
* @param {Object} cfg
|
155
|
+
* @protected
|
156
|
+
*/
|
157
|
+
static applyOverrides(cfg) {
|
158
|
+
let overrides = Neo.ns(cfg.className, false, Neo.overrides),
|
159
|
+
cls, item;
|
160
|
+
|
161
|
+
if (overrides) {
|
162
|
+
// Apply all methods
|
163
|
+
for (item in overrides) {
|
164
|
+
if (Neo.isFunction(overrides[item])) {
|
165
|
+
// Already existing ones
|
166
|
+
cls = this.prototype;
|
167
|
+
|
168
|
+
if (cls[item]) {
|
169
|
+
// add to overriddenMethods
|
170
|
+
cls.constructor.overriddenMethods[item] = cls[item];
|
171
|
+
}
|
172
|
+
}
|
173
|
+
}
|
174
|
+
// Apply configs to prototype
|
175
|
+
overrides && Object.assign(cfg, overrides);
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
140
179
|
/**
|
141
180
|
* Convenience method for beforeSet functions which test if a given value is inside a static array
|
142
181
|
* @param {String|Number} value
|
@@ -156,6 +195,33 @@ class Base {
|
|
156
195
|
return value;
|
157
196
|
}
|
158
197
|
|
198
|
+
/**
|
199
|
+
* From within an override, a method can call a parent method, by using callOVerridden.
|
200
|
+
*
|
201
|
+
* @example
|
202
|
+
* afterSetHeight(value, oldValue) {
|
203
|
+
* // do the standard
|
204
|
+
* this.callOverridden(...arguments);
|
205
|
+
* // do you own stuff
|
206
|
+
* }
|
207
|
+
*
|
208
|
+
* We create an error to get the caller.name and then run that method on the constructor.
|
209
|
+
* This is based on the following error structure, e.g. afterSetHeight.
|
210
|
+
*
|
211
|
+
* Error
|
212
|
+
* at Base.callOverridden (Base.mjs:176:21)
|
213
|
+
* at Base.afterSetHeight (Overrides.mjs:19:26)
|
214
|
+
*
|
215
|
+
* @param args
|
216
|
+
*/
|
217
|
+
callOverridden(...args) {
|
218
|
+
let stack = new Error().stack,
|
219
|
+
regex = Base.methodNameRegex,
|
220
|
+
methodName = stack.match(regex)[1];
|
221
|
+
|
222
|
+
this.__proto__.constructor.overriddenMethods[methodName].call(this, ...args);
|
223
|
+
}
|
224
|
+
|
159
225
|
/**
|
160
226
|
* Uses the IdGenerator to create an id if a static one is not explicitly set.
|
161
227
|
* Registers the instance to manager.Instance if this one is already created,
|
@@ -5,11 +5,6 @@ import Base from '../../core/Base.mjs';
|
|
5
5
|
* @extends Neo.core.Base
|
6
6
|
*/
|
7
7
|
class Fetch extends Base {
|
8
|
-
/**
|
9
|
-
* @member {Object} defaultHeaders=null
|
10
|
-
*/
|
11
|
-
defaultHeaders = null
|
12
|
-
|
13
8
|
static config = {
|
14
9
|
/**
|
15
10
|
* @member {String} className='Neo.data.connection.Fetch'
|
@@ -18,6 +13,11 @@ class Fetch extends Base {
|
|
18
13
|
className: 'Neo.data.connection.Fetch'
|
19
14
|
}
|
20
15
|
|
16
|
+
/**
|
17
|
+
* @member {Object} defaultHeaders=null
|
18
|
+
*/
|
19
|
+
defaultHeaders = null
|
20
|
+
|
21
21
|
/**
|
22
22
|
* @param {Object|String} url
|
23
23
|
* @param {Object} config
|
@@ -7,6 +7,31 @@ import Observable from '../../core/Observable.mjs';
|
|
7
7
|
* @extends Neo.core.Base
|
8
8
|
*/
|
9
9
|
class Socket extends Base {
|
10
|
+
/**
|
11
|
+
* True automatically applies the core.Observable mixin
|
12
|
+
* @member {Boolean} observable=true
|
13
|
+
* @static
|
14
|
+
*/
|
15
|
+
static observable = true
|
16
|
+
|
17
|
+
static config = {
|
18
|
+
/**
|
19
|
+
* @member {String} className='Neo.data.connection.WebSocket'
|
20
|
+
* @protected
|
21
|
+
*/
|
22
|
+
className: 'Neo.data.connection.WebSocket',
|
23
|
+
/**
|
24
|
+
* @member {String} ntype='socket-connection'
|
25
|
+
* @protected
|
26
|
+
*/
|
27
|
+
ntype: 'socket-connection',
|
28
|
+
/**
|
29
|
+
* @member {WebSocket|null} socket_=null
|
30
|
+
* @protected
|
31
|
+
*/
|
32
|
+
socket_: null
|
33
|
+
}
|
34
|
+
|
10
35
|
/**
|
11
36
|
* @member {String|null} channel=null
|
12
37
|
*/
|
@@ -34,30 +59,6 @@ class Socket extends Base {
|
|
34
59
|
* @member {String|null} serverAddress=null
|
35
60
|
*/
|
36
61
|
serverAddress = null
|
37
|
-
/**
|
38
|
-
* True automatically applies the core.Observable mixin
|
39
|
-
* @member {Boolean} observable=true
|
40
|
-
* @static
|
41
|
-
*/
|
42
|
-
static observable = true
|
43
|
-
|
44
|
-
static config = {
|
45
|
-
/**
|
46
|
-
* @member {String} className='Neo.data.connection.WebSocket'
|
47
|
-
* @protected
|
48
|
-
*/
|
49
|
-
className: 'Neo.data.connection.WebSocket',
|
50
|
-
/**
|
51
|
-
* @member {String} ntype='socket-connection'
|
52
|
-
* @protected
|
53
|
-
*/
|
54
|
-
ntype: 'socket-connection',
|
55
|
-
/**
|
56
|
-
* @member {WebSocket|null} socket_=null
|
57
|
-
* @protected
|
58
|
-
*/
|
59
|
-
socket_: null
|
60
|
-
}
|
61
62
|
|
62
63
|
/**
|
63
64
|
* @param {Object} config
|
@@ -5,6 +5,18 @@ import Base from '../../toolbar/Base.mjs';
|
|
5
5
|
* @extends Neo.toolbar.Base
|
6
6
|
*/
|
7
7
|
class Toolbar extends Base {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Neo.dialog.header.Toolbar'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Neo.dialog.header.Toolbar',
|
14
|
+
/**
|
15
|
+
* @member {String|null} title=null
|
16
|
+
*/
|
17
|
+
title_: null
|
18
|
+
}
|
19
|
+
|
8
20
|
/**
|
9
21
|
* @member {Object} actionMap
|
10
22
|
*/
|
@@ -28,18 +40,6 @@ class Toolbar extends Base {
|
|
28
40
|
*/
|
29
41
|
actions = ['maximize', 'close']
|
30
42
|
|
31
|
-
static config = {
|
32
|
-
/**
|
33
|
-
* @member {String} className='Neo.dialog.header.Toolbar'
|
34
|
-
* @protected
|
35
|
-
*/
|
36
|
-
className: 'Neo.dialog.header.Toolbar',
|
37
|
-
/**
|
38
|
-
* @member {String|null} title=null
|
39
|
-
*/
|
40
|
-
title_: null
|
41
|
-
}
|
42
|
-
|
43
43
|
/**
|
44
44
|
* Triggered after the title config got changed
|
45
45
|
* @param {String} value
|
@@ -10,16 +10,6 @@ import VDomUtil from '../../util/VDom.mjs';
|
|
10
10
|
* @extends Neo.form.field.Picker
|
11
11
|
*/
|
12
12
|
class Select extends Picker {
|
13
|
-
/**
|
14
|
-
* @member {String} filterOperator='like'
|
15
|
-
*/
|
16
|
-
filterOperator = 'like'
|
17
|
-
/**
|
18
|
-
* Set this config to false, in case typing into the input field should not filter list items
|
19
|
-
* @member {Boolean} useFilter=true
|
20
|
-
*/
|
21
|
-
useFilter = true
|
22
|
-
|
23
13
|
/**
|
24
14
|
* Valid values for triggerAction
|
25
15
|
* @member {String[]} triggerActions=['all','filtered']
|
@@ -116,6 +106,16 @@ class Select extends Picker {
|
|
116
106
|
valueField: 'id'
|
117
107
|
}
|
118
108
|
|
109
|
+
/**
|
110
|
+
* @member {String} filterOperator='like'
|
111
|
+
*/
|
112
|
+
filterOperator = 'like'
|
113
|
+
/**
|
114
|
+
* Set this config to false, in case typing into the input field should not filter list items
|
115
|
+
* @member {Boolean} useFilter=true
|
116
|
+
*/
|
117
|
+
useFilter = true
|
118
|
+
|
119
119
|
/**
|
120
120
|
* @param {Object} config
|
121
121
|
*/
|
package/src/form/field/Text.mjs
CHANGED
@@ -10,26 +10,6 @@ import VNodeUtil from '../../util/VNode.mjs';
|
|
10
10
|
* @extends Neo.form.field.Base
|
11
11
|
*/
|
12
12
|
class Text extends Base {
|
13
|
-
/**
|
14
|
-
* data passes maxLength, minLength & valueLength properties
|
15
|
-
* @member {Function} errorTextMaxLength=data=>`Max length violation: ${valueLength} / ${maxLength}`
|
16
|
-
*/
|
17
|
-
errorTextMaxLength = data => `Max length violation: ${data.valueLength} / ${data.maxLength}`
|
18
|
-
/**
|
19
|
-
* data passes maxLength, minLength & valueLength properties
|
20
|
-
* @member {Function} errorTextMinLength=data=>`Min length violation: ${data.valueLength} / ${data.minLength}`
|
21
|
-
*/
|
22
|
-
errorTextMinLength = data => `Min length violation: ${data.valueLength} / ${data.minLength}`
|
23
|
-
/**
|
24
|
-
* @member {String} errorTextRequired='Required'
|
25
|
-
*/
|
26
|
-
errorTextRequired = 'Required'
|
27
|
-
/**
|
28
|
-
* Set this value to false, in case a field should display errors up front
|
29
|
-
* @member {Boolean} validBeforeMount=true
|
30
|
-
*/
|
31
|
-
validBeforeMount = true
|
32
|
-
|
33
13
|
/**
|
34
14
|
* Valid values for autoCapitalize
|
35
15
|
* @member {String[]} autoCapitalizeValues=['characters','none','on','off','sentences','words']
|
@@ -190,6 +170,26 @@ class Text extends Base {
|
|
190
170
|
]}
|
191
171
|
}
|
192
172
|
|
173
|
+
/**
|
174
|
+
* data passes maxLength, minLength & valueLength properties
|
175
|
+
* @member {Function} errorTextMaxLength=data=>`Max length violation: ${valueLength} / ${maxLength}`
|
176
|
+
*/
|
177
|
+
errorTextMaxLength = data => `Max length violation: ${data.valueLength} / ${data.maxLength}`
|
178
|
+
/**
|
179
|
+
* data passes maxLength, minLength & valueLength properties
|
180
|
+
* @member {Function} errorTextMinLength=data=>`Min length violation: ${data.valueLength} / ${data.minLength}`
|
181
|
+
*/
|
182
|
+
errorTextMinLength = data => `Min length violation: ${data.valueLength} / ${data.minLength}`
|
183
|
+
/**
|
184
|
+
* @member {String} errorTextRequired='Required'
|
185
|
+
*/
|
186
|
+
errorTextRequired = 'Required'
|
187
|
+
/**
|
188
|
+
* Set this value to false, in case a field should display errors up front
|
189
|
+
* @member {Boolean} validBeforeMount=true
|
190
|
+
*/
|
191
|
+
validBeforeMount = true
|
192
|
+
|
193
193
|
/**
|
194
194
|
* @param {Object} config
|
195
195
|
*/
|
@@ -772,11 +772,12 @@ class Text extends Base {
|
|
772
772
|
*/
|
773
773
|
beforeSetLabelText(value, oldValue) {
|
774
774
|
let me = this,
|
775
|
-
labelOptionalText = me.labelOptionalText
|
775
|
+
labelOptionalText = me.labelOptionalText,
|
776
|
+
hasOptionalText = value.endsWith(labelOptionalText);
|
776
777
|
|
777
|
-
if (me.showOptionalText && !me.required) {
|
778
|
-
|
779
|
-
} else if (value &&
|
778
|
+
if (me.showOptionalText && !me.required && !hasOptionalText) {
|
779
|
+
value += labelOptionalText;
|
780
|
+
} else if (value && hasOptionalText) {
|
780
781
|
value = value.replace(labelOptionalText, '');
|
781
782
|
}
|
782
783
|
|
@@ -5,7 +5,7 @@ import Picker from './Picker.mjs';
|
|
5
5
|
* @class Neo.form.field.trigger.Date
|
6
6
|
* @extends Neo.form.field.trigger.Picker
|
7
7
|
*/
|
8
|
-
class
|
8
|
+
class DateTrigger extends Picker {
|
9
9
|
static config = {
|
10
10
|
/**
|
11
11
|
* @member {String} className='Neo.form.field.trigger.Date'
|
@@ -24,6 +24,6 @@ class Date extends Picker {
|
|
24
24
|
}
|
25
25
|
}
|
26
26
|
|
27
|
-
Neo.applyClassConfig(
|
27
|
+
Neo.applyClassConfig(DateTrigger);
|
28
28
|
|
29
|
-
export default
|
29
|
+
export default DateTrigger;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import Picker from './Picker.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Neo.form.field.trigger.Search
|
5
|
+
* @extends Neo.form.field.trigger.Picker
|
6
|
+
*/
|
7
|
+
class Search extends Picker {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Neo.form.field.trigger.Search'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Neo.form.field.trigger.Search',
|
14
|
+
/**
|
15
|
+
* @member {String} ntype='trigger-search'
|
16
|
+
* @protected
|
17
|
+
*/
|
18
|
+
ntype: 'trigger-search',
|
19
|
+
/**
|
20
|
+
* @member {String|null} iconCls='fas fa-magnifying-glass'
|
21
|
+
*/
|
22
|
+
iconCls: 'fas fa-magnifying-glass'
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
Neo.applyClassConfig(Search);
|
27
|
+
|
28
|
+
export default Search;
|
package/src/grid/Container.mjs
CHANGED
@@ -10,26 +10,6 @@ import * as header from './header/_export.mjs';
|
|
10
10
|
* @extends Neo.container.Base
|
11
11
|
*/
|
12
12
|
class Container extends BaseContainer {
|
13
|
-
/**
|
14
|
-
* Configs for Neo.grid.header.Toolbar
|
15
|
-
* @member {Object|null} [headerToolbarConfig=null]
|
16
|
-
*/
|
17
|
-
headerToolbarConfig = null
|
18
|
-
/**
|
19
|
-
* @member {String|null} headerToolbarId_=null
|
20
|
-
*/
|
21
|
-
headerToolbarId = null
|
22
|
-
/**
|
23
|
-
* Configs for Neo.grid.View
|
24
|
-
* @member {Object|null} [viewConfig=null]
|
25
|
-
*/
|
26
|
-
viewConfig = null
|
27
|
-
/**
|
28
|
-
* @member {String|null} viewId_=null
|
29
|
-
* @protected
|
30
|
-
*/
|
31
|
-
viewId = null
|
32
|
-
|
33
13
|
static config = {
|
34
14
|
/**
|
35
15
|
* @member {String} className='Neo.grid.Container'
|
@@ -75,6 +55,26 @@ class Container extends BaseContainer {
|
|
75
55
|
]}
|
76
56
|
}
|
77
57
|
|
58
|
+
/**
|
59
|
+
* Configs for Neo.grid.header.Toolbar
|
60
|
+
* @member {Object|null} [headerToolbarConfig=null]
|
61
|
+
*/
|
62
|
+
headerToolbarConfig = null
|
63
|
+
/**
|
64
|
+
* @member {String|null} headerToolbarId_=null
|
65
|
+
*/
|
66
|
+
headerToolbarId = null
|
67
|
+
/**
|
68
|
+
* Configs for Neo.grid.View
|
69
|
+
* @member {Object|null} [viewConfig=null]
|
70
|
+
*/
|
71
|
+
viewConfig = null
|
72
|
+
/**
|
73
|
+
* @member {String|null} viewId_=null
|
74
|
+
* @protected
|
75
|
+
*/
|
76
|
+
viewId = null
|
77
|
+
|
78
78
|
/**
|
79
79
|
* @param {Object} config
|
80
80
|
*/
|
@@ -6,16 +6,6 @@ import NeoArray from '../../util/Array.mjs';
|
|
6
6
|
* @extends Neo.button.Base
|
7
7
|
*/
|
8
8
|
class Button extends BaseButton {
|
9
|
-
/**
|
10
|
-
* Sort direction when clicking on an unsorted button
|
11
|
-
* @member {String} defaultSortDirection='ASC'
|
12
|
-
*/
|
13
|
-
defaultSortDirection = 'ASC'
|
14
|
-
/**
|
15
|
-
* @member {String|null} field=null
|
16
|
-
*/
|
17
|
-
field = null
|
18
|
-
|
19
9
|
/**
|
20
10
|
* Valid values for align
|
21
11
|
* @member {String[]} alignValues: ['left', 'center', 'right']
|
@@ -60,6 +50,16 @@ class Button extends BaseButton {
|
|
60
50
|
isSorted_: null
|
61
51
|
}
|
62
52
|
|
53
|
+
/**
|
54
|
+
* Sort direction when clicking on an unsorted button
|
55
|
+
* @member {String} defaultSortDirection='ASC'
|
56
|
+
*/
|
57
|
+
defaultSortDirection = 'ASC'
|
58
|
+
/**
|
59
|
+
* @member {String|null} field=null
|
60
|
+
*/
|
61
|
+
field = null
|
62
|
+
|
63
63
|
/**
|
64
64
|
* @param {Object} config
|
65
65
|
*/
|
package/src/list/Color.mjs
CHANGED
@@ -5,13 +5,6 @@ import Base from './Base.mjs';
|
|
5
5
|
* @extends Neo.list.Base
|
6
6
|
*/
|
7
7
|
class Color extends Base {
|
8
|
-
/**
|
9
|
-
* form.field.Color needs to trigger a silent vdom update
|
10
|
-
* @member {Boolean} silentSelectUpdate=false
|
11
|
-
* @protected
|
12
|
-
*/
|
13
|
-
silentSelectUpdate = false
|
14
|
-
|
15
8
|
static config = {
|
16
9
|
/**
|
17
10
|
* @member {String} className='Neo.list.Color'
|
@@ -40,6 +33,13 @@ class Color extends Base {
|
|
40
33
|
colorFormatter: (scope,data) => data[scope.colorField]
|
41
34
|
}
|
42
35
|
|
36
|
+
/**
|
37
|
+
* form.field.Color needs to trigger a silent vdom update
|
38
|
+
* @member {Boolean} silentSelectUpdate=false
|
39
|
+
* @protected
|
40
|
+
*/
|
41
|
+
silentSelectUpdate = false
|
42
|
+
|
43
43
|
/**
|
44
44
|
* Override this method for custom renderers
|
45
45
|
* @param {Object} record
|
@@ -8,12 +8,6 @@ import DomAccess from '../DomAccess.mjs';
|
|
8
8
|
* @singleton
|
9
9
|
*/
|
10
10
|
class CesiumJS extends Base {
|
11
|
-
/**
|
12
|
-
* @member {Object} viewers={}
|
13
|
-
* @protected
|
14
|
-
*/
|
15
|
-
viewers = {}
|
16
|
-
|
17
11
|
static config = {
|
18
12
|
/**
|
19
13
|
* @member {String} className='Neo.main.addon.CesiumJS'
|
@@ -40,6 +34,12 @@ class CesiumJS extends Base {
|
|
40
34
|
singleton: true
|
41
35
|
}
|
42
36
|
|
37
|
+
/**
|
38
|
+
* @member {Object} viewers={}
|
39
|
+
* @protected
|
40
|
+
*/
|
41
|
+
viewers = {}
|
42
|
+
|
43
43
|
/**
|
44
44
|
* @param {Object} config
|
45
45
|
*/
|
@@ -9,19 +9,6 @@ import Observable from '../../core/Observable.mjs';
|
|
9
9
|
* @singleton
|
10
10
|
*/
|
11
11
|
class GoogleMaps extends Base {
|
12
|
-
/**
|
13
|
-
* @member {google.maps.Geocoder|null} maps=null
|
14
|
-
*/
|
15
|
-
geoCoder = null
|
16
|
-
/**
|
17
|
-
* @member {Object} maps={}
|
18
|
-
*/
|
19
|
-
maps = {}
|
20
|
-
/**
|
21
|
-
* @member {Object} markers={}
|
22
|
-
*/
|
23
|
-
markers = {}
|
24
|
-
|
25
12
|
static config = {
|
26
13
|
/**
|
27
14
|
* @member {String} className='Neo.main.addon.GoogleMaps'
|
@@ -57,6 +44,19 @@ class GoogleMaps extends Base {
|
|
57
44
|
singleton: true
|
58
45
|
}
|
59
46
|
|
47
|
+
/**
|
48
|
+
* @member {google.maps.Geocoder|null} maps=null
|
49
|
+
*/
|
50
|
+
geoCoder = null
|
51
|
+
/**
|
52
|
+
* @member {Object} maps={}
|
53
|
+
*/
|
54
|
+
maps = {}
|
55
|
+
/**
|
56
|
+
* @member {Object} markers={}
|
57
|
+
*/
|
58
|
+
markers = {}
|
59
|
+
|
60
60
|
/**
|
61
61
|
* @param {Object} config
|
62
62
|
*/
|
@@ -182,7 +182,7 @@ class Component extends Base {
|
|
182
182
|
root = app.mainView;
|
183
183
|
|
184
184
|
/* create an array of objects from string */
|
185
|
-
if(Neo.isString(componentDescription)) {
|
185
|
+
if (Neo.isString(componentDescription)) {
|
186
186
|
const regex = /(\w*)(\[[^\]]*\])|(\w*)/g;
|
187
187
|
let match;
|
188
188
|
|
@@ -193,11 +193,11 @@ class Component extends Base {
|
|
193
193
|
ntype = ntype || ntypeOnly;
|
194
194
|
obj = {ntype};
|
195
195
|
|
196
|
-
if(pairs) {
|
196
|
+
if (pairs) {
|
197
197
|
const pairsRegex = /\[(.*?)\]/,
|
198
198
|
pairsMatch = pairs.match(pairsRegex);
|
199
199
|
|
200
|
-
if(pairsMatch) {
|
200
|
+
if (pairsMatch) {
|
201
201
|
const pairs = pairsMatch[1].split(',');
|
202
202
|
pairs.forEach((pair) => {
|
203
203
|
const [key, value] = pair.split('=');
|
@@ -217,10 +217,10 @@ class Component extends Base {
|
|
217
217
|
|
218
218
|
/* find the correct child using down() */
|
219
219
|
const result = objects.reduce((acc, key) => {
|
220
|
-
if(acc) {
|
220
|
+
if (acc) {
|
221
221
|
let child = acc.down(key, returnFirstMatch);
|
222
222
|
|
223
|
-
if(!!child) {
|
223
|
+
if (!!child) {
|
224
224
|
return child;
|
225
225
|
}
|
226
226
|
}
|
package/src/manager/Task.mjs
CHANGED
@@ -102,7 +102,7 @@ class Task extends Base {
|
|
102
102
|
let fn = function(task) {
|
103
103
|
task.runCount++;
|
104
104
|
|
105
|
-
if(task.addCountToArgs) {
|
105
|
+
if (task.addCountToArgs) {
|
106
106
|
task.args[task.args.length - 1] = task.runCount;
|
107
107
|
}
|
108
108
|
|
@@ -170,7 +170,7 @@ class Task extends Base {
|
|
170
170
|
task.runCount = 0;
|
171
171
|
task.runner = null;
|
172
172
|
|
173
|
-
if(task.addCountToArgs) {
|
173
|
+
if (task.addCountToArgs) {
|
174
174
|
task.args[task.args.length - 1] = 0;
|
175
175
|
}
|
176
176
|
}
|
package/src/manager/Toast.mjs
CHANGED
@@ -8,6 +8,19 @@ import NeoArray from "../util/Array.mjs";
|
|
8
8
|
* @singleton
|
9
9
|
*/
|
10
10
|
class Toast extends Base {
|
11
|
+
static config = {
|
12
|
+
/**
|
13
|
+
* @member {String} className='Neo.manager.Toast'
|
14
|
+
* @protected
|
15
|
+
*/
|
16
|
+
className: 'Neo.manager.Toast',
|
17
|
+
/**
|
18
|
+
* @member {Boolean} singleton=true
|
19
|
+
* @protected
|
20
|
+
*/
|
21
|
+
singleton: true
|
22
|
+
}
|
23
|
+
|
11
24
|
/**
|
12
25
|
* Using a default margin between the item
|
13
26
|
* If you switch the distance to the top or bottom you have to change this value accordingly
|
@@ -33,19 +46,6 @@ class Toast extends Base {
|
|
33
46
|
*/
|
34
47
|
toastClass = 'Neo.component.Toast'
|
35
48
|
|
36
|
-
static config = {
|
37
|
-
/**
|
38
|
-
* @member {String} className='Neo.manager.Toast'
|
39
|
-
* @protected
|
40
|
-
*/
|
41
|
-
className: 'Neo.manager.Toast',
|
42
|
-
/**
|
43
|
-
* @member {Boolean} singleton=true
|
44
|
-
* @protected
|
45
|
-
*/
|
46
|
-
singleton: true
|
47
|
-
}
|
48
|
-
|
49
49
|
/**
|
50
50
|
* @param {Object} config
|
51
51
|
*/
|