neo.mjs 5.13.7 → 5.13.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 +2 -2
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +4 -4
- package/resources/scss/src/menu/List.scss +41 -20
- package/resources/scss/theme-dark/menu/List.scss +38 -24
- package/resources/scss/theme-light/menu/List.scss +38 -24
- package/src/DefaultConfig.mjs +2 -2
- package/src/component/wrapper/GoogleMaps.mjs +15 -9
- package/src/main/addon/GoogleMaps.mjs +20 -6
package/apps/ServiceWorker.mjs
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "5.13.
|
3
|
+
"version": "5.13.8",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -41,7 +41,7 @@
|
|
41
41
|
},
|
42
42
|
"homepage": "https://neomjs.github.io/pages/",
|
43
43
|
"dependencies": {
|
44
|
-
"@fortawesome/fontawesome-free": "^6.4.
|
44
|
+
"@fortawesome/fontawesome-free": "^6.4.2",
|
45
45
|
"@material/mwc-button": "^0.27.0",
|
46
46
|
"@material/mwc-textfield": "^0.27.0",
|
47
47
|
"autoprefixer": "^10.4.14",
|
@@ -52,11 +52,11 @@
|
|
52
52
|
"envinfo": "^7.10.0",
|
53
53
|
"fs-extra": "^11.1.1",
|
54
54
|
"highlightjs-line-numbers.js": "^2.8.0",
|
55
|
-
"inquirer": "^9.2.
|
55
|
+
"inquirer": "^9.2.9",
|
56
56
|
"neo-jsdoc": "^1.0.1",
|
57
57
|
"neo-jsdoc-x": "^1.0.5",
|
58
58
|
"postcss": "^8.4.27",
|
59
|
-
"sass": "^1.64.
|
59
|
+
"sass": "^1.64.2",
|
60
60
|
"webpack": "^5.88.2",
|
61
61
|
"webpack-cli": "^5.1.4",
|
62
62
|
"webpack-dev-server": "4.15.1",
|
@@ -3,27 +3,17 @@
|
|
3
3
|
overflow-y : auto;
|
4
4
|
width : fit-content;
|
5
5
|
|
6
|
-
&.neo-floating {
|
7
|
-
box-shadow: v(menu-list-box-shadow);
|
8
|
-
position : absolute;
|
9
|
-
}
|
10
|
-
|
11
6
|
.neo-list-item {
|
12
|
-
align-items
|
13
|
-
color
|
14
|
-
|
15
|
-
|
16
|
-
font-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
&.neo-selected {
|
23
|
-
.neo-icon {
|
24
|
-
color: v(menu-list-item-icon-color-selected);
|
25
|
-
}
|
26
|
-
}
|
7
|
+
align-items : center;
|
8
|
+
background-color: v(menu-list-item-background-color);
|
9
|
+
color : v(menu-list-item-color);
|
10
|
+
display : flex;
|
11
|
+
font-family : v(menu-list-item-font-family);
|
12
|
+
font-weight : v(menu-list-item-font-weight);
|
13
|
+
height : v(menu-list-item-height);
|
14
|
+
line-height : v(menu-list-item-line-height);
|
15
|
+
padding : v(menu-list-item-padding);
|
16
|
+
text-transform : v(menu-list-item-text-transform);
|
27
17
|
|
28
18
|
.neo-arrow-icon {
|
29
19
|
color : v(menu-list-item-icon-color);
|
@@ -44,5 +34,36 @@
|
|
44
34
|
margin-right: v(menu-list-item-icon-gap);
|
45
35
|
width : 1.2em;
|
46
36
|
}
|
37
|
+
|
38
|
+
&:focus {
|
39
|
+
outline: v(menu-list-item-outline-focus);
|
40
|
+
}
|
41
|
+
|
42
|
+
&:hover {
|
43
|
+
background-color: v(menu-list-item-background-color-hover);
|
44
|
+
}
|
45
|
+
|
46
|
+
&.neo-disabled {
|
47
|
+
background-color: v(menu-list-item-background-color-disabled);
|
48
|
+
color : v(menu-list-item-color-disabled);
|
49
|
+
opacity : v(menu-list-item-opacity-disabled);
|
50
|
+
|
51
|
+
.neo-icon {
|
52
|
+
color: v(menu-list-item-icon-color-disabled);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
&.neo-selected {
|
57
|
+
background-color: v(menu-list-item-background-color-selected);
|
58
|
+
|
59
|
+
.neo-icon {
|
60
|
+
color: v(menu-list-item-icon-color-selected);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
&.neo-floating {
|
66
|
+
box-shadow: v(menu-list-box-shadow);
|
67
|
+
position : absolute;
|
47
68
|
}
|
48
69
|
}
|
@@ -1,31 +1,45 @@
|
|
1
1
|
$neoMap: map-merge($neoMap, (
|
2
|
-
'menu-list-border-color'
|
3
|
-
'menu-list-box-shadow'
|
4
|
-
'menu-list-item-color'
|
5
|
-
'menu-list-item-
|
6
|
-
'menu-list-item-
|
7
|
-
'menu-list-item-
|
8
|
-
'menu-list-item-
|
9
|
-
'menu-list-item-
|
10
|
-
'menu-list-item-
|
11
|
-
'menu-list-item-
|
12
|
-
'menu-list-item-
|
13
|
-
'menu-list-item-
|
2
|
+
'menu-list-border-color' : #3c3f41,
|
3
|
+
'menu-list-box-shadow' : 0 5px 10px rgba(0,0,0,.4),
|
4
|
+
'menu-list-item-background-color' : inherit,
|
5
|
+
'menu-list-item-background-color-disabled': inherit,
|
6
|
+
'menu-list-item-background-color-hover' : inherit,
|
7
|
+
'menu-list-item-background-color-selected': inherit,
|
8
|
+
'menu-list-item-color' : inherit,
|
9
|
+
'menu-list-item-font-family' : inherit,
|
10
|
+
'menu-list-item-font-weight' : inherit,
|
11
|
+
'menu-list-item-icon-color' : #bbb,
|
12
|
+
'menu-list-item-icon-color-disabled' : #bbb,
|
13
|
+
'menu-list-item-icon-color-selected' : #2b2b2b,
|
14
|
+
'menu-list-item-icon-gap' : .4em,
|
15
|
+
'menu-list-item-height' : inherit,
|
16
|
+
'menu-list-item-line-height' : inherit,
|
17
|
+
'menu-list-item-opacity-disabled' : inherit,
|
18
|
+
'menu-list-item-outline-focus' : none,
|
19
|
+
'menu-list-item-padding' : 5px,
|
20
|
+
'menu-list-item-text-transform' : inherit
|
14
21
|
));
|
15
22
|
|
16
23
|
@if $useCssVars == true {
|
17
24
|
:root .neo-theme-dark { // .neo-menu-list
|
18
|
-
--menu-list-border-color
|
19
|
-
--menu-list-box-shadow
|
20
|
-
--menu-list-item-color
|
21
|
-
--menu-list-item-
|
22
|
-
--menu-list-item-
|
23
|
-
--menu-list-item-
|
24
|
-
--menu-list-item-
|
25
|
-
--menu-list-item-
|
26
|
-
--menu-list-item-
|
27
|
-
--menu-list-item-
|
28
|
-
--menu-list-item-
|
29
|
-
--menu-list-item-
|
25
|
+
--menu-list-border-color : #{neo(menu-list-border-color)};
|
26
|
+
--menu-list-box-shadow : #{neo(menu-list-box-shadow)};
|
27
|
+
--menu-list-item-background-color : #{neo(menu-list-item-background-color)};
|
28
|
+
--menu-list-item-background-color-disabled: #{neo(menu-list-item-background-color-disabled)};
|
29
|
+
--menu-list-item-background-color-hover : #{neo(menu-list-item-background-color-hover)};
|
30
|
+
--menu-list-item-background-color-selected: #{neo(menu-list-item-background-color-selected)};
|
31
|
+
--menu-list-item-color : #{neo(menu-list-item-color)};
|
32
|
+
--menu-list-item-font-family : #{neo(menu-list-item-font-family)};
|
33
|
+
--menu-list-item-font-weight : #{neo(menu-list-item-font-weight)};
|
34
|
+
--menu-list-item-icon-color : #{neo(menu-list-item-icon-color)};
|
35
|
+
--menu-list-item-icon-color-disabled : #{neo(menu-list-item-icon-color-disabled)};
|
36
|
+
--menu-list-item-icon-color-selected : #{neo(menu-list-item-icon-color-selected)};
|
37
|
+
--menu-list-item-icon-gap : #{neo(menu-list-item-icon-gap)};
|
38
|
+
--menu-list-item-height : #{neo(menu-list-item-height)};
|
39
|
+
--menu-list-item-line-height : #{neo(menu-list-item-line-height)};
|
40
|
+
--menu-list-item-opacity-disabled : #{neo(menu-list-item-opacity-disabled)};
|
41
|
+
--menu-list-item-outline-focus : #{neo(menu-list-item-outline-focus)};
|
42
|
+
--menu-list-item-padding : #{neo(menu-list-item-padding)};
|
43
|
+
--menu-list-item-text-transform : #{neo(menu-list-item-text-transform)};
|
30
44
|
}
|
31
45
|
}
|
@@ -1,31 +1,45 @@
|
|
1
1
|
$neoMap: map-merge($neoMap, (
|
2
|
-
'menu-list-border-color'
|
3
|
-
'menu-list-box-shadow'
|
4
|
-
'menu-list-item-color'
|
5
|
-
'menu-list-item-
|
6
|
-
'menu-list-item-
|
7
|
-
'menu-list-item-
|
8
|
-
'menu-list-item-
|
9
|
-
'menu-list-item-
|
10
|
-
'menu-list-item-
|
11
|
-
'menu-list-item-
|
12
|
-
'menu-list-item-
|
13
|
-
'menu-list-item-
|
2
|
+
'menu-list-border-color' : #1c60a0,
|
3
|
+
'menu-list-box-shadow' : 0 5px 10px rgba(0,0,0,.4),
|
4
|
+
'menu-list-item-background-color' : inherit,
|
5
|
+
'menu-list-item-background-color-disabled': inherit,
|
6
|
+
'menu-list-item-background-color-hover' : inherit,
|
7
|
+
'menu-list-item-background-color-selected': inherit,
|
8
|
+
'menu-list-item-color' : inherit,
|
9
|
+
'menu-list-item-font-family' : inherit,
|
10
|
+
'menu-list-item-font-weight' : inherit,
|
11
|
+
'menu-list-item-icon-color' : #1c60a0,
|
12
|
+
'menu-list-item-icon-color-disabled' : #1c60a0,
|
13
|
+
'menu-list-item-icon-color-selected' : #1c60a0,
|
14
|
+
'menu-list-item-icon-gap' : .4em,
|
15
|
+
'menu-list-item-height' : inherit,
|
16
|
+
'menu-list-item-line-height' : inherit,
|
17
|
+
'menu-list-item-opacity-disabled' : inherit,
|
18
|
+
'menu-list-item-outline-focus' : none,
|
19
|
+
'menu-list-item-padding' : 5px,
|
20
|
+
'menu-list-item-text-transform' : inherit
|
14
21
|
));
|
15
22
|
|
16
23
|
@if $useCssVars == true {
|
17
24
|
:root .neo-theme-light { // .neo-menu-list
|
18
|
-
--menu-list-border-color
|
19
|
-
--menu-list-box-shadow
|
20
|
-
--menu-list-item-color
|
21
|
-
--menu-list-item-
|
22
|
-
--menu-list-item-
|
23
|
-
--menu-list-item-
|
24
|
-
--menu-list-item-
|
25
|
-
--menu-list-item-
|
26
|
-
--menu-list-item-
|
27
|
-
--menu-list-item-
|
28
|
-
--menu-list-item-
|
29
|
-
--menu-list-item-
|
25
|
+
--menu-list-border-color : #{neo(menu-list-border-color)};
|
26
|
+
--menu-list-box-shadow : #{neo(menu-list-box-shadow)};
|
27
|
+
--menu-list-item-background-color : #{neo(menu-list-item-background-color)};
|
28
|
+
--menu-list-item-background-color-disabled: #{neo(menu-list-item-background-color-disabled)};
|
29
|
+
--menu-list-item-background-color-hover : #{neo(menu-list-item-background-color-hover)};
|
30
|
+
--menu-list-item-background-color-selected: #{neo(menu-list-item-background-color-selected)};
|
31
|
+
--menu-list-item-color : #{neo(menu-list-item-color)};
|
32
|
+
--menu-list-item-font-family : #{neo(menu-list-item-font-family)};
|
33
|
+
--menu-list-item-font-weight : #{neo(menu-list-item-font-weight)};
|
34
|
+
--menu-list-item-icon-color : #{neo(menu-list-item-icon-color)};
|
35
|
+
--menu-list-item-icon-color-disabled : #{neo(menu-list-item-icon-color-disabled)};
|
36
|
+
--menu-list-item-icon-color-selected : #{neo(menu-list-item-icon-color-selected)};
|
37
|
+
--menu-list-item-icon-gap : #{neo(menu-list-item-icon-gap)};
|
38
|
+
--menu-list-item-height : #{neo(menu-list-item-height)};
|
39
|
+
--menu-list-item-line-height : #{neo(menu-list-item-line-height)};
|
40
|
+
--menu-list-item-opacity-disabled : #{neo(menu-list-item-opacity-disabled)};
|
41
|
+
--menu-list-item-outline-focus : #{neo(menu-list-item-outline-focus)};
|
42
|
+
--menu-list-item-padding : #{neo(menu-list-item-padding)};
|
43
|
+
--menu-list-item-text-transform : #{neo(menu-list-item-text-transform)};
|
30
44
|
}
|
31
45
|
}
|
package/src/DefaultConfig.mjs
CHANGED
@@ -245,12 +245,12 @@ const DefaultConfig = {
|
|
245
245
|
useVdomWorker: true,
|
246
246
|
/**
|
247
247
|
* buildScripts/injectPackageVersion.mjs will update this value
|
248
|
-
* @default '5.13.
|
248
|
+
* @default '5.13.8'
|
249
249
|
* @memberOf! module:Neo
|
250
250
|
* @name config.version
|
251
251
|
* @type String
|
252
252
|
*/
|
253
|
-
version: '5.13.
|
253
|
+
version: '5.13.8'
|
254
254
|
};
|
255
255
|
|
256
256
|
Object.assign(DefaultConfig, {
|
@@ -18,7 +18,7 @@ class GoogleMaps extends Base {
|
|
18
18
|
* @protected
|
19
19
|
*/
|
20
20
|
ntype: 'googlemaps',
|
21
|
-
|
21
|
+
/**
|
22
22
|
* Specify lat & lng for the current focus position
|
23
23
|
* @member {Object} center_={lat: -34.397, lng: 150.644}
|
24
24
|
*/
|
@@ -70,27 +70,27 @@ class GoogleMaps extends Base {
|
|
70
70
|
* Internal flag. Gets set to true once Neo.main.addon.GoogleMaps.create() is finished.
|
71
71
|
* @member {Boolean} mapCreated=false
|
72
72
|
*/
|
73
|
-
mapCreated
|
73
|
+
mapCreated = false
|
74
74
|
/**
|
75
75
|
* Pass any options to the map instance which are not explicitly defined here
|
76
76
|
* @member {Object} mapOptions={}
|
77
77
|
*/
|
78
|
-
mapOptions
|
78
|
+
mapOptions = {}
|
79
79
|
/**
|
80
80
|
* null => the maximum zoom from the current map type is used instead
|
81
81
|
* @member {Number|null} maxZoom=null
|
82
82
|
*/
|
83
|
-
maxZoom
|
83
|
+
maxZoom = null
|
84
84
|
/**
|
85
85
|
null => the minimum zoom from the current map type is used instead
|
86
86
|
* @member {Number|null} minZoom=null
|
87
87
|
*/
|
88
|
-
minZoom
|
88
|
+
minZoom = null
|
89
89
|
/**
|
90
90
|
* false hides the default zoom control
|
91
91
|
* @member {Boolean} zoomControl=true
|
92
92
|
*/
|
93
|
-
zoomControl
|
93
|
+
zoomControl = true
|
94
94
|
|
95
95
|
/**
|
96
96
|
* @param {Object} config
|
@@ -122,7 +122,7 @@ class GoogleMaps extends Base {
|
|
122
122
|
Neo.main.addon.GoogleMaps.addMarker({
|
123
123
|
appName: this.appName,
|
124
124
|
...data
|
125
|
-
})
|
125
|
+
})
|
126
126
|
}
|
127
127
|
|
128
128
|
/**
|
@@ -238,7 +238,7 @@ class GoogleMaps extends Base {
|
|
238
238
|
* @param {Boolean} updateParentVdom=false
|
239
239
|
* @param {Boolean} silent=false
|
240
240
|
*/
|
241
|
-
destroy(updateParentVdom=false, silent=false) {
|
241
|
+
destroy(updateParentVdom = false, silent = false) {
|
242
242
|
this.removeMap();
|
243
243
|
super.destroy(updateParentVdom, silent)
|
244
244
|
}
|
@@ -257,7 +257,8 @@ class GoogleMaps extends Base {
|
|
257
257
|
/**
|
258
258
|
* Hook to use once the map instance got rendered
|
259
259
|
*/
|
260
|
-
onComponentMounted() {
|
260
|
+
onComponentMounted() {
|
261
|
+
}
|
261
262
|
|
262
263
|
/**
|
263
264
|
* @param {Object} data
|
@@ -279,6 +280,11 @@ class GoogleMaps extends Base {
|
|
279
280
|
onMarkerStoreLoad() {
|
280
281
|
let me = this;
|
281
282
|
|
283
|
+
Neo.main.addon.GoogleMaps.destroyMarkers({
|
284
|
+
appName: me.appName,
|
285
|
+
id : me.id
|
286
|
+
});
|
287
|
+
|
282
288
|
me.markerStore.items.forEach(item => {
|
283
289
|
Neo.main.addon.GoogleMaps.addMarker({
|
284
290
|
appName: me.appName,
|
@@ -27,6 +27,7 @@ class GoogleMaps extends Base {
|
|
27
27
|
app: [
|
28
28
|
'addMarker',
|
29
29
|
'create',
|
30
|
+
'destroyMarkers',
|
30
31
|
'geocode',
|
31
32
|
'hideMarker',
|
32
33
|
'panTo',
|
@@ -51,11 +52,11 @@ class GoogleMaps extends Base {
|
|
51
52
|
/**
|
52
53
|
* @member {Object} maps={}
|
53
54
|
*/
|
54
|
-
maps
|
55
|
+
maps = {}
|
55
56
|
/**
|
56
57
|
* @member {Object} markers={}
|
57
58
|
*/
|
58
|
-
markers
|
59
|
+
markers = {}
|
59
60
|
|
60
61
|
/**
|
61
62
|
* @param {Object} config
|
@@ -135,6 +136,19 @@ class GoogleMaps extends Base {
|
|
135
136
|
me.fire('mapCreated', id);
|
136
137
|
}
|
137
138
|
|
139
|
+
/**
|
140
|
+
* Destroys all markers for the specified map ID.
|
141
|
+
* @param {Object} data
|
142
|
+
* @param {String} data.mapId
|
143
|
+
*/
|
144
|
+
destroyMarkers(data) {
|
145
|
+
let me = this,
|
146
|
+
markers = me.markers[data.mapId] || {};
|
147
|
+
|
148
|
+
Object.values(markers).forEach(marker => marker.setMap(null));
|
149
|
+
delete me.markers[data.mapId];
|
150
|
+
}
|
151
|
+
|
138
152
|
/**
|
139
153
|
* Use either address, location or placeId
|
140
154
|
* @param {Object} data
|
@@ -181,7 +195,7 @@ class GoogleMaps extends Base {
|
|
181
195
|
* @param {google.maps.Map} map
|
182
196
|
* @param {String} mapId
|
183
197
|
*/
|
184
|
-
onMapZoomChange(map, mapId){
|
198
|
+
onMapZoomChange(map, mapId) {
|
185
199
|
DomEvents.sendMessageToApp({
|
186
200
|
id : mapId,
|
187
201
|
path : [{cls: [], id: mapId}],
|
@@ -199,9 +213,9 @@ class GoogleMaps extends Base {
|
|
199
213
|
let transformedEvent = DomEvents.getMouseEventData(event.domEvent);
|
200
214
|
|
201
215
|
DomEvents.sendMessageToApp({
|
202
|
-
id
|
203
|
-
path: [{cls: [], id: marker.neoMapId}],
|
204
|
-
type: 'googleMarkerClick',
|
216
|
+
id : marker.neoId,
|
217
|
+
path : [{cls: [], id: marker.neoMapId}],
|
218
|
+
type : 'googleMarkerClick',
|
205
219
|
domEvent: transformedEvent
|
206
220
|
})
|
207
221
|
}
|